Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | comm1 | |||
integer, | intent(out) | :: | comm2 |
SUBROUTINE mp_comm_dup(comm1, comm2)
INTEGER, INTENT(IN) :: comm1
INTEGER, INTENT(OUT) :: comm2
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_comm_dup'
INTEGER :: handle, ierr
ierr = 0
CALL timeset(routineN, handle)
#if defined(__parallel)
CALL mpi_comm_dup(comm1, comm2, ierr)
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_comm_dup @ "//routineN)
debug_comm_count = debug_comm_count + 1
#else
comm2 = comm1
#endif
CALL timestop(handle)
END SUBROUTINE mp_comm_dup