Efficient Tree-based Parallel Algorithms for N-Body Simulations Using C++ Standard Parallelism

Thomas Lane Cassell, Tom Deakin, Aksel Alpay, Vincent Heuveline, Gonzalo Brito Gadeschi

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

100 Downloads (Pure)

Abstract

The Barnes-Hut approximation for N-body simula tions reduces the time complexity of the naive all-pairs approach from O(N 2 ) to O(N log N) by hierarchically aggregating nearby particles into single entities using a tree data structure. This inherently irregular algorithm poses substantial challenges for performance portable implementations on multi-core CPUs and GPUs. We introduce two portable fully-parallel Barnes-Hut implementation strategies that trade-off different levels of GPU support for performance: an unbalanced concurrent octree, and a balanced bounding volume hierarchy sorted by a Hilbert space filling curve. We implemente these algorithms in portable ISO C++ using parallel algorithms and concurrency primitives like atomics. The results demonstrate competitive performance on a range of CPUs and GPUs. Additionally, they highlight the effectiveness of the par execution policy for highly concurrent irregular algorithms, outperforming par_unseq on CPUs and GPUs with Independent Forward Progress.
Original languageEnglish
Title of host publication14th Workshop on Irregular Applications
Subtitle of host publication Architectures and Algorithms co-located with IEEE/ACM Supercomputing
PublisherInstitute of Electrical and Electronics Engineers (IEEE)
Pages708-717
ISBN (Print)979-8-3503-5554-3
DOIs
Publication statusE-pub ahead of print - 26 Nov 2024
EventWorkshop on Irregular Applications: Architecture and Algorithms - Atlanta, United States
Duration: 17 Nov 202417 Nov 2024
https://hpc.pnl.gov/IA3/

Publication series

NameSC24-W: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis
PublisherIEEE

Conference

ConferenceWorkshop on Irregular Applications
Abbreviated titleIA3
Country/TerritoryUnited States
CityAtlanta
Period17/11/2417/11/24
Internet address

Fingerprint

Dive into the research topics of 'Efficient Tree-based Parallel Algorithms for N-Body Simulations Using C++ Standard Parallelism'. Together they form a unique fingerprint.

Cite this