next up previous

7.2 Synchronous Message Passing

The program that initiates the send (receive) waits until the send (receive) is complete. This waiting is called blocking. Completion of a send only means that the message buffer can be reused and does not imply that the message has been received. csend() and crecv() are the synchronous send and receive system calls.

Example
The following code synchronously sends the value of pi in a message of type 1 to process 0 on node 2.

double pi;
pi = 3.14159;
csend(1, &pi, sizeof(double), 2, 0);