HPC MPI Exercise 4: Hands-On Lab

Part I: Collective Communication

The first part of this week's exercise is to explore MPI's Collective Communications patterns, which include:

  1. The broadcast pattern.
  2. The reduction pattern.
  3. The scatter pattern.
  4. The gather pattern.
Each of these folders contains a source program that you may use to explore that pattern, and a Makefile to build the program.

Create a new folder for this week's work. Then for each pattern: create a new folder and download the source program and Makefile to that folder. Build and run the program, and compare its output to the source. Feel free to experiment with the program, until you understand how the pattern works.

When you are comfortable with each of these four patterns, continue on to Part II.

Part II: The Mandelbrot Set

The second part of this week's exercise is to explore and speed up the computation of the Mandelbrot Set, a figure discovered by Benoit Mandelbrot (the person who coined the term "fractal"). If you are not familiar with this set, take a few minutes to read the Wikipedia entry about it to get some background. You can also find videos on Youtube, such as this one, which replace technical details with more visually interesting treatments.

Each pixel of the Mandelbrot Set can be computed independently, making it an ideal candidate for parallel computation.

Create a new folder for this project, and save a copy of these files: display.h, display.c, mandel.c, and Makefile.

Use the Makefile to build the mandel program and run it as follows:

   mpirun -np 1 ./mandel
Compare its behavior with its source code until you understand how it is doing what it's doing.

When you are comfortable with how mandel.c works, you may continue to this week's project.

CS > 374 > Exercise > 04 > Hands-On Lab

This page maintained by Joel Adams.