Comparing performance of sequential vs OpenMP-based vector element sum.
In this experiment (adjust-schedule), we sum together all values of a
floating-point vector x
, with number of elements from 1E+6
to 1E+9
using OpenMP. We attempt each element with various OpenMP schedule
configs, running each config 5 times to get a good time measure. Sum here
represents any reduce()
operation that processes several values to a single
value. Our results indicate a schedule-kind of auto
/guided
to be suitable.
In this experiment (compare-sequential, main), we compare the performance
between finding Σx
using a single thread (sequential) or OpenMP. While
it might seem that OpenMP method would be a clear winner, our results
indicate it is dependent upon the workload, i.e., from 10⁵
elements, OpenMP
approach performs better than sequential. All outputs are saved in gist.
Some charts are also included below, generated from sheets.
- Parallel for loop in openmp
- What's the difference between “static” and “dynamic” schedule in OpenMP?
- Git pulling a branch from another repository?