Skip to content

Commit 9b9e5a5

Browse files
committed
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 51d5624 commit 9b9e5a5

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
@@ -1378,7 +1378,7 @@ subroutine mpas_dmpar_scatter_ints(dminfo, nprocs, noutlist, displs, counts, inl
13781378
integer, intent(in) :: noutlist !< Input: Number integers to receive
13791379
integer, dimension(nprocs), intent(in) :: displs !< Input: Displacement in sending array
13801380
integer, dimension(nprocs), intent(in) :: counts !< Input: Number of integers to distribute
1381-
integer, dimension(:), pointer :: inlist !< Input: List of integers to send
1381+
integer, dimension(:), intent(in) :: inlist !< Input: List of integers to send
13821382
integer, dimension(noutlist), intent(inout) :: outlist !< Output: List of received integers
13831383

13841384
#ifdef _MPI

0 commit comments

Comments
 (0)