https://github.com/alchemz/parallelize_game_of_life_using_mpi
Write an MPI program to simulate Conway's Game of Life cellular automaton.
https://github.com/alchemz/parallelize_game_of_life_using_mpi
mpi
Last synced: 3 months ago
JSON representation
Write an MPI program to simulate Conway's Game of Life cellular automaton.
- Host: GitHub
- URL: https://github.com/alchemz/parallelize_game_of_life_using_mpi
- Owner: alchemz
- License: mit
- Created: 2017-11-06T21:48:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-09T21:44:26.000Z (over 7 years ago)
- Last Synced: 2025-01-07T07:16:30.470Z (5 months ago)
- Topics: mpi
- Language: C
- Homepage: https://www.youtube.com/watch?v=CgOcEZinQ2I&feature=share&list=FLwikA_t8e6TSJW-L-lAHkKw
- Size: 178 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Parallelize_Game_of_Life_using_MPI
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.
What fraction of the overall running time is spent in inter-process communication?
------------------------------------------
How does the code scale with increasing grid size and increasing MPI process concurrencies?
-------------------------------------------## Compile The Code
C: mpicc -o prog.exe helloworld.cC++: mpic++ -o prog.exe helloworld.cxx
## Final compile with optimizations
C: mpicc -o prog.exe -o2 helloworld.cC++: mpic++ -o prog.exe -o2 helloworld.cxx
# load the module purge
module purge
module load intel impi## Run the code
mpirun -n NCPUS ./prog.exe
- eg. mpirun -n 4 ./prog.exe# Run the code on cloud
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# Run the code with passing values
./prog.exe 2 3# 2. Compile the code with OpenMP support through the GNU compiler by using the -fopenmp option:
$ mpicc –fopenmp –o hello.exe hello.cFor openmpi
------------
$ module load gcc openmpiIntel MPI
------------
$ module load intel impiMPICH
-----------------
$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.
## Tutorial
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## Documents
http://www.shodor.org/petascale/materials/UPModules/GameOfLife/