comm_split_shared Function

private function comm_split_shared(this) result(new_comm)

Type Bound

comm_t

Arguments

Type IntentOptional Attributes Name
class(comm_t), intent(in) :: this

Return Value type(comm_t)


Calls

proc~~comm_split_shared~2~~CallsGraph proc~comm_split_shared~2 comm_t%comm_split_shared interface~comm_null~2 comm_null proc~comm_split_shared~2->interface~comm_null~2 mpi_comm_split_type mpi_comm_split_type proc~comm_split_shared~2->mpi_comm_split_type proc~comm_get~2 comm_t%comm_get proc~comm_split_shared~2->proc~comm_get~2 proc~create_comm_from_mpi~2 create_comm_from_mpi proc~comm_split_shared~2->proc~create_comm_from_mpi~2 proc~create_null_comm~2 create_null_comm interface~comm_null~2->proc~create_null_comm~2 mpi_comm_rank mpi_comm_rank proc~create_comm_from_mpi~2->mpi_comm_rank mpi_comm_size mpi_comm_size proc~create_comm_from_mpi~2->mpi_comm_size

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: ierr
integer, private :: mpi_comm_new

Source Code

   function comm_split_shared(this) result(new_comm)
      class(comm_t), intent(in) :: this
      type(comm_t) :: new_comm
      integer :: mpi_comm_new
      integer(int32) :: ierr

      if (.not. this%is_valid) then
         new_comm = comm_null()
         return
      end if

      call MPI_Comm_split_type(this%get(), MPI_COMM_TYPE_SHARED, 0_int32, MPI_INFO_NULL, mpi_comm_new, ierr)
      new_comm = create_comm_from_mpi(mpi_comm_new)
   end function comm_split_shared