The code for this exercise is in the code/add_numbers subdirectory
of the repository.
We’ll be working in the openmp subdirectory.
Working from the repository
If you have committed your changes on branches for the previous
exercises, just checkout the main branch again and create a new
branch for this exercise.
Experiment with different loop schedules. Which work best? Which work
worst?
Exercise
Produce a strong scaling plot
for the computation as a function of the number of threads using the
different schedules you investigated.
Don’t forget to do this on a compute node (submit a job script
with sbatch) to avoid timing variability.
What do you observe?
Solution
This is what I get for some different schedules when computing on a
vector of one million numbers, I did not run multiple times to avoid
timing variability.
Strong scaling of OpenMP parallelisation of add_numbers with different schedule choices.