GS 535 : Parallel tools for scientific modeling
1. Introduction
Introductory presentation (powerpoint)
Text: "Using MPI" (2nd edition), W. Gropp, E. Lusk, A. Skjellum,
MIT Press, 1999 ($45).
2. First steps with MPI
2.1 Preliminaries, compilers, programming
Programming on linux for scientific computing (last year's seminar notes)
2.2 Calculating the value of pi=3.1415... in parallel
(Example borrowed from the text book with various
hints on accessing and using the panoramix cluster).
2.3 Using send and receive
A somewhat slower introduction to Section 3.6 of the text.
3. Finite difference methods for solving partial differential equations
3.1. A one-dimensional example
Description of solution techniques
to a simple 1D Poisson problem
A few suggestions for programming exercises:
- Write a series of programs to compare the performance of Jacobi,
Red-Black Gauss-Seidel and SOR for the 1D example on grids with 3, 5, 9, 17 etc.
nodal points. Do you find similar behavior as that shown in the description?
- To investigate the properties of multigrid it is beneficial to
consider the two level problem first. Use in this case the differential
equation with homogeneous boundary conditions and right hand side
f(x)=pi*pi*sin(pi*x), which yields the analytical solution u(x)=sin(pi*x).
Develop subroutines for smoothing,
computation of the residual, restriction, interpolation and addition
and test the coarse grid correction algorithm for a fine grid
with, say, 65 grid points. Make sure you test this thoroughly! Do you
see any improvements in convergence compared to strict Red-Black Gauss Seidel?
- Develop and test a subroutine for a V-cycle. A possible way to
keep track of the solution, residual and right hand side at each level
is to 'layer' the solutions within 1D vectors and have a set of pointers
that indicate the start of the vector at each level. In our 1D example,
coarsest level has 3 nodal points and the next level has 5 points.
For this two level grid we could define an 8-element array in which
we store the coarsest grid first. We can then have a 2 element pointer
array with first entry 1 (to indicate that the information for the
coarsest grid starts at element 1) and the second entry 4 (which points
to the element at which the information for the next level starts).
This can be easily extended for multiple levels.
Test the V-cycle subroutine thoroughly for our simple problem.
- Write a program for full multigrid that uses the subroutines
for V-cycle and interpolation.
- Write a driver for the tridag subroutine for the direct solution
of a Poisson equation. Modify the subroutine for a symmetric matrix.
How does the performance of this algorithm compare to that of the
iterative methods?