HPC Project 5


Overview

In this two week project, we want to accomplish several things: To do so, we'll provide you with a sequential program that generates the Mandelbrot Set. Your assignment is to "parallelize it" and use MPI's collective communications operations, as appropriate.

Exercise

Each pixel of the Mandelbrot Set can be computed independently, making them ideal candidates for parallel computation.

Save a copy of display.h, display.c, mandel.c, and Makefile. Study the source code in mandel.c, run it, and compare its behavior with its source code until you understand how it is doing what it's doing.

Homework

mandel.c draws the Mandelbrot Set using MPE graphics. However, a single process (i.e., process 0) is doing all the work.

Part I. Rewrite the program, using the domain-composition model to "parallelize" it. That is, write a version of the program in which each PE uses its rank to determine which rows it should compute. Issue: Can individual PEs write to the graphics window in parallel (the way individual PEs wrote to the console in the circuit program)?

In other words, make this program as embarrassingly parallel as possible. Minimize the number of transmissions between PEs, and think carefully about how to make this program run as fast as possible for a given number of PEs.. Does the order in which you compute the rows make any difference?

Part II. Then write a second version of the program, this time using the processor farm approach, in which you "farm out" the computation by rows. Your "master" process should send out a row number and receive back WINDOW_SIZE integers from each "slave".

Once you have both of your programs working, add code to time the computation of the Mandelbrot Set, excluding any user-I/O. Thoroughly test your code's correctness in the U-lab; then scp it to dahl for actual execution. Record and chart your timing results for 1, 4, 8, 16, and 32 PEs.

Extra Credit: MPE Graphics and Event-Handling

For extra credit:

Hand In


Up to the HPC Homework Page

Up to the Calvin HPC Course Page


This page maintained by Joel Adams.