comm_fortran_handle Function

private function comm_fortran_handle(this) result(fh)

The plain integer handle this communicator is known by. There is no real MPI underneath, so any value other than MPI_COMM_NULL’s (0) names the single rank – matching this backend’s own comm_from_handle.

Type Bound

comm_t

Arguments

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

Return Value integer


Source Code

   function comm_fortran_handle(this) result(fh)
   !! The plain integer handle this communicator is known by. There is no
   !! real MPI underneath, so any value other than MPI_COMM_NULL's (0) names
   !! the single rank -- matching this backend's own `comm_from_handle`.
      class(comm_t), intent(in) :: this
      integer :: fh
      if (.not. this%is_valid) then
         error stop "Cannot get a Fortran handle from a null Comm"
      end if
      fh = 1
   end function comm_fortran_handle