request_t Derived Type

type, public :: request_t

Wraps MPI_Request to provide object-oriented interface for non-blocking communication operations (isend, irecv)


Inherits

type~~request_t~3~~InheritsGraph type~request_t~3 request_t type~mpi_request MPI_Request type~request_t~3->type~mpi_request m_request

Components

Type Visibility Attributes Name Initial
logical, private :: is_valid = .false.

Validity flag

type(MPI_Request), private :: m_request

Internal MPI request handle


Type-Bound Procedures

procedure, public :: free => request_free

Free the request

  • private subroutine request_free(this)

    Frees the MPI request resources

    Arguments

    Type IntentOptional Attributes Name
    class(request_t), intent(inout) :: this

procedure, public :: get => request_get

Get underlying MPI_Request

  • private function request_get(this) result(mpi_request_out)

    Retrieves the underlying MPI_Request handle

    Arguments

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

    Return Value type(MPI_Request)

procedure, public :: is_null => request_is_null

Check if request is null

  • private pure function request_is_null(this) result(is_null)

    Checks if the request is null/invalid

    Arguments

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

    Return Value logical

Source Code

   type :: request_t
   !! Wraps MPI_Request to provide object-oriented interface for
   !! non-blocking communication operations (isend, irecv)
      private
      ! No initializer here, nor on win_t%m_win or comm_t%m_comm below.
      ! LFortran 0.66.0 cannot codegen a structure constructor used as a
      ! component default and throws "visit_StructConstructor() not
      ! implemented" once a program instantiates this module's procedures --
      ! which is why the library builds under LFortran but nothing that links
      ! it does. Omitting it is equivalent: each of these handle types
      ! declares `v = 0` and each *_NULL is <Type>(0), so the initial state is
      ! unchanged. Do not reinstate without re-checking LFortran.
      type(MPI_Request) :: m_request !! Internal MPI request handle
      logical :: is_valid = .false. !! Validity flag
   contains
      procedure :: is_null => request_is_null !! Check if request is null
      procedure :: get => request_get !! Get underlying MPI_Request
      procedure :: free => request_free !! Free the request
   end type request_t