Point to Point Communication I

2.2 Conclusions

Mode Advantages Disadvantages
Synchronous

Safest, therefore most portable
No need for extra buffer space
SEND/RECV order not critical

Can incur substantial synchronization overhead
Ready Lowest total overhead
No need for extra buffer space
SEND/RECV handshake not required, but...
RECV must precede SEND
Buffered Decouples SEND from RECV;
no sync overhead on SEND

Programmer can control size of buffer space
SEND/RECV order irrelevant
Copying to buffer incurs additional system overhead
Standard Good for many cases
Compromise position in MPI/Pro
For small messages: ready send, buffered receive
For large messages: synchronous
Your program may not be suitable

Synchronous mode is the "safest", and therefore also the most portable. "Safe" means that if a code runs under one set of conditions (i.e. message sizes, or architecture) it will run under all conditions. Synchronous mode is safe because it does not depend upon the order in which the send and receive are executed (unlike ready mode) or the amount of buffer space (unlike buffered mode and standard mode below the cutoff limit). Synchronous mode can incur substantial synchronization overhead.

Ready mode has the lowest total overhead. It does not require a handshake between sender and receiver (like synchronous mode) or an extra copy to a buffer (like buffered or standard mode). However, the receive must precede the send. This mode will not be appropriate for all messages.

Buffered mode decouples the sender from the receiver by buffering the message on the sending side. This eliminates synchronization overhead on the sending task and ensures that the order of execution of the send and receive does not matter (unlike ready mode). An additional advantage is that the programmer can control the size of messages to be buffered, and the total amount of buffer space. There is additional system overhead incurred by the copy to the buffer.

Standard mode behavior is implementation-specific. The library developer chooses a system behavior that provides good performance and reasonable safety. MPI/Pro takes a compromise position between the above modes by using a two-tier strategy: a ready send to a system buffer on the receiving side for messages smaller than the cutoff limit, and a synchronous send for larger messages.