Real initial states from the pattern files in the repository.
Overview
A C implementation of Conway's Game of Life with horizontal domain decomposition and communication across 16 MPI processes. Each process receives a contiguous band of the board and keeps five ghost rows on each edge.
Halo exchange uses MPI_Sendrecv, avoiding ordering dependencies and deadlocks between neighbor processes.
Execution flow
Process 0 reads the input file.
MPI_Bcast shares the board dimensions.
MPI_Scatter distributes row bands.
MPI_Sendrecv exchanges halos between neighbors.
Each process computes its region for the next generation.
MPI_Gather collects the board and process 0 writes the output.
make
mpirun --oversubscribe -np 16 ./life patterns/glider.txt 20 output.txt
Known constraints
The implementation requires exactly 16 processes.
The number of rows must be divisible by 16.
Each process must receive at least five rows.
Outer edges are treated as dead cells.
The project demonstrates distributed communication; it does not include a scalability benchmark.