Table of Contents
Fetching ...

Mercury-Opal: the GPU-accelerated version of the n-body code for planet formation Mercury-Arxes

Paolo Simonetti, Diego Turrini, Romolo Politi, Scigé J. Liu, Sergio Fonte, Danae Polychroni, Stavro Lambrov Ivanovski

TL;DR

Mercury-Opal introduces a GPU-accelerated OpenACC port of the Mercury-Arxes n-body code to enable detailed planet-formation simulations with fully interacting bodies. The authors port five major loop blocks to the GPU while keeping the Bulirsch-Stoer-based close-encounter handling on the CPU, achieving up to a 2.2x wall-time speedup over the CPU serial run and a ~16x relative speedup when normalizing to a 1-body case. They provide extensive profiling and performance measurements, show careful data management between host and device, and validate energy conservation over long integrations, confirming numerical stability and physical fidelity. The work demonstrates that GPU acceleration, even with partial offloading and careful data handling, can substantially improve throughput for complex n-body planetary formation simulations and offers a portable, cross-platform path via OpenACC for broad community use.

Abstract

Large n-body simulations with fully interacting objects represent the next frontier in computational planetary formation studies. In this paper, we present Mercury-Opal, the GPU-accelerated version of the n-body planet formation code Mercury-Arxes.The porting to GPU computing has been performed through OpenACC to ensure cross-platform support and minimize the code restructuring efforts while retaining most of the performance increase expected from GPU computing. We tested Mercury-Opal against its parent code Mercury-Arxes under conditions that put GPU computing at disadvantage and nevertheless show how the GPU-based execution provides advantages with respect to CPU-serial execution even for limited computational loads.

Mercury-Opal: the GPU-accelerated version of the n-body code for planet formation Mercury-Arxes

TL;DR

Mercury-Opal introduces a GPU-accelerated OpenACC port of the Mercury-Arxes n-body code to enable detailed planet-formation simulations with fully interacting bodies. The authors port five major loop blocks to the GPU while keeping the Bulirsch-Stoer-based close-encounter handling on the CPU, achieving up to a 2.2x wall-time speedup over the CPU serial run and a ~16x relative speedup when normalizing to a 1-body case. They provide extensive profiling and performance measurements, show careful data management between host and device, and validate energy conservation over long integrations, confirming numerical stability and physical fidelity. The work demonstrates that GPU acceleration, even with partial offloading and careful data handling, can substantially improve throughput for complex n-body planetary formation simulations and offers a portable, cross-platform path via OpenACC for broad community use.

Abstract

Large n-body simulations with fully interacting objects represent the next frontier in computational planetary formation studies. In this paper, we present Mercury-Opal, the GPU-accelerated version of the n-body planet formation code Mercury-Arxes.The porting to GPU computing has been performed through OpenACC to ensure cross-platform support and minimize the code restructuring efforts while retaining most of the performance increase expected from GPU computing. We tested Mercury-Opal against its parent code Mercury-Arxes under conditions that put GPU computing at disadvantage and nevertheless show how the GPU-based execution provides advantages with respect to CPU-serial execution even for limited computational loads.
Paper Structure (13 sections, 6 figures)

This paper contains 13 sections, 6 figures.

Figures (6)

  • Figure 1: The general structure of the Mercury-Ar$\chi$es code. The left hand column represent the logical structure of the code, while the right hand column reports the names of the main subroutines involved in the computation. Higher level subroutines are reported in blue and red.
  • Figure 2: The Mercury-Ar$\chi$es profile as obtained by gprof for runs with different amount of bodies over an integration time of 1000 yr. mdt_hy (in red) refers to all the operations in that subroutine with the exclusion of arxes_drift and mdt_hkce, which are plotted separately (in orange and blue, respectively); mco_x2el (in green) is called by arxes_snapshot; other (in purple) account for the sum of all the other subroutines.
  • Figure 3: Left: the walltime $t_w$ required to run Mercury-Opal with an increasing amount of fully interacting bodies $N$ when executed in parallel on the GPU or serially on the CPU. The green line refers to the executable compiled by nvfortran of the Nvidia HPC SDK and decorated with OpenACC compiler directives. The blue line refers to the executable compiled by ifx Fortran compiler of the Intel OneAPI HPC toolkit. Right: same, but times are normalized to the amount of time required to run each 1-body simulation.
  • Figure 4: Upper left: the speedup (on the left y-axis) and the relative speedup (on the right y-axis) of the GPU-parallel run of Mercury-Opal with respect to the serial run, as a function of the number of fully interactive bodies $N$. Upper right: the fraction of the total time spent in performing memory transfer operations (in red) and kernel operations (in blue), as derived by using the Nvidia Nsight Systems application. Lower panel: the timeline view in the Nsight Systems graphical user interface for a $N=1000$ case, showing how about 90% of the GPU time is spent in calculations and 10% in data transfers.
  • Figure 5: Left: evolution of the relative energy oscillation over $10^5$ yr in a $N=1$ system (left). Right: evolution over $10^4$ yr of the eccentricity of the innermost planet in a $N=10$ system, which starts in a circular orbit. Blue and green curves refer, respectively, to serial (blue) and GPU-parallel (green) runs of Mercury-Opal.
  • ...and 1 more figures