Issue |
A&A
Volume 678, October 2023
|
|
---|---|---|
Article Number | A73 | |
Number of page(s) | 9 | |
Section | Numerical methods and codes | |
DOI | https://doi.org/10.1051/0004-6361/202347071 | |
Published online | 10 October 2023 |
Speeding up the GENGA N-body integrator on consumer-grade graphics cards
1
Research Centre for Astronomy and Earth Sciences,
Konkoly Thege Miklos St. 15–17,
1121
Budapest,
Hungary
e-mail: rbrasser@konkoly.hu
2
University of Bern, Physikalisches Institut;
Gesellschaftsstrasse 6,
3012
Bern,
Switzerland
3
ETH Zürich, Institute for Particle Physics and Astrophysics,
Wolfgang-Pauli-Strasse 27,
8093
Zürich,
Switzerland
4
Centre for Planetary Habitability (PHAB), University of Oslo,
Sem Saelands vei 2A,
0315
Oslo,
Norway
5
University of Zürich, Institute for Computational Science,
Winterthurerstrasse 190,
8057
Zürich,
Switzerland
Received:
2
June
2023
Accepted:
5
September
2023
Context. Graphics processing unit (GPU) computing has become popular due to the enormous calculation potential that can be harvested from a single card. The N-body integrator Gravitational ENcounters with GPU Acceleration (GENGA) is built to harvest the computing power from such cards, but it suffers a severe performance penalty on consumer-grade Nvidia GPUs due to their artificially truncated double precision performance.
Aims. We aim to speed up GENGA on consumer-grade cards by harvesting their high single-precision performance.
Methods. We modified GENGA to have the option to compute the mutual long-distance forces between bodies in single precision and tested this with five experiments. First, we ran a high number of simulations with similar initial conditions of on average 6600 fully self-gravitating planetesimals in both single and double precision to establish whether the outcomes were statistically different. These simulations were run on Tesla K20 cards. We supplemented this test with simulations that (i) began with a mixture of planetesimals and planetary embryos, (ii) planetesimal-driven giant planet migration, and (iii) terrestrial planet formation with a dissipating gas disc. All of these simulations served to determine the accuracy of energy and angular momentum conservation under various scenarios with single and double precision forces. Second, we ran the same simulation beginning with 40 000 self-gravitating planetesimals using both single and double precision forces on a variety of consumer-grade and Tesla GPUs to measure the performance boost of computing the long-range forces in single precision.
Results. We find that there are no statistical differences when simulations are run with the gravitational forces in single or double precision that can be attributed to the force prescription rather than stochastic effects. The accumulations in uncertainty in energy are almost identical when running with single or double precision long-range forces. However, the uncertainty in the angular momentum using single rather than double precision long-range forces is about two orders of magnitude greater, but still very low. Running the simulations in single precision on consumer-grade cards decreases running time by a factor of three and becomes within a factor of three of a Tesla A100 GPU. Additional tuning speeds up the simulation by a factor of two across all types of cards.
Conclusions. The option to compute the long-range forces in single precision in GENGA when using consumer-grade GPUs dramatically improves performance at a little penalty to accuracy. There is an additional environmental benefit because it reduces energy usage.
Key words: methods: numerical / planets and satellites: formation / planets and satellites: dynamical evolution and stability
© The Authors 2023
Open Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This article is published in open access under the Subscribe to Open model. Subscribe to A&A to support open access publication.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.