Creates a new communicator that duplicates MPI_COMM_WORLD. This is the standard way to obtain a communicator for application use.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(MPI_Comm), | private | :: | dup_comm | ||||
| integer(kind=int32), | private | :: | ierr |
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