Gathers data from all processes to one
Data length All data (msg) is equal-sized
MPI mapping mpi_gather
Note
see mp_gather_i
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int_4), | intent(in), | CONTIGUOUS | :: | msg(:,:) |
Datum to send to root |
|
| integer(kind=int_4), | intent(out), | CONTIGUOUS | :: | msg_gather(:,:) | ||
| integer, | intent(in) | :: | root | |||
| type(mp_comm_type), | intent(in) | :: | gid |
SUBROUTINE mp_gather_im(msg, msg_gather, root, gid) # 4039 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" !! Gathers data from all processes to one !! !! Data length !! All data (msg) is equal-sized !! !! MPI mapping !! mpi_gather !! @note !! see mp_gather_i # 4048 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" !! @endnote INTEGER(KIND=int_4), CONTIGUOUS, INTENT(IN) :: msg(:, :) # 4051 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" !! Datum to send to root INTEGER(KIND=int_4), CONTIGUOUS, INTENT(OUT) :: msg_gather(:, :) # 4053 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" INTEGER, INTENT(IN) :: root TYPE(mp_comm_type), INTENT(IN) :: gid CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_gather_im' # 4057 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" INTEGER :: handle, ierr, msglen ierr = 0 CALL timeset(routineN, handle) msglen = SIZE(msg) #if defined(__parallel) CALL mpi_gather(msg, msglen, MPI_INTEGER, msg_gather, & # 4066 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" msglen, MPI_INTEGER, root, gid%handle, ierr) # 4067 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" IF (ierr /= 0) CALL mp_stop(ierr, "mpi_gather @ "//routineN) CALL add_perf(perf_id=4, msg_size=msglen*int_4_size) # 4069 "/__w/dbcsr/dbcsr/src/mpi/dbcsr_mpiwrap.F" #else MARK_USED(root) MARK_USED(gid) msg_gather = msg #endif CALL timestop(handle) END SUBROUTINE mp_gather_im