Información

Autor (res) Erik-Jan Lingen, Matthias Möller
Fecha de entrega Sin fecha de envío
Tiempo límite de envío Sin límite de envío

Inicia sesión

[Introduction] Example 1 : Game of Life

This material is part of the course Practical Introduction to Parallel Programming and meant for educational purposes only.


Background

Conway's game of life describes the evolution of a \(m \times n\) grid in which each cell has an associated value that is either zero or one.

The value of a cell in the next time step depends on the values of the neighboring cells in the current time step.

The neighbors of a cell \((i,j)\) are the cells \((i \pm 1, j \pm 1)\).

The initial state of the grid completely determines how the grid evolves in time.

The value of a cell transitions according to the following rules:

  • a non-zero cell becomes zero if it has less than two non-zero neighbors;
  • a non-zero cell remains non zero if it has two or three non-zero neighbors;
  • a non-zero cell becomes zero if it has more than three non-zero neighbors;
  • a zero cell becomes non zero if it has exactly three non-zero neighbors.
01-game-introduction/game_of_life.gif

Pregunta 1: Game of Life
Pregunta 2: Number of MPI processes

Specify the number of MPI processes (1-64) that should be used for running your program (mpirun -np <nproc>)

Pregunta 3: Command Line Argument

Specify the command line arguments that should be passed to your program when it is run. Arguments must be given in quotes and separated by commas. Leave this filed empty if you do not want to specify command line arguments.

Example: "1","int","arg=2" is interpreted as three arguments 1, int, and arg=2.