Scientific Computing & Visualization
Help Contact
About Accounts Computation Visualization Documentation Services

Multiprocessing by Message Passing MPI

Example 1.2 Numerical Integration with MPI Blocking Send/Receive

The major drawback of example 1.1 is the potential communication deadlock stemming from sending and receiving a message on processor 0 concurrently. Since my_int is computed on processor 0, there is no need to perform message passing for that. The elimination of message passing on processor 0 leads to a code that is no longer prone to deadlock.

For detail explanations of functions used in this example, please read MPI: The Complete Reference.

Example 1.2 Fortran code

Example 1.2 C code

Discussion

In the next example, a non-blocking point-to-point send routine is introduced to replace the blocking send. This enables any work that follows the send to proceed while the send is pending or in progress.

Example 1  | Example 1.1 | Example 1.2 | Example 1.3 | Example 1.4 | Example 1.5

Documentation
Boston University
Boston University
 
OIT | CCS | June 26, 2009  
Scientific Computing & Visualization Boston University home page Boston University home page