CTC Discussion on MPI Basics; Six Basic Calls

1.2.5 Receiving a message

Message passing in MPI-1 requires two-way communication. One-sided communication is one of the features added in MPI-2. Each time one process sends a message, another process must explicitly receive the message. So for every place in your application that you call an MPI send routine, there will be a corresponding place where you call an MPI receive routine. Care must be taken to ensure that the send and receive parameters match. This will be discussed in more detail later in the module.

Like MPI_SEND, MPI_RECV is blocking. This means the call does not return control to your program until all the received data have been stored in the variable(s) you specify in the parameter list. Because of this, you can use the data after the call and be certain it is all there. (There are non-blocking receives where this is not the case.)

The parameters:

[Previous Page] [Table of Contents]