MPI has a large number of functions for receiving data from a remote process. The following are the most basic receive functions:
BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, IERROR)
<type> BUF(*) INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM INTEGER STATUS(MPI_STATUS_SIZE), IERROR
MPI_Recv() is a blocking point-to-point receive operation. The
buf argument points to the initial address of the receive buffer.
This buffer is big enough to contain at least count elements of
type datatype. The call completes when a message arrives to the
process with tag value tag, and which matches the rank specified
by source relative to communicator group comm. The user can
specify wildcard values for the source (MPI_ANY_SOURCE)
and for the tag (MPI_ANY_TAG) fields. After the call
completes, the user can examine the status variable to determine the
size of the message received, the source of the message, and its tag
(the latter two being useful if wildcard values were specified for the
source or tag). For an example of MPI_Recv(), see section Basic MPI concepts.
Go to the first, previous, next, last section, table of contents.