Gathers rank-1 data from all processes and all processes receive the same data
see mp_allgather_d11
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real_8), | intent(in), | CONTIGUOUS | :: | msgout(:) |
Rank-1 data to send |
|
real(kind=real_8), | intent(out), | CONTIGUOUS | :: | msgin(:) | ||
integer, | intent(in) | :: | gid | |||
integer, | intent(out) | :: | request |
SUBROUTINE mp_iallgather_d11(msgout, msgin, gid, request)
!! Gathers rank-1 data from all processes and all processes receive the
!! same data
!! @note see mp_allgather_d11
REAL(kind=real_8), CONTIGUOUS, INTENT(IN) :: msgout(:)
!! Rank-1 data to send
REAL(kind=real_8), CONTIGUOUS, INTENT(OUT) :: msgin(:)
INTEGER, INTENT(IN) :: gid
INTEGER, INTENT(OUT) :: request
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_iallgather_d11'
INTEGER :: handle, ierr
#if defined(__parallel)
INTEGER :: rcount, scount
#endif
ierr = 0
CALL timeset(routineN, handle)
#if defined(__parallel)
scount = SIZE(msgout(:))
rcount = scount
CALL MPI_IALLGATHER(msgout, scount, MPI_DOUBLE_PRECISION, &
msgin, rcount, MPI_DOUBLE_PRECISION, &
gid, request, ierr)
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_iallgather @ "//routineN)
#else
MARK_USED(gid)
msgin = msgout
request = mp_request_null
#endif
CALL timestop(handle)
END SUBROUTINE mp_iallgather_d11