How many procs are in passed communicator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | comm | |||
integer, | intent(out) | :: | nproc |
subroutine nproc_comm(comm,nproc)
integer, intent(in) :: comm
integer, intent(out) :: nproc
#ifdef MPI
integer :: ierror
!$OMP MASTER
call time_message(.false., time_mp_other, ' MPI Overheads')
!$OMP END MASTER
call mpi_comm_size(comm,nproc,ierror)
!$OMP MASTER
call time_message(.false., time_mp_other, ' MPI Overheads')
!$OMP END MASTER
#else
UNUSED_DUMMY(comm)
nproc = 1
#endif
end subroutine nproc_comm