Write an MPI program to simulate Conway's Game of Life cellular automaton.
The program should take as input two values, m (the grid dimension, use an mxm grid) and k (the number of time steps).
The initial state of the system could be defined in the code. The m x m grid must be partitioned across multiple processes (i.e., each process is responsible for updating m x m/p grid values).
Use MPI_Sendrecv for inter-process communication of boundary cells. Vary the number of MPI processes, and determine running time for different values of m (e.g., m = 5000, m = 10,000) and k (maybe 10, 100).
Also, determine the time spent in inter-process communication.
C: mpicc -o prog.exe helloworld.c
C++: mpic++ -o prog.exe helloworld.cxx
C: mpicc -o prog.exe -o2 helloworld.c
C++: mpic++ -o prog.exe -o2 helloworld.cxx
module purge module load intel impi
mpirun -n NCPUS ./prog.exe
- eg. mpirun -n 4 ./prog.exe
sqsub -q mpi -n NCPUS -o output.log -r TIME -mpp RAM ./prog.exe
- eg. sqsub -q mpi -n 4 -o out.log -r 5m -mpp 200M ./helloworld.exe
./prog.exe 2 3
$ mpicc –fopenmp –o hello.exe hello.c
$ module load gcc openmpi
$ module load intel impi
$module load gcc mpich
(you can swap out the gcc compiler for pgi in the above module load commands).
You can also view all the available modules using the command "module spider". Please let me know if this takes care of your issue and if you have any additional questions.
https://www.youtube.com/watch?v=RoQJNx5npF4&list=PL1OsyWvZNuL7OUtmLRAepuIlTHCt8FATk http://extremecomputingtraining.anl.gov/files/2015/03/mlife-code-jul30-830.pdf http://www.shodor.org/media/content/petascale/materials/UPModules/GameOfLife/Life_Module_Document_pdf.pdf https://github.com/msteinkamp/parallel-game-of-life
http://www.shodor.org/petascale/materials/UPModules/GameOfLife/