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

Introduction
MPI concepts
Chapter 18
2. The application does some computation.
3. The application calls a completion routine (for example, MPI_Test or
MPI_Wait) to test or wait for completion of the send operation.
Blocking communication Blocking communication consists of four
send modes and one receive mode.
The four send modes are:
Standard (MPI_Send) The sending process returns when the system can
buffer the message or when the message is received
and the buffer is ready for reuse.
Buffered (MPI_Bsend) The sending process returns when the message is
buffered in an application-supplied buffer.
Avoid using the MPI_Bsend mode because it forces an
additional copy operation.
Synchronous (MPI_Ssend) The sending process returns only if a
matching receive is posted and the receiving process
has started to receive the message.
Ready (MPI_Rsend) The message is sent as soon as possible.
You can invoke any mode by using the appropriate routine name and
passing the argument list. Arguments are the same for all modes.
For example, to code a standard blocking send, use
MPI_Send (void *buf, int count, MPI_Datatype dtype, int
dest, int tag, MPI_Comm comm);
where
buf Specifies the starting address of the buffer.
count Indicates the number of buffer elements.
dtype Denotes the datatype of the buffer elements.
dest Specifies the rank of the destination 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.
To code a blocking receive, use