Skip to content

Conversation

mgduda
Copy link
Contributor

@mgduda mgduda commented Aug 26, 2025

This PR removes the pointer attribute from the inlist dummy argument of the mpas_dmpar_scatter_ints routine.

The pointer attribute is unnecessary for the inlist argument, and requiring the inlist argument to be a pointer precluded the use of mpas_dmpar_scatter_ints for arrays that are not pointers, e.g., allocatable arrays or array constructors. Additionally, since the inlist argument is used only as the first argument to MPI_Scatterv (i.e., as the sendbuf argument of MPI_Scatterv), it can be declared as an intent(in) in the mpas_dmpar_scatter_ints routine.

The changes in this PR have also been found to resolve runtime errors occurring with certain compiler and MPI library combinations, specifically, nvfortran and OpenMPI 5.x.

…er_ints

The 'pointer' attribute is unnecessary for the 'inlist' argument, and requiring
the inlist argument to be a pointer precluded the use of mpas_dmpar_scatter_ints
for arrays that are not pointers, e.g., allocatable arrays or array
constructors. Additionally, since the inlist argument is used only as the first
argument to MPI_Scatterv (i.e., as the 'sendbuf' argument of MPI_Scatterv), it
can be declared as an intent(in) in the mpas_dmpar_scatter_ints routine.

The changes in this commit have also been found to resolve runtime errors
occurring with certain compiler and MPI library combinations, specifically,
nvfortran and OpenMPI 5.x.
@mgduda mgduda force-pushed the framework/dmpar_scatter_dummy_pointer branch from c832b38 to 9b9e5a5 Compare August 26, 2025 19:21
@mgduda mgduda requested a review from abishekg7 August 26, 2025 19:21
@mgduda
Copy link
Contributor Author

mgduda commented Aug 26, 2025

The changes in this PR are expected to provide a suitable alternative to those in PR #1318 for the purposes of resolving issues in processing block decomposition files with OpenMPI 5.x and nvfortran.

Copy link
Collaborator

@abishekg7 abishekg7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the changes with nvhpc/25.1 and openmpi/5.0.7 on Casper, and both the cpu and gpu builds appear to run fine on 4 MPI ranks.

The description seems sufficient too.

@mgduda mgduda merged commit 324573f into develop Aug 29, 2025
@mgduda mgduda deleted the framework/dmpar_scatter_dummy_pointer branch August 29, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants