new_mpi_work_partition Subroutine

public subroutine new_mpi_work_partition(error, partition, comm)

Create the work partition of the calling rank in a communicator

Arguments

Type IntentOptional Attributes Name
type(error_type), intent(out), allocatable :: error

Error handling

type(work_partition), intent(out) :: partition

New work partition

integer, intent(in) :: comm

MPI communicator handle, users of mpi_f08 pass comm%mpi_val


Source Code

subroutine new_mpi_work_partition(error, partition, comm)

   !> Error handling
   type(error_type), allocatable, intent(out) :: error

   !> New work partition
   type(work_partition), intent(out) :: partition

   !> MPI communicator handle, users of mpi_f08 pass comm%mpi_val
   integer, intent(in) :: comm

   integer :: rank, nranks

   call get_mpi_comm_info(comm, rank, nranks, error)
   if (allocated(error)) return

   call new_work_partition(error, partition, rank, nranks)

end subroutine new_mpi_work_partition