title>CS267/Sp1996 Assignment 2
U.C. Berkeley Department of Electrical Engineering and Computer Science
Assignment 2: Due: February 22, 5pm
Your assignment is to solve the
Sharks and Fish problems 1 and 2,
i.e. fish swimming around in an ocean subject both to external
current and gravity. You should modify 4 out of 5 existing
For extra credit, you may complete all 5 programs. Although
this is not strictly required, you are encouraged to tune
code performance, especially for poor gravity implementations.
The CM5 code is on rodin in /usr/castle/share/proj/shortcourse/wator.
Pointers to the code are here.
It is harder to test your implementation to see if you answers are
accurate in a simulation of this kind, because it is less clear what
the "right" answer is supposed to be, unlike matrix multiplication.
You should try 2 test cases:
In addition to looking at nice pictures produced by the code, and turning in
a picture of the fish after several "together and apart" cycles from Case 2,
you should time one of the CM5 programs and one of the SMP programs, and
compute the speedup and efficiency. For this, remove the I/O, and time only
the main loop of the program. Is the speedup what you expect? If not, can you
Turn in pointers to your code, some nice pictures, some measurements, and
anything else you may want to share with us.