Due: Tuesday, September 23th.
Although your simulations of Gila vegetation show promise, your parallel program is not as efficient as you would like. The problem is that some processors finish early and sit idle while others continue working. While watching the X-Files, you mull over the possibility of the earth being enslaved by aliens. In a sudden flash of insight, you realize that you can fix the load-imbalance problem by using a master/slave (manager/worker) approach. You wait for the episode to finish before racing off to your computer.
Write a parallel program to perform the same Game-of-Life (GOL) simulations that you did in programming assignment 1. As before, you will run one or more instances of the game-of-life on each processor. However, this time you won't specify in advance which instances each processor performs. Instead, you will assign instances in a dynamic fashion using the manager/worker paradigm discussed in class.
To make the coding easier (and to mimic real corporate life), your manager processor does not need to do any useful work itself, only assign out tasks to the worker bees. Thus your new code does NOT need to run correctly on 1 processor (manager only), but should give the same answers as before for all P>1, including non-power-of-two P.
What you hand in:
(1) NX = NY = 50, PROB = 0.35, N = 128, SEED = 314159
(2) NX = NY = 100, PROB = 0.28, N = 256, SEED = 271828
As before, we are looking to see that you get the correct answers and that your answers do not depend on P. Also, have your program compute the maximum and minimum number of instances of the GOL performed by any processor and include these results in the statistics print-out at the end of each run.