HP-MPI User's Guide (11th Edition)

Introduction
MPI concepts
Chapter 1 9
MPI_Recv (void *buf, int count, MPI_datatype dtype, int
source, int tag, MPI_Comm comm, MPI_Status *status);
where
buf Specifies the starting address of the buffer.
count Indicates the number of buffer elements.
dtype Denotes the datatype of the buffer elements.
source Specifies the rank of the source process in the group
associated with the communicator comm.
tag Denotes the message label.
comm Designates the communication context that identifies a
group of processes.
status Returns information about the received message.
Status information is useful when wildcards are used
or the received message is smaller than expected.
Status may also contain error codes.
Examples “send_receive.f” on page 223, “ping_pong.c” on page 225, and
“master_worker.f90” on page 243 all illustrate the use of standard
blocking sends and receives.
NOTE You should not assume message buffering between processes because the
MPI standard does not mandate a buffering strategy. HP-MPI does
sometimes use buffering for MPI_Send and MPI_Rsend, but it is
dependent on message size. Deadlock situations can occur when your
code uses standard send operations and assumes buffering behavior for
standard communication mode.
Nonblocking communication MPI provides nonblocking
counterparts for each of the four blocking send routines and for the
receive routine. Table 1-2 lists blocking and nonblocking routine calls.
Table 1-2 MPI blocking and nonblocking calls
Blocking
mode
Nonblocking
mode
MPI_Send MPI_Isend