next up previous contents
Next: 5 General Datatypes Up: 4 Point-To-Point Communication Previous: 4.1 Communication Modes

4.2 Persistent Communication Requests

MPI also provides a set of routines for creating communication request objects that completely describe a send or receive operation by binding together all the parameters of the operation. A handle to the communication object so formed is returned, and may be passed to a routine that actually initiates the communication. As with the nonblocking communication routines in Fig. 3, a subsequent call should be made to ensure completion of the operation.

Persistent communication objects may be used to optimize communication performance, particularly when the same communication pattern is repeated many times in an application. For example, if a send routine is called within a loop, performance may be improved by creating a communication request object that describes the parameters of the send prior to entering the loop, and then initiating the communication inside the loop to send the data on each pass through the loop.

There are five routines for creating communication objects: four for send operations (one corresponding to each communication mode), and one for receive operations. A persistent communication object should be deallocated when no longer needed.



top500@rz.uni-mannheim.de
Tue May 28 14:38:25 PST 1996