nproc_comm Subroutine

public subroutine nproc_comm(comm, nproc)

How many procs are in passed communicator

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: comm
integer, intent(out) :: nproc

Contents

Source Code


Source Code

  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