GENGA : G ravitational E ncounters in N -body simulations with G PU A cceleration Institute for Computational Science University of Zürich Perspectives of GPU Computing in Physics and Astrophysics Roma 2014 Simon Grimm Joachim Stadel [email protected]
22
Embed
GENGA: Gravitational Encounters in N-body … · Comparison with pkdgrav and Mercury. Simon Grimm 17/22 Comparison of the energy conservation between GENGA, pkdgrav and Mercury, for
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
GENGA: Gravitational Encounters in N-bodysimulations with GPU Acceleration
Institute for Computational ScienceUniversity of Zürich
Perspectives of GPU Computing in Physics and AstrophysicsRoma 2014
Goals:Study the formation process of terrestrial planetary systems due to planetesimal dynamics.Analyze the long term evolution of (exo-)planetary systems.
Requirements: Good energy conservation over billions of time steps.Resolve close encounters accurately.Collisions between bodies are possible.
Limits:The number of massive bodies is limited to 2048 due to the close encounter handling of the algorithm.
4/22Simon Grimm
GENGA
GENGA supports 3 Computational Modes: ● Up to 2048 massive bodies
● Up to 1 million test particles
● Up to 100000 parallel small simulations
We need to study relatively small simulations, but we need a lot of them to cover a large parameter space.
All of the computation is done on the GPU to avoid memory transfer with the CPU.
Simulations run on only one node, could use multiple GPUs.
5/22Simon Grimm
Theory: The hybrid symplectic integrator
Using democratic coordinates:(Heliocentric positions and barycentric velocities)
Drift Keplerian arcsanalytical with FG
Use direct n-body integrator if K < 1
KickO(N2)
Sun Kick
6/22Simon Grimm
Close encounter pairs form groups
Rcrit = max(3 * RHill, 0.4 *dt * v)
7/22Simon Grimm
Close encounter pairs form groups
Limit of N = 2048
Rcrit = max(3 * RHill, 1.5 *dt * v)
8/22Simon Grimm
The integration scheme
No close encounter candidates With close encounter candidates
Prechecker findsCE candidates forthe next time step
Polynomialinterpolation
Parallel groupfinding
algorithm
9/22Simon Grimm
The Kick kernel
● The number of bodies is too small to usea standard N2 kernel as described in e.g. Gems 3
● We need more work to be done in paralleland perform the summations in shared memory withinone thread block.
● We need different versions of the kernel, depending onthe number of bodies.
10/22Simon Grimm
All kernels are optimized for a certain number of bodies
Find independent close encounter groups in parallel
12/22Simon Grimm
Timing of the main kernels
13/22Simon Grimm
Comparison between different GPUs
14/22Simon Grimm
Timing of the main kernelsfor the multi simulation mode
15/22Simon Grimm
Comparison between different GPUsfor the multi simulation mode
16/22Simon Grimm
Comparison with pkdgrav and Mercury
17/22Simon Grimm
Comparison of the energy conservation between GENGA, pkdgrav and Mercury, for a set of 40
simulations with 32 planetesimals.
18/22Simon Grimm
Tools in GENGA:
● Analytic Gas disc modelAdapted from Morishima et al. 2010
● Poincaré surface of section● Fraction of time spent in a-e limits
Count how much time a body spend in a specified semi-major-axis and eccentricity regime.
● a-e gridPlot how long regions in semi-major-axis and eccentricity are populated from bodies.
● Switch for exact reproduction of random rounding errors.For studying chaotic systems the order of arithmetic operations can be fixed to reproduce exact the same results