Home
|
Course Outline
|
Lectures
|
Homework
|
Files
HPC II – Spring 2002
Homework
Homework 5: Due Monday April 8
Solving Poisson's equation using MPI
This is a very basic domain decomposition problem.
The program
poisson_mpi.c
uses 1-D domain decomposition with non-blocking communication.
- Study the scaling behavior of this program. Modify the program so
it saves the solution to a file. Make a 3-D plot of a typical solution.
- Modify the program to another communication mode, e.g., choose
any one of
- blocking communication using MPI_Send and MPI_Recv,
or
- buffered communication using MPI_Bsend, or
- simulatneous send and receive MPI_Sendrecv,
and compare the scaling behavior. See the
Intermediate MPI example programs on the MPI web site.
- Modify any one of the above programs to use Gauss-Seidel with
checkerboard updating, and compare with the Jacobi version.
Parallel multigrid solver for Poisson's equation
- Modify any one of your programs above to use the multigrid algorithm
and study its scaling behavior.
Homework 4: Due Wednesday March 13
Ising Monte Carlo: Serial Programs
Measure the heat capacity of the 2-D Ising model lattice as a function
of number of spins N = LxL, and temperature
T. Study the singular behavior of the heat capacity near the
phase transition temperature Tc = 2.269. If
cmax(N) is maximum value of the heat capacity
per spin for given number of spins, the theoretical prediction is that
cmax(N) ~ c0 log(N).
See if you can verify this prediction and estimate the constant
c0.
Perform these measurements using the Metropolis algorithm and at least
one cluster algorithm, either Swendsen-Wang, or Wolff, and compare
the algorithmic efficiencies, i.e., number of Monte Carlo steps required
to obtain the same accuracy in the measured data.
Ising Monte Carlo: Parallel Speedup
Parallelize the Metropolis algorithm using
- MPI,
- OpenMP,
and measure the efficiency gains. See Parallel
Metropolis Algorithms in Dr. Coddington's notes.
Homework 3: Due Friday March 1
MD: Spatial Decomposition and Systolic Algorithms
For this exercise you can write your own programs (straightforward by
might need a lot of debugging time!) or use Dr. Nakano's
Parallel MD program which uses spatial decomposition, and
md_systolic.cpp.
Compare the spatial decomposition and systolic algorithms:
- Get the programs to compile and run. Experiment with compiler flags
like -O3 and -Ofast=IP27 on crosby. Do these optimizations
significantly affect performance?
- If you use pmd.c you need to modify it to include
equilibration steps with velocity rescalings every 10 or 20 steps to
obtain the desired temperature. You also need to modify eval_props()
to measure the pressure. Make sure both programs are giving
the same answers for physical quantities like temperature and pressure!
- Compare the run times and the scaling behavior of the two
algorithms for nprocs = 1, 2, 4 and maybe 8.
Homework 2: Due Wednesday February 13
Molecular Dynamics of Lennard Jones System
For this homework you can write your own programs or modify the ones
given in the Topic2 directory.
Serial Program
Consider a system of
argon atoms.
Find values of N, V, and T appropriate to the
- solid phase,
- liquid phase,
- gas phase.
Run the simulation for each of these three choices, measure the pressure
P and compare with the
experimental data.
Graphics
Learn how to run the OpenGL graphics version and make pictures of
typical solid, liquid and gas configurations.
OpenMP Paralleization
Locate the most time-consuming loops in the serial program.
Parallelize them and measure the performance gain.
Homework 1: Due Friday February 1
Monte Carlo program to compute pi
This homework exercise represents the minimal programming skills you
need to be able to complete this course.
Download the
simple Monte Carlo program from the MPI Web Site
Using MPI in Simple Programs.
Learn how to run the program and study how it scales with number of
processes (say 1,2,4,8). Also compare its accuracy with the rectangle
formula program to compute pi which was discussed in lecture.
You can use the Fortran 90 or Fortran 77 versions if you prefer.
Write an OpenMP version of this program and compare it with the MPI version.
Questions or comments:
phygons@buffalo.edu
Last updated:
Monday, 01 April 2002, 12:37:06