Skip to content

Comparing performance of sequential vs OpenMP-based vector element sum.

License

Notifications You must be signed in to change notification settings

puzzlef/vector-sum-openmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comparing performance of sequential vs OpenMP-based vector element sum.


Adjusting OpenMP schedule

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.


Comparison with Sequential approach

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.




References