A Smoothed Particle Hydrodynamics Mini-App for Exascale

Aurélien Cavelan,Rubén M. Cabezón,Michal Grabarczyk,Florina M. Ciorba
DOI: https://doi.org/10.1145/3394277.3401855
2020-05-06
Abstract:The Smoothed Particles Hydrodynamics (SPH) is a particle-based, meshfree, Lagrangian method used to simulate multidimensional fluids with arbitrary geometries, most commonly employed in astrophysics, cosmology, and computational fluid-dynamics (CFD). It is expected that these computationally-demanding numerical simulations will significantly benefit from the up-and-coming Exascale computing infrastructures, that will perform 10 18 FLOP/s. In this work, we review the status of a novel SPH-EXA mini-app, which is the result of an interdisciplinary co-design project between the fields of astrophysics, fluid dynamics and computer science, whose goal is to enable SPH simulations to run on Exascale systems. The SPH-EXA mini-app merges the main characteristics of three state-of-the-art parent SPH codes (namely ChaNGa, SPH-flow, SPHYNX) with state-of-the-art (parallel) programming, optimization, and parallelization methods. The proposed SPH-EXA mini-app is a C++14 lightweight and flexible header-only code with no external software dependencies. Parallelism is expressed via multiple programming models, which can be chosen at compilation time with or without accelerator support, for a hybrid process+thread+accelerator configuration. Strong and weak-scaling experiments on a production supercomputer show that the SPH-EXA mini-app can be efficiently executed with up 267 million particles and up to 65 billion particles in total on 2,048 hybrid CPU-GPU nodes.
Computational Engineering, Finance, and Science
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to develop a Smoothed Particle Hydrodynamics (SPH) mini - app suitable for Exascale computing infrastructure. Specifically, the goals of the paper are: 1. **Adapt to Exascale computing requirements**: With the development of computing technology, Exascale computing facilities (capable of performing 10^18 floating - point operations per second) will become possible. Existing SPH simulation codes are usually designed for specific physical scenarios, and when it is necessary to handle larger - scale problems or when the computing infrastructure changes, the parallelization, scalability, and fault - tolerance of these codes are particularly important. Therefore, the paper aims to develop an SPH mini - app that can make full use of Exascale computing resources. 2. **Inter - disciplinary co - design**: The paper emphasizes the inter - disciplinary co - design in the fields of astrophysics, fluid mechanics, and computer science. By combining the latest research results and technologies in these fields, a high - performance, scalable, and fault - tolerant SPH mini - app is developed. 3. **Optimize the parallel computing model**: In order to achieve efficient parallel computing, the paper explores multiple parallel programming models, such as MPI, OpenMP, CUDA, OpenACC, and HPX. The selection and combination of these models can be optimized for different hardware configurations, thereby improving the performance and portability of the code. 4. **Verify and extend functions**: The paper not only focuses on performance optimization but also pays attention to code verification and function extension. By implementing classic SPH equations and test cases, the correctness and reliability of the code are ensured. At the same time, the paper also discusses possible future function extensions to meet the needs of different application scenarios. ### Summary of main content - **Background and motivation**: Introduces the SPH method and its applications in multiple fields, and emphasizes the importance of Exascale computing for SPH simulations. - **Inter - disciplinary co - design**: Describes in detail how to develop an efficient SPH mini - app through interdisciplinary cooperation, combining the latest SPH methods, parallel computing technologies, and software engineering practices. - **Parallel programming models**: Explores the implementation and optimization of multiple parallel programming models, including MPI, OpenMP, CUDA, OpenACC, and HPX. - **Performance evaluation**: Through weak - scaling and strong - scaling experiments, shows the performance of the SPH - EXA mini - app in large - scale parallel computing. - **Verification and validation**: Uses the classic Rotating Square Patch test case to verify the correctness and reliability of the SPH - EXA mini - app. ### Formula display Some of the key formulas involved in the paper are as follows: - **Density calculation**: \[ \rho_a=\sum_b m_b W_{ab}(h_a) \] - **Rate of change of momentum**: \[ \left(\frac{d\mathbf{v}_i}{dt}\right)_a = -\sum_b m_b \left( \frac{P_a}{\Omega_a \rho_a^2} A_{i,ab}(h_a)+\frac{P_b}{\Omega_b \rho_b^2} A_{i,ab}(h_b) \right)+a_{AV,i,a} \] - **Rate of change of energy**: \[ \left(\frac{du}{dt}\right)_a=\frac{P_a}{\Omega_a \rho_a} \sum_b \sum_i m_b (v_{i,a}-v_{i,b}) A_{i,ab}(h_a)+\frac{1}{2} \sum_b \sum_i (v_{i,a}-v_{i,b}) a_{AV,i,a} \] - **Artificial viscous acceleration**: \[ a_{AV,i,a}=\frac{1}{2} \sum_b m_b \Pi'_{ab} \left( \frac{A_{i,ab}(h_