MPI Programming Exemplars
Four examples of using MPI to build distributed programming solutions to classical problems:
- Estimating Pi using a Monte Carlo method
- Estimating an integral using the trapezoidal rule
- Odd - Even transposition sort
- Merge sort
- To study example problem solutions that use message passing.
- To study example problems that employ the reduction pattern.
- To see examples of how to time MPI programs and determine their speedup and efficiency compared to sequential solution.
Context for Use
Description and Teaching Materials
The descriptions of the problems and links to the code are in this web page:
We suggest having students copy this Google spreadsheet and fill in the times the get with different problems sizes and numbers of processors.
As an alternative, you could use a paper version of this Google doc to have students fill in their times and draw the speedup and efficiency curves.
Teaching Notes and Tips
Comment? Start the discussion about MPI Programming Exemplars