create_world_comm Function

private function create_world_comm() result(comm)

Creates a new communicator that duplicates MPI_COMM_WORLD. This is the standard way to obtain a communicator for application use.

Arguments

None

Return Value type(comm_t)


Called by

proc~~create_world_comm~2~~CalledByGraph proc~create_world_comm~2 create_world_comm interface~comm_world~2 comm_world interface~comm_world~2->proc~create_world_comm~2 proc~create_comm_from_handle~2 create_comm_from_handle proc~create_comm_from_handle~2->proc~create_world_comm~2 interface~comm_from_handle~2 comm_from_handle interface~comm_from_handle~2->proc~create_comm_from_handle~2

Variables

Type Visibility Attributes Name Initial
type(MPI_Comm), private :: dup_comm
integer(kind=int32), private :: ierr

Source Code

   function create_world_comm() result(comm)
   !! Creates a new communicator that duplicates MPI_COMM_WORLD.
   !! This is the standard way to obtain a communicator for application use.
      type(comm_t) :: comm
      type(MPI_Comm) :: dup_comm
      integer(int32) :: ierr

      ! The only communicator there is.
      comm%m_rank = 0
      comm%m_size = 1
      comm%is_valid = .true.
   end function create_world_comm