Home

MPIANYSOURCE

MPIANYSOURCE is the predefined constant in the Message Passing Interface (MPI) used as the source parameter in receive operations to indicate that a message may be received from any process within the communicator. The canonical name in the MPI standard is MPI_ANY_SOURCE; MPIANYSOURCE is an informal concatenation sometimes used in documentation or code comments.

It is most commonly used with receive functions such as MPI_Recv and MPI_Irecv. It can be combined

On completion, the actual sender and tag are returned in the status object, typically status.MPI_SOURCE and

It is part of the MPI standard since MPI-1 and is supported by major implementations such as

with
MPI_ANY_TAG
to
receive
messages
regardless
of
origin
or
tag.
If
both
source
and
tag
use
MPI_ANY*,
any
message
on
the
communicator
is
eligible
for
reception.
status.MPI_TAG.
This
allows
the
receiver
to
distinguish
between
messages.
Using
MPI_ANY_SOURCE
introduces
nondeterminism
when
multiple
messages
are
ready,
so
message
ordering
is
not
guaranteed
unless
additional
synchronization
is
used.
MPICH,
Open
MPI,
and
Intel
MPI.
It
is
widely
used
in
dynamic
task
allocation
and
asynchronous
communication
patterns,
but
programmers
should
consider
potential
race
conditions
and
ensure
that
program
semantics
account
for
possible
variations
in
message
arrival.
See
also
MPI_ANY_TAG
and
the
MPI_STATUS
information
returned
after
receives.