We will start with an introduction to the programming options covered in this module:
Deadlock
Deadlock is an often-encountered situation in parallel processing, resulting when two or more processes are in contention for the same set of resources. In communications, a typical scenario involves two processes wishing to exchange messages, but both trying to give theirs to the other while neither is yet ready to accept one. A number of strategies will be described to help insure against this sort of thing occurring in the application.
Checking and acting on communications-"state"
When involved in non-blocking transactions, the calls wait, test, and probe make it possible for the application to query the status of particular messages, or to check on any that meet a certain set of characteristics, without necessarily taking any completed transactions out of the queue.
Checking the information returned from a transaction (status) allows the application to, for example, take corrective action if an error has occurred.
Using special parameters for special cases
-
Wildcards - MPI_ANY_SOURCE and MPI_ANY_TAG
Use of these calls can allow the receiving process to specify receipt of a message using a wildcard for either the sender or for the kind of message.
-
Null Processes and Requests
Special null parameters can simplify applications with regular data structures.