CMSC 714 – High Performance Computing

Fall 2010 - Programming Assignment

Due Thursday, Sep 23, 2010 @ 5:00 PM

The purpose of this programming assignment is to gain experience in parallel programming and MPI. For this assignment you are to write a parallel implementation of a program to simulate the game of life.

The game of life simulates simple cellular automata. The game is played on a rectangular board containing cells. At the start, some of the cells are occupied, the rest are empty. The game consists of constructing successive generations of the board. The rules for constructing the next generation from the previous one are:

    1. death: cells with 0,1,4,5,6,7, or 8 neighbors die (0,1 of loneliness and 4-8 of over population)
    2. survival: cells with 2 or 3 neighbors survive to the next generation.
    3. birth: an unoccupied cell with 3 neighbors becomes occupied in the next generation.

For this project the game board has finite size. The x-axis starts at 0 and ends at X_limit-1 (supplied on the command line). Likewise, the y-axis start at 0 and ends at Y_limit-1 (supplied on the command line).

INPUT

Your program should read in a file containing the coordinates of the initial cells. Sample files are located life.data.1 and life.data.2. You can also find many other sample patterns on the web (use your favorite search engine on "game of life" and/or "Conway"). The correct output for these files is located in life.data.1.out and life.data.2.out.

Your program should take four command line arguments: the name of the data file, the number of generations to iterate, X_limit, and Y_limit.

OUTPUT

Your program should print out one line (containing the x coordinate, a space, and then the y coordinate) for each occupied cell at the end of the last iteration. The output should go to standard output, and no additional output should be sent to standard output.

HINTS

The goal is not to write the most efficient implementation of Life, but rather to learn parallel programming with MPI.

Figure out how you will decompose the problem for parallel execution. Remember that MPI (at least the mpich implementation) does not have great communication performance and so you will want to make message passing infrequent. Also, you will need to be concerned about load balancing.

One you have decided how to decompose the problem, write the sequential version first.

WHAT TO TURN IN

You should submit your program and the times to run it on the input file final.data (for 1, 2, 4, 8, and 16 processes).

You also must submit a short report about the results (1-2 pages) that explains:

    • what decomposition was used
    • how was load balancing done
    • what are the performance results, and are they what you expected

Using MPI

To get the login for your class account, use a web browser to go to grades.cs.umd.edu, and login using your campus directory ID.  Once logged, it select the option to get your class account.

See the separate file http://www.cs.umd.edu/~hollings/cs714/f10/brood.html for information on using the cluster.

COMMAND LINE ARGUMENTS

The command line arguments should be:

       life < input file> <# of generations> < x limit> < y limit>

The number of processes is specified as part of the mpirun command.

GRADING

The project will be graded as follows: 

Item

Pct

Correctly runs on 1 processor

15 %

Correctly runs on 16 processors

40%

Performance on 1 processor

15%

Speedup of parallel version

20%

Writeup

10%

ADDITIONAL RESOURCES

For additional MPI information, see http://www.mpi-forum.org (MPI API) and http://www-unix.mcs.anl.gov/mpi (for MPICH)

For more information about using the Maryland cluster PBS scheduler, see http://umiacs.umd.edu/labs/LPDC/classguide.htm.
This page needs to be updated (path names are not correct for the current Linux environment), which should happen soon.