Using MPI to write parallel programs
Although MPI is a library of 125 routines, we can already write
meaningful parallel programs using only a limited number of routines.
To illustrate MPI_Scatter and MPI_Gather,
we consider par_sum.c,
which sums the first 100 positive natural numbers
using 4 processors.
To illustrate MPI_Send and MPI_Recv,
we consider square_c,
to square p integer numbers using p processors.
Bibliography
- Marc Snir, Steve Otto, Steven Huss-Lederman, David Walker,
and Jack Dongarra:
"MPI - The Complete Reference Volume 1, The MPI Core"
second edition, Massachusetts Institute of Technology, 1998.
Online documentation:
The Message Passing Interface (MPI) standard