Exercises and examples of Chapter 5 in P. Arbenz and W. Petersen,
Introduction to Parallel Computing, Oxford Univ. Press, 2004.

EXERCISES (Uebungen):

 Exercise 5.2 (Uebung 5.2): A Message Passing Interface program to do a Monte-Carlo integration of an arbitrary function f(x,y) on a star-shaped domain. Each point in the star has the same area as the central square. This exercise is easily parallelized for 5 CPUs, but subdivision of the center/points is necessary for more CPUs. Exercise 5.4: Matrix - vector product uebung5.4.tar: Here are a skeleton solution in C, a Makefile and a job file for the PBS queueing system. The files are wrapped up in a tar-file. (solution): Simple C program calling the parallel BLAS (PBLAS) pdgemv to compute the matrix vector product. Forming the matrix is hardwired. (variant): C program for computing the matrix vector product with big blocks as in the book.

TEST PROGRAMS/routines:

 PBLAS dot product: Computes the dot (inner) product of two vectors distributed in blocks using the PBPLAS pddot. (Section 5.3.2). PBLAS matrix product: Computes the product of two matrices distributed in blocks using the PBLAS pdgemm. MPI 2-D FFT: on complex data, n=2^m in each direction. Data are laid out in strips with y-direction vectors distributed across processors. (Sections 5.8.2 and 5.8.3). MPI 3-D FFT: 3-D FFT on complex data, n=2^m in each x,y,z direction. Data are laid out in slabs with z-direction vectors distributed across processors. (Sections 5.8.2 and 5.8.3). MPI Feynman-Kac: MPI version of MC solution to 3-D elliptic partial differential equation, (1/2) Lap u - v(x,y,z) u = 0, on an ellipsoidal domain (x*x/(a*a) + y*y/(b*b) + z*z/(c*c) <= 1).