Package Scientific :: Package MPI :: Class MPIRequest
[frames] | no frames]

Class MPIRequest

MPI Request

There is no constructor for MPI Request objects. They are returned by nonblocking send and receives, and are used to query the status of the message.

Instance Methods
 
test(self)
Test if communications have completed.
 
wait(self)
Wait till the communication has completed.
Method Details

test(self)

 

Test if communications have completed.

If the operation was a nonblocking send, it returns 0 if the operation has not completed, and 1 if it has.

If the operation was a nonblocking receive, 0 is returned if the operation was not completed, and a tuple containing four elements if it was completed. The four elements are: the array containing the data, the source process rank (an integer), the message tag (an integer), and the number of elements that were received (an integer).

Once a test has been successful (i.e. the operation has completed), it is no longer possible to call wait() or test() on the MPI Request object.

wait(self)

 

Wait till the communication has completed.

If the operation was a nonblocking send, there is no return value. If the operation was a nonblocking receive, the return value is a tuple containing four elements: the array containing the data, the source process rank (an integer), the message tag (an integer), and the number of elements that were received (an integer).