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)


Calls

proc~~create_world_comm~~CallsGraph proc~create_world_comm create_world_comm mpi_comm_dup mpi_comm_dup proc~create_world_comm->mpi_comm_dup proc~create_comm_from_mpi create_comm_from_mpi proc~create_world_comm->proc~create_comm_from_mpi mpi_comm_rank mpi_comm_rank proc~create_comm_from_mpi->mpi_comm_rank mpi_comm_size mpi_comm_size proc~create_comm_from_mpi->mpi_comm_size

Called by

proc~~create_world_comm~~CalledByGraph proc~create_world_comm create_world_comm interface~comm_world comm_world interface~comm_world->proc~create_world_comm

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

      call MPI_Comm_dup(MPI_COMM_WORLD, dup_comm, ierr)
      comm = create_comm_from_mpi(dup_comm)

   end function create_world_comm