Home

MPIWait

MPI_Wait is a blocking routine in the Message Passing Interface (MPI) used to wait for the completion of a single non-blocking operation. It takes a pointer to an MPI_Request and an MPI_Status, and returns when the referenced operation has completed.

The request argument is typically obtained from non-blocking calls such as MPI_Isend or MPI_Irecv, or from persistent

After MPI_Wait completes, the behavior of the request handle depends on the type of request. For ordinary

MPI_Wait is commonly used to synchronize a computation with a non-blocking communication operation, enabling overlap of

Return values indicate success or error. The function returns MPI_SUCCESS on success; on error, an MPI error

requests
created
with
operations
like
MPI_Send_init
or
MPI_Recv_init
and
started
with
MPI_Start.
The
status
argument
receives
information
about
the
completed
operation,
including
the
source,
tag,
and
possibly
the
amount
of
data
transferred.
If
the
status
is
not
needed,
MPI_STATUS_IGNORE
can
be
passed.
(non-persistent)
requests,
the
handle
becomes
MPI_REQUEST_NULL.
For
persistent
requests,
the
handle
remains
valid
and
can
be
reused
by
a
subsequent
MPI_Start
or
MPI_Startall;
the
request
may
be
freed
with
MPI_Request_free
when
no
longer
needed.
computation
and
communication.
It
blocks
the
calling
process
until
the
specified
operation
finishes,
ensuring
that
subsequent
code
operates
on
data
that
has
already
been
transferred.
code
is
returned
and
the
MPI
error
handler
may
be
invoked
(default
behavior
may
abort
the
program
unless
configured
otherwise).
Related
routines
include
MPI_Test
(non-blocking
check),
MPI_Waitall,
and
MPI_Waitany.