Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
COMPARING THE PERFORMANCE
OF C++ PARALLEL ALGORITHMS
WITH THEIR IMPLEMENTATIONS IN
HPX
REU CCT 2018
Reu student: Jean Beldunord
Mentor: Dr. Hartmut Kaiser
Overview
o The C++ parallel algorithms are part of its standard library. The C++ 17 library contains execution policy. An execution policy dictate whether a program should run in sequential parallel, or parallel unsequential.
o HPX is a general purpose C++ runtime system for parallel and distributed applications of any scale
o It’s overall purpose is to optimize on overall efficiency.
o Both the C++ 17 library and HPX contains similar algorithms, in which a performance test will be conducted to evaluate their efficiency.
Execution parameter
1. Sequence_policy – An execution policy that a parallel algorithms' execution may not be parallelized.
2. Parallel_policy – Showcase that a parallel algorithm may be parallelized
3. Parallel_unsequenced_policy - An execution policy showcasing that a parallel algorithm may be parallelized or vectored.
Algorithms’ used
1.Reduce _Parallel: The reduce algorithm returns the result of the generalized sum over the elements given by the input range [first, last
2.. Find_Parallel: The find algorithm is used to locate different instances.
Procedure
o Utilize a benchmark test with a large vector
containing different parallel algorithms.
o Ran across both HPX and C++ application on Visual
studio. Using a Pc with twelve cores.
o Used appropriate sample size, where difference are
significant with a 95% confidence interval
o Graph the results of selected algorithms’
Data
0
1
2
3
4
5
6
7
8
9
1 2 3 4 5 6 7 8 9 10Ru
nn
ing
tim
e in
M
ilis
eco
nd
s
Core(s)
Reduce Par Performance Test
HPX duration C++ 17 duration
0
2
4
6
8
10
12
1 2 3 4 5 6 7 8 9 10 11 12Ru
nn
ing
Tim
e in
m
illi
seco
nd
s
Core(s)
Find Par Perfomance Test
HPX duration C++ 17 duration
HPX hyperthreading
PC Model
Machine version: Processor Intel(R) Core(TM) Xeon (R))3-6100U CPU @ 2.93GHz, 2301 MHz, 2 Processors,RAM:24.0 GB
Conclusion
From the collected results, it is clear to see there is some sort of consistency from the C++ 17 portion when running on number of cores. HPX gives the user the ability to change the number of cores used. On both instances, HPX almost performed at perfect scaling. In general, both applications performed significantly at the same level.
References
o Filipek, Bartlomiej. “Examples of Parallel Algorithms From C++17.” Bartek's Coding Blog, 25 June 2018
o Stellar Group. “HPX Documentations.” HPX 1.2.0, 2011, stellar-group.github.io/hpx/docs/html/hpx.html.
Acknowledgement
o Work supported by the National Science Foundation (NSF) award #ACI-1560410.
o A special thanks To Adrian Serio & the rest of the Stellar Group team.
Questions?