[Paper Review] Astrophysical Particle Simulations on Heterogeneous CPU-GPU Systems
This paper presents OTOO, a high-performance astrophysical particle simulation code optimized for heterogeneous CPU-GPU systems using the octree method. By offloading only force calculations to GPUs and employing OpenCL-based vectorized tree traversal, work partitioning, and accuracy control, OTOO achieves competitive performance—3.20 sec per timestep on 7970SB GPU—on single-node configurations, enabling large-scale simulations of white dwarf mergers with up to 4 million particles.
A heterogeneous CPU-GPU node is getting popular in HPC clusters. We need to rethink algorithms and optimization techniques for such system depending on the relative performance of CPU vs. GPU. In this paper, we report a performance optimized particle simulation code "OTOO", that is based on the octree method, for heterogenous systems. Main applications of OTOO are astrophysical simulations such as N-body models and the evolution of a violent merger of stars. We propose optimal task split between CPU and GPU where GPU is only used to compute the calculation of the particle force. Also, we describe optimization techniques such as control of the force accuracy, vectorized tree walk, and work partitioning among multiple GPUs. We used OTOO for modeling a merger of two white dwarf stars and found that OTOO is powerful and practical to simulate the fate of the process.
Motivation & Objective
- To develop a high-performance particle simulation code optimized for modern heterogeneous CPU-GPU HPC clusters.
- To address the challenge of efficiently utilizing GPU acceleration in astrophysical N-body and SPH simulations without overhauling existing tree-based algorithms.
- To enable scalable, production-level simulations of violent stellar mergers, such as white dwarf collisions, on single-node GPU-accelerated systems.
- To explore optimal task partitioning between CPUs and GPUs, particularly focusing on minimizing CPU overhead while maximizing GPU utilization.
- To demonstrate that a hybrid CPU-GPU approach with selective GPU offloading can outperform traditional MPP-based implementations in performance and efficiency for certain astrophysical problems.
Proposed method
- Adopted the octree method for efficient N-body force computation, with tree construction and traversal managed on CPUs and force calculations offloaded to GPUs.
- Implemented a linked-list-based tree traversal in OpenCL to support flexible and scalable traversal of complex tree structures, avoiding stack-based limitations.
- Used vectorized tree walks with SIMD-like operations on GPU to improve memory coalescing and arithmetic intensity during force computation.
- Applied work partitioning across multiple GPUs using a hybrid MPI-OpenMP model, enabling efficient scaling on multi-GPU nodes.
- Controlled force accuracy via adaptive softening and particle grouping to reduce computational load while maintaining numerical fidelity.
- Integrated SPH and gravity calculations within a unified framework, with separate optimization for each component based on computational intensity and data access patterns.
Experimental results
Research questions
- RQ1How can the octree method be effectively parallelized on heterogeneous CPU-GPU systems to maximize performance and scalability?
- RQ2What is the optimal task split between CPU and GPU in a hybrid system, particularly when GPU-to-CPU performance ratios vary significantly?
- RQ3Can a single-node GPU-accelerated implementation achieve performance comparable to multi-node MPP systems for large-scale astrophysical simulations?
- RQ4How does the choice of tree traversal method (e.g., stack-based vs. linked-list) impact performance and portability on GPU-accelerated systems?
- RQ5What optimization techniques—such as vectorization, work partitioning, and accuracy control—are most effective in minimizing CPU-GPU data transfer and maximizing GPU utilization?
Key findings
- OTOO achieved an average timestep performance of 3.20 seconds on the 7970SB GPU configuration, with 2.52 seconds when compiled with Intel icpc 12.1.3, demonstrating high efficiency on a single node.
- The effective GPU performance reached ~90 GFlops on 7970SB, significantly outperforming estimates from total runtime, indicating high utilization of GPU compute units.
- The gravity calculation dominated the workload (~8×10⁹ interactions), requiring ~20 flops per interaction, while SPH interactions were less intensive (~3×10⁸ interactions, ~200 flops each).
- The CPU was computationally dominant in steps 2 and 5 (0.34 and 0.54 seconds), particularly due to interpolation of large EOS tables, indicating a need for further CPU optimization.
- OTOO achieved a total simulation time of 246 hours for a 4,096,000-particle white dwarf merger on 2090HP with 4 GPUs, showing feasibility for large-scale astrophysical production runs.
- The code demonstrated good scalability on GPU-centric clusters like HA-PACS, with 4 GPUs, and outperformed prior GPU-optimized tree codes in terms of performance per unit time for N=1M uniform sphere simulations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.