Text Only Login to PAWS Baton Rouge, Louisiana |
LSU Homepage
HPC RESOURCES EMPLOYMENT LOG IN SITE MAP SEARCH
homeaboutprogramprojectscyberinfrastructurenewseventscontact
  1. Bootcamp Home
  2. How to Program, Part I
  3. How to Program, Part II
  4. How to Program, Part III
  5. How to Program, Part IV
  6. How to Program, Part V
  7. exercises
  8. pyMPI tutorial
  9. Calculating PI, Part I
  10. Calculating PI, Part II
  11. Calculating PI, Part III
  12. Poogle - Web Search
  13. Mandelbrot Sets
  14. Mandelbrot, The Code
  15. Mandelbrot, The Images
  16. Conway's Life, Part I
  17. Life Code Listing
  18. Conway's Life, Part II
  19. MPI Life Code Listing

Conway's Life, Part II

We use something called "ghost zones" to help us split up the calculation of the game of life across several processors.

In the image, the gold color cells belong to and are updated by proc 0. The beige cells are owned and updated by proc 1.

Since the calculation at each cell in the game of life depends on the contents of neighboring cells, proc0 keeps a copy of the beige cells from proc 1. It uses those values to update the gold cells. These copied cells are the "ghost zones."

After each update, proc 0 and proc 1 exchange data -- proc 0 sends the values it has for the gold cells to proc 1, and proc 1 sends the values it has for the beige cells to proc 0.

In this way, all the cells of the board can get updated and the work of updating is distributed. This basic technique is employed in many different scientific applications.

LSU Homepage