private function create_comm_from_mpi(mpi_comm_in) result(comm)
Internal helper function that wraps an MPI_Comm into a comm_t object
and caches rank and size information
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
type(MPI_Comm),
|
intent(in) |
|
|
:: |
mpi_comm_in |
|
Return Value
type(comm_t)
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer(kind=int32),
|
private |
|
:: |
ierr |
|
|
|
Source Code
function create_comm_from_mpi(mpi_comm_in) result(comm)
!! Internal helper function that wraps an MPI_Comm into a comm_t object
!! and caches rank and size information
type(MPI_Comm), intent(in) :: mpi_comm_in
type(comm_t) :: comm
integer(int32) :: ierr
! The only communicator there is.
comm%m_rank = 0
comm%m_size = 1
comm%is_valid = .true.
end function create_comm_from_mpi