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

EXERCISES (Uebungen):

 dex1.c: raw Monte Carlo (MC) procedure for I0(1). dex2.c: antithetic variates MC procedure for I0(1). dex22.c: antithetic variates MC procedure for I0(1) with shortened range (0 <= x < pi/2 instead of pi). dex3.c: control variates MC procedure for I0(1) using first 3 terms of expansion for exp(-cos(x)): phi(x) = 1 - cos(x) + 0.5*cos(x)*cos(x), even though on (0 <= x < pi) integration of the first order (cos(x)) term should vanish. This term is important for the control. Exercise 2.2: 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). Exercise 2.2, MPI version: 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).

TEST PROGRAMS:

 gausstst3.c: test program for 3 normal random number generators, including ziggurat (Section 2.5.3 and 2.5.3.1). ggl.c: general linear congruential random number generator (Section 2.5.2). ghgrng.c: Gaston H. Gonnet's polynomial RNG and simple tests (Section 2.5.2). ghgrng16.c: Gaston H. Gonnet's polynomial RNG generated 16/time (Section 2.5.2) - this needs rngheader.h . lapack.tgz: Lapack example including utility ilaenv and makefile (from Sections 2.2.2.1 and 2.2.2.2). masterFFT.c: master test/routines for binary radix FFT (complex, Section 2.4) with symmeteries. (real, real even, real odd, in Section 2.4.1). rngheader.h: header file for ghgrng16.c above zufall.c = tests and routines for two term lagged Fibonacci random number generator: modification of NETLIB package of the same name. (Sections 2.5.2 and 2.5.3).