This example code shows the use of simple MPI_Send/MPI_Recv operations
in implementing a simple, one-dimensional decomposition of a 2-d mesh.
The code uses
- Topologies to specify neighbors
- Arbitrary sized square mesh of size maxn by
maxn
- Takes at most maxn iterations
- Tests for convergence by comparing the 2-norm of the difference of the
current and previous iteration.
There are a number of related exercises that look at many variations of the
communication step, including overlapping communication and computation.