synchronizes with a barrier a given group of mpi tasks
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | group |
mpi communicator |
SUBROUTINE mp_sync(group)
!! synchronizes with a barrier a given group of mpi tasks
INTEGER, INTENT(IN) :: group
!! mpi communicator
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_sync'
INTEGER :: handle, ierr
ierr = 0
CALL timeset(routineN, handle)
#if defined(__parallel)
CALL mpi_barrier(group, ierr)
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_barrier @ "//routineN)
#else
MARK_USED(group)
#endif
CALL timestop(handle)
END SUBROUTINE mp_sync