Skip to content

Commit 6c996cd

Browse files
mgdudaAndy Stokely
authored andcommitted
Remove 'pointer' attribute from 'inlist' argument of mpas_dmpar_scatter_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.
1 parent 47aa6d9 commit 6c996cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/framework/mpas_dmpar.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ subroutine mpas_dmpar_scatter_ints(dminfo, nprocs, noutlist, displs, counts, inl
14931493
integer, intent(in) :: noutlist !< Input: Number integers to receive
14941494
integer, dimension(nprocs), intent(in) :: displs !< Input: Displacement in sending array
14951495
integer, dimension(nprocs), intent(in) :: counts !< Input: Number of integers to distribute
1496-
integer, dimension(:), pointer :: inlist !< Input: List of integers to send
1496+
integer, dimension(:), intent(in) :: inlist !< Input: List of integers to send
14971497
integer, dimension(noutlist), intent(inout) :: outlist !< Output: List of received integers
14981498

14991499
#ifdef _MPI

0 commit comments

Comments
 (0)