Skip to main content

Module request

Module request 

Source
Expand description

Non-blocking request handling. Mirrors mpi::request in rsmpi: Request borrows the buffer involved in an in-flight operation for the lifetime of the request, Scope bounds that borrow, and WaitGuard / CancelGuard complete a request when they go out of scope.

As in rsmpi, dropping an in-flight Request panics — a request must be consumed by wait, test or cancel, or handed to a guard.

Structs§

CancelGuard
Cancels (then completes) the contained request when dropped. Mirrors rsmpi’s CancelGuard.
GeneralizedRequest
A user-defined (“generalized”) request, completed by external code rather than by the MPI runtime (MPI_Grequest_start). Pair it with a GeneralizedRequestCompleter: whichever code performs the underlying work calls GeneralizedRequestCompleter::complete, after which wait/test on the request return.
GeneralizedRequestCompleter
The completion handle for a GeneralizedRequest (MPI_Grequest_complete).
LocalScope
A dynamically-bounded scope created by scope.
PersistentRequest
A persistent (re-usable) communication request. Created with crate::point_to_point::Destination::send_init / crate::point_to_point::Source::receive_init, then repeatedly started and waited. The associated buffer is borrowed for the request’s lifetime.
Request
A handle to a non-blocking operation, borrowing its buffer for 'a.
StaticScope
The scope of the entire program ('static).
WaitGuard
Waits on the contained Request when dropped (RAII completion of a send). Mirrors rsmpi’s WaitGuard.

Traits§

Scope
A scope that bounds the lifetime of the buffers borrowed by requests. Safe scopes are StaticScope ('static) and the LocalScope handed to the closure passed to scope.

Functions§

scope
Open a request scope. Requests created inside f may borrow buffers that outlive the scope; the borrow checker forbids letting a request escape.
wait_all
Wait for all requests to complete (MPI_Waitall), returning their statuses.
wait_any
Wait for any one of the requests to complete, returning its index and status and removing it from the vector (MPI_Waitany). Returns None if the vector is empty.