Home

MPIIprobe

MPI_Iprobe is a nonblocking probe operation in the Message Passing Interface (MPI) standard. It checks for the presence of an incoming message without blocking the calling process, allowing the program to decide how to proceed based on whether a message has arrived.

The typical C declaration is int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status).

MPI_Iprobe does not receive the message; it merely indicates whether a suitable message is ready to be

Compared with MPI_Probe, MPI_Iprobe is nonblocking: it returns immediately, allowing the program to perform other work

The
parameters
source
and
tag
specify
the
message’s
origin
and
label,
while
comm
designates
the
communicator.
The
flag
is
set
to
true
if
a
matching
message
is
available,
and
status
contains
information
about
that
message.
If
no
message
is
available,
flag
is
false
and
the
contents
of
status
are
undefined.
MPI_Iprobe
can
be
used
with
specific
values
of
source
and
tag
or
with
MPI_ANY_SOURCE
and/or
MPI_ANY_TAG
to
check
for
messages
from
any
source
or
with
any
tag.
received.
If
flag
is
true,
a
subsequent
MPI_Recv
or
MPI_Irecv
can
be
posted
to
actually
transfer
the
data.
The
status
object
can
then
be
used
to
obtain
details
such
as
the
actual
source
and
tag
of
the
message.
In
many
patterns,
MPI_Iprobe
is
used
to
implement
asynchronous
or
event-driven
communication,
often
together
with
a
postposted
receive.
or
periodically
poll
for
messages.
This
facility
is
central
to
avoiding
deadlock
in
certain
communication
scenarios
and
to
building
responsive
parallel
applications.