Project implementation for the course of Parallel and Distributed System at the University of Pisa 2020-2021. The project consists in the multi-threaded implementation of a Cellular Automata framework.
The implementation of this framework allows to define a grid of a Cellular Automata with its own rules considering a 8-neighbours cell for the update of each state. The framework is implemented in 3 different ways:
- Sequential
- Parallel with standard thread implementation
- Parallel using FastFlow
It implements the sequential algorithm for the execution of the Cellular Automata. It also implements the the framework to define the grid, the states and the rules of the CA.
In this implemnetations the execution of the Cellular Automata is parallelized using the C++ standard library with thread.
The last implementation uses FastFlow library to execute in parallel the CA.
More details about the project and about the results achieved using different implementations can be found in Report.
$ git clone https://github.com/Simoniuss/SPM-Project
$ cd SPM-Project/cellular_automata
$ make
./game_of_life rows columns steps pardegree
It execute #steps for a grid rows*columns with a parallel degree = pardegree
The implementation can be tested to obtain how the performances change with different parameters.
./avg_time.sh number_executions rows columns steps pardegree
The script takes the average time between number_executions executions of the algorithm.