CISC 372: Parallel Programming
Fall 2001
Group Project 1
Deliverable 1 due by Friday 2pm, Sept 28.
|
Deliverable 2 due by midnight Friday, Oct 5.
|
Deliverable 3 due by midnight Thursday, Oct 11.
|
Deliverable 4 due at start of class Friday, Oct 19
|
Objectives
The objectives of this assignment are
- to become familiar with the use of
MPI synchronizing calls (reduction) and with data movement commands.
- to do so on a project that has many features in common with
real world models which demand large amounts of computation. Such
models discretize an object into cells and model the flow of
material, force, energy through the object by formulas dictating
transfers between neighboring cells in discrete time steps.
Examples of objects to which this may be applied are the atmosphere,
an ocean, an airfoil, a bridge, a chemical reaction vessel, etc.
The objectives the group collaboration are
- to produce a better product through combination of
knowledge, skills, ideas, effort of two or more people.
- to experience the difficulties of group efforts and find
solutions to those problems.
Software development is done by teams in the "real world".
Task
Conway's game of life is played on a 2 dimensional grid.
Life starts at time zero in a given state in which some of the
grid cells are occupied by a life form and some are empty.
A cell has 8 neighbors. Four neighbors share a common side with
the cell and four touch at a corner.
At each time step the living or empty condition of each
cell is determined by its neighbors according to the following rules.
-
If a cell is empty but has exactly three living neighbors it becomes
live in the next time step.
-
If a cell is alive it remains alive in the next time step if it
has 2 or 3 live neighbors. With 0 or 1 live neighbors it dies of
neglect. With 4 or more it dies of overcrowding.
We will play the game of life on an n by n grid
Most important values of n are near 1000, but you can
do useful testing on smaller grids. We will interpret the rules
for cells at the border with respect to the neighbors present.
A cell along
the side has 5 neighbors and a cell in the corner has 3. Another
way to say this is that it is as if there were an additional row
of always empty cells all around the grid.
You can see examples of the life game for example at the site
http://hensel.lifepatterns.net/
The game has been intensely studied and many interesting patterns
have been discovered.
Dr. Bio Logic has a grant to study how life game
populations evolve over many time steps. Bio is trying to
build evidence that the life game closely models aspects of
life around vents in the deep ocean floor.
For this purpose Dr. Logic does not need to see a display of the
evolving state of the life game, rather she requires a
report at each time step of just the triple of numbers:
( number-of-newly-born-cells, number-of-newly-dead-cells, total-current-population ).
However, you may want to write a display function of the grid for
debugging purposes.
Initially, at time step zero, print on a line the name of the file or "1/3-random"
and the total-initial-population.
Some initial configurations will be given
and also results are wanted for random patterns in which the initial
state is determined by giving each cell life with 1/3 probability.
Your program should accept either two or three command line arguments:
the grid size, the number of time steps, and a file name containing
the initial state. If the third argument is missing, a random
initial state is to be used.
Note: it is a rule that only process 0 reads the file or initializes
the initial state. Also only process 0 outputs the triple of
numbers per step. Many parallel machine environments have this
restriction that only a designated process has i/o capability and
we want our code to work anywhere MPI is available.
Deliverables:
- Deliverable 1. Due by Friday 2pm, Sept 28.
Form a group of 3, 2(favored), or 1(discouraged) people.
Be sure you have time in your
schedules in which you can meet and work together with computer access.
One person from each group email me a list of names and email addresses
of the group members. Those I do not hear from will be assigned
groups of 2 to work in.
- Deliverable 2. Due by midnight Friday, Oct 5.
Working serial code. For what size n can you do 100 time
steps in a few seconds?
- Deliverable 3. Due by midnight Thursday, Oct 11.
Working parallel code. Timing runs on a n by n grid, with
n of your choice, 100 time steps, 1 to 7 processors.
- Deliverable 4. Due at start of class Friday, Oct 19
final writeup. This includes discussion of method,
timing plot, speedup plot, efficiency plot, interpretation
and explanation of timing results, discussion of the group's
collaboration,
conclusion.