New Features of Parallel Implementation of N-Body Problems on GPU

Authors

  • S. S. Khrapov Volgograd State University
  • S. A. Khoperskov Institute of Astronomy
  • A. V. Khoperskov Volgograd State University

DOI:

https://doi.org/10.14529/mmp180111

Keywords:

Multi-GPU, OpenMP-CUDA, GPU-Direct, Nvidia Tesla, N-body, single and double precision numerical simulation, collisionless system, gravitational instability.

Abstract

This paper focuses on the parallel implementation of a direct N-body method (particleparticle algorithm) and the application of multiple GPUs for galactic dynamics simulations. Application of a hybrid OpenMP-CUDA technology is considered for models with a number of particles N ∼ 105 ÷ 107 . By means of N-body simulations of gravitationally unstable stellar galactic we have investigated the algorithms parallelization eciency for various Nvidia Tesla graphics processors (K20, K40, K80). Particular attention was paid to the parallel performance of simulations and accuracy of the numerical solution by comparing single and double oating-point precisions (SP and DP). We showed that the doubleprecision simulations are slower by a factor of 1, 7 than the single-precision runs performed on Nvidia Tesla K-Series processors. We also claim that application of the single-precision operations leads to incorrect result in the evolution of the non-axisymmetric gravitating N-body systems. In particular, it leads to signicant quantitative and even qualitative distortions in the galactic disk evolution. For instance, after 104 integration time steps for the single-precision numbers the total energy, momentum, and angular momentum of a system with N = 220 conserve with accuracy of 10−3 , 10−2 and 10−3 respectively, in comparison to the double-precision simulations these values are 10−5 , 10−15 and 10−13 , respectively. Our estimations evidence in favour of usage of the second-order accuracy schemes with double-precision numbers since it is more ecient than in the fourth-order schemes with single-precision numbers.

Author Biographies

S. S. Khrapov, Volgograd State University

Candidate of Physico-Mathematical Sciences

S. A. Khoperskov, Institute of Astronomy

Candidate of Physico-Mathematical Sciences

A. V. Khoperskov, Volgograd State University

Doctor of Physico-Mathematical Sciences

References

Fridman, A.M. Physics of Galactic Disks / A.M. Fridman, A.V. Khoperskov. - Cambridge: Cambridge International Science Publishing, 2013.

Kennedy, G.F. The DRAGON Simulations: Globular Cluster Evolution with a Million Stars / G.F. Kennedy, Y. Meiron, B. Shukirgaliyev, T. Panamarev, P. Berczik et al // Monthly

Notices of the Royal Astronomical Society. - 2016. - V. 458, 2. - P. 1450-1465.

Khrapov S., Khoperskov A. Smoothed-Particle Hydrodynamics Models: Implementation Features on GPUs //Communications in Computer and Information Science. - 2017. - V. 793, pp. 266-277.

Smirnov, A.A. Simulations of Slow Bars in Anisotropic Disk Systems / A.A. Smirnov, N.Ya. Sotnikova, A.A. Koshkin // Astronomy Letters. - 2017. - V. 43, 2. - P. 61-74.

Comparat, J. Accurate Mass and Velocity Functions Of Dark Matter Haloes / J. Comparat, F. Prada, G. Yepes, A. Klypin // Monthly Notices of the Royal Astronomical Society. - 2017.- V. 469, 4. - P. 4157-4174.

Knebe, A. Multidark-Galaxies: Data Release and First Results / A. Knebe, D. Stoppacher, F. Prada, C. Behrens, A. Benson et al. // Monthly Notices of the Royal Astronomical Society. - 2018. - V. 474, 4. - P. 5206-5231.

Hwang, J.-S. Effects of Hot Halo Gas on Star Formation and Mass Transfer During Distant Galaxy-Galaxy Encounters / J.-S. Hwang, C. Park // The Astrophysical Journal. - 2015. - V. 805. - pp. 131-149.

Portaluri, E. The Kinematics of σ-Drop Bulges from Spectral Synthesis Modelling of a Hydrodynamical Simulation / E. Portaluri, V. Debattista, M. Fabricius, D.R. Cole, E. Corsini et al // Monthly Notices of the Royal Astronomical Society. - 2017. - V. 467, 1. - P. 1008-1015.

Khoperskov, A.V. High Resolution Simulations of Unstable Modes in a Collisionless Disc / A.V. Khoperskov, A. Just, V.I. Korchagin, M.A. Jalali // Astronomy and Astrophysics. - 2007. - V. 473. - pp. 31-40.

Gelato, S. An Adaptive Hierarchical Particle-Mesh Code with Isolated Boundary Conditions/ S. Gelato, D.F. Chernof, I. Wasserman // The Astrophysical Journal. - 1997. - V. 480. - P. 115-131.

Barnes, J. A Hierarchical O(N log N) Force-Calculation Algorithm / J. Barnes, P. Hut // Nature. - 1986. - V. 324. - P. 446-449.

Greengard, L. The Numerical Solution of the N-Body Problem / L. Greengard // Computers in Physics. - 1990. - V. 4. - P. 142-152.

Huang, S.-Y. Performance Analysis of Parallel Gravitational N- Body Codes on Large Gpu Clusters / S.-Y. Huang, R. Spurzem, P. Berczik // Research in Astronomy and Astrophysics. - 2016. - V. 16, - P. 11.

Steinberg O.B. Circular Shift of Loop Body - Programme Transformation, Promoting Parallelism. Bulletin of the South Ural State University. Series: Mathematical Modelling, Programming and Computer Software, 2017, vol. 10, no. 3, pp. 120-132. DOI: 10.14529/mmp170310

Khoperskov, A. Numerical Modelling of the Vertical Structure and Dark Halo Parameters in Disc Galaxies / A. Khoperskov, D. Bizyaev, N. Tiurina, M. Butenko // Astronomische Nachrichten. - 2010. - V. 331. - P. 731-745.

Khoperskov, A.V. Interaction between Collisionless Galactic Discs and Nonaxissymmetric Dark Matter Haloes / A.V. Khoperskov, S.A. Khoperskov, A.V. Zasov, D.V. Bizyaev, S.S. Khrapov // Monthly Notices of the Royal Astronomical Society. - 2013. - V. 431. - P. 1230-1239

Khoperskov S.A., Vasiliev E.O., Khoperskov A.V., Lubimov V.N. Numerical Code for MultiComponent Galaxies: from N-Body to Chemistry and Magnetic Fields. Journal of Physics: Conference Series, 2014, vol. 510, pp. 1-13. DOI: 10.1088/1742-

/510/1/012011

Rodionov S.A., Athanassoula E., Sotnikova N.Ya. An Iterative Method for Constructing Equilibrium Phase Models of Stellar Systems. Monthly Notices of the Royal Astronomical Society, 2009, vol. 392, no. 2, pp. 904-916. DOI: 10.1111/j.1365- 2966.2008.14110.x

Bellemana R.G., Jeroen B., Simon F., Portegies Z. High Performance Direct Gravitational N-Body Simulations on Graphics Processing Units: An Implementation in CUDA. New Astronomy, 2008, vol. 13, pp. 103-112. DOI: 10.1016/j.newast.2007.07.004

Griv E., Wang H.-H. Density Wave Formation in Dierentially Rotating Disk Galaxies: Hydrodynamic Simulation of the Linear Regime. New Astronomy, 2014, vol. 30, pp. 8-27. DOI: 10.1016/j.newast.2014.01.001

Romeo A., Falstad N. A Simple and Accurate Approximation for the Q Stability Parameter in Multicomponent and Realistically Thick Discs. Monthly Notices of the Royal Astronomical Society, 2013, vol. 433, no. 2, pp. 1389-1397. DOI: 10.1093/mnras/stt809

Published

2018-04-04

Issue

Section

Programming