1 SUBROUTINE allgetherv(GRID1)
14 use ctlblk_mod,
only : im,jm,num_procs,me,jsta,jend,ista,iend,mpi_comm_comp
26 REAL ibufsend((iend-ista+1)*(jend-jsta+1))
27 integer SENDCOUNT,RECVCOUNTS(num_procs),DISPLS(num_procs)
30 SENDCOUNT=(iend-ista+1)*(jend-jsta+1)
31 call mpi_allgather(sendcount, 1, mpi_integer, recvcounts,1 , &
32 mpi_integer, mpi_comm_comp, ierr)
35 displs(i)=displs(i-1)+recvcounts(i-1)
46 ibufsend(ij)=grid1(i,j)
49 if(ij /= recvcounts(me+1))
then
50 write(*,*)
'Error: send account is not equal to receive account',me,ij,recvcounts(me+1)
53 call mpi_allgatherv(ibufsend, ij, mpi_real, ibufrecv, recvcounts,displs, &
54 mpi_real, mpi_comm_comp, ierr)
60 grid1(i,j)=ibufrecv(ij)