The main goal is to master parallel programming using C++ primitives, POSIX Threads and OpenMPI.
- C++/20 primitives
- POSIX Threads
- OpenMPI
The gif shows the behaviour implemented into the posix_singlecore_scheduler file as can be seen into htop observing the PID the application is creating a thread for each core sequentially.
The gif shows the behaviour implemented into the thread_pool file as can be seen into htop the thread PID are always the same to process 100 different tasks. Use the same threads avoid the overhead introduced by creation and deletion of the threads.
Use the dockerfile to compile the C++/20 code if your system does not support it.
Please build using the following commands:
sudo docker build -t cpp20-runner .
To run:
sudo docker run cpp20-runner ./<EXECUTABLE NAME>
To stop the execution find the ID of your container using:
sudo docker ps
To stop:
sudo docker stop <CONTAINER ID>