gevolution 2.0: GPU-accelerated relativistic N-body simulations for cosmology
summary
The gist
High-performance computing is increasingly dominated by hardware acceleration using Graphics Processing Units (GPUs) to take advantage of this long-term trend The new version 2.0 of gevolution…
In short
gevolution 2.0 introduces a GPU-accelerated method for relativistic N-body simulations in cosmology. It uses MPI, OpenMP, and CUDA to parallelize computations across distributed memory systems and GPUs. The new implementation efficiently handles particle operations on the GPU while maintaining strong scaling for particle updates, showing competitive performance against state-of-the-art codes like Gadget-4.
Key concepts
- Parallelization Layers
- The code uses three levels of parallelism: MPI for distributing work across multiple computers (scalability), OpenMP on each computer's CPU cores for shared memory tasks, and CUDA to offload intensive calculations entirely onto the GPU. This layered approach balances performance across different hardware configurations.
- Particle-Mesh Operations on GPU
- Particle handling was rewritten for parallel efficiency. Each thread block processes a row of particles along one axis (x), and operations like particle kick are embarrassingly parallel, running independently on the device. Particle drift uses specialized CUDA sorting algorithms to efficiently reorder particles.
- Weak-Field General Relativity Solvers
- The gravity solvers are based on a weak-field description of general relativity, utilizing the Poisson gauge suitable for cosmology. They solve coupled linear partial differential equations using a predictor-corrector loop, treating nonlinear source terms from previous time steps to speed up the evolution.
- Performance Scaling
- Strong scaling tests show that particle updates (drift and kick) achieve near-perfect scaling, meaning solution time decreases proportionally as more processing elements are added. This indicates excellent efficiency for parallelizing the core N-body dynamics.
Terminology used across episodes
This episode discusses
- gevolution 2.0: GPU-accelerated relativistic N-body simulations for cosmology · Paper Radio
- Latfield2: A c++ library for classical lattice field theory
- Effective Field Theory of Large Scale Structure and Newtonian Motion Gauges
- KGB-evolution: a relativistic N-body code for kinetic gravity braiding models
The paper
gevolution 2.0: GPU-accelerated relativistic N-body simulations for cosmology · Read on arXiv
Julian Adamek, Øyvind Christiansen
Institut für Teilchen- und Astrophysik, ETH Zurich · Institut für Astrophysik, University of Zurich · Département de Physique Théorique, University of Geneva · CEICO, Institute of Physics of the Czech Academy of Sciences
High-performance computing is increasingly dominated by hardware acceleration using Graphics Processing Units (GPUs). To take advantage of this long-term trend, we implement a major overhaul of the parallelisation approach in the relativistic particle-mesh N-body code gevolution. The new version 2.0 of gevolution employs three layers of parallelisation: MPI for scalability on a distributed memory system, shared memory parallelisation on each MPI rank using OpenMP, and offloading all compute intensive tasks to GPUs using CUDA. The code also includes many new features that have been developed over the past years. We provide an overview of the code structure and show key performance benchmarks. The public release of gevolution 2.0 can be found at https://github.com/gevolution-code/gevolution-2.0. We also release a GPU-ready version of the LATfield2 library which provides the parallelisation backend, available at https://github.com/gevolution-code/LATfield2.
Transcript
Introduction to the show: ident: Astrophysics. The day in astrophysics: observations, models and what the data forces.
Vera: We're looking at the paper: "gevolution 2.0: GPU-accelerated relativistic N-body simulations for cosmology".
Title and authors: Vera: So, we're looking at the paper titled "gevolution two point zero: GPU-accelerated relativistic N-body simulations for cosmology" by Adamek and Christiansen, and it’s about a major overhaul of their existing code <ref:2607.17929#pg1,gevolution 2.0: GPU-accelerated relativistic>.
Jocelyn: It sounds like they're taking a code that already handles relativistic N-body simulations and making it run on GPUs to handle the heavy lifting, which is what we see happening in high-performance computing now.
Subrahmanyan: Specifically, they’re adding three layers of parallelization: MPI for scaling across different computers, OpenMP for shared memory on each computer, and CUDA to move all the intensive calculations onto the GPUs.
Vera: That GPU offloading is key because it lets them use the most powerful hardware available today, like those Nvidia Grace Hopper two hundred superchips on some HPC systems <ref:2607.17929#pg1>.
Jocelyn: And they made a specific design choice there: they decided to put all the compute-intensive tasks onto the GPU using CUDA, while keeping things in a different place for some calculations.
Subrahmanyan: They specifically decided that all particlemesh operations should be moved to the GPU side, but fields in Fourier space can stay on the CPU memory.
Vera: That makes sense from a performance standpoint because it balances the capabilities of the different parts of their system—the CPU and the GPU.
Jocelyn: And they rewrote the particle handler entirely because their old way of doing things with doubly-linked lists was creating irregular memory access patterns that were bad for parallelization.
Subrahmanyan: So, in CUDA, each thread block is set up to process one row of the mesh along the x direction, and those blocks then cover a two dimensional array over the y and z directions.
Vera: That structure sounds like a good way to handle that particle data in parallel on the GPU.
Jocelyn: They focus on three main operations: particle-mesh projection, particle kick, and particle drift.
Subrahmanyan: Particle kick is described as embarrassingly parallel because each individual particle update can be done completely on the device side.
Vera: That sounds like a huge win for speed if you can do that independently for every particle.
Title and authors: Jocelyn: Then there's the particle drift, which involves sorting particles back into rows after the update, and they use parallel sorting algorithms called cub::DeviceRadixSort and cub::DeviceSegmentedSort from the CUDA Core Compute Libraries to handle it.
Subrahmanyan: Moving those sort operations onto the GPU is a big step because sorting can be quite computationally intensive on a CPU.
Vera: Now, shifting gears to the physics, they’re using gravity solvers based on a weak-field description of general relativity, which they say works well in cosmological settings due to something called the Poisson gauge.
Jocelyn: They use the full Hamiltonian constraint equation which shows two main contributions to spacetime curvature: the curvature scalar on a constant time hypersurface and the extrinsic curvature related to how things are foliated.
Subrahmanyan: To compute metric perturbations, they employ a predictor-corrector loop where linear terms are collected and treated as a source for coupled linear partial differential equations.
Vera: And they’re smart about this because they say the evolution of the potentials is slow enough that the initial guess for the nonlinear source term can come from the previous time step, which avoids needing actual loop iterations.
Jocelyn: That suggests a very efficient way to handle those complex relativistic equations without slowing down everything to a crawl.
Subrahmanyan: The performance benchmarks were run on an HPE Cray EX254n system with four Nvidia Grace Hopper two hundred superchips per node, using four MPI ranks per node with each rank having one GPU and seventy two OpenMP threads <ref:2607.17929#pg1>.
Vera: And the results showed that particle updates, specifically the drift and kick operations, achieve near perfect scaling when they test strong scaling.
Jocelyn: They also found that parts relying on the distributed three dimensional Fourier transform follow an excellent power law relationship during those tests.
Subrahmanyan: The total data volume written to disk for a simulation with one thousand eighty-eight particles and one thousand eighty eight mesh points was four hundred gigabytes.
Vera: When they compared their new GPU implementation to Gadget-four the new GPU version showed a performance gain of about four point five times <ref:2607.17929#pg1>.
Jocelyn: The authors conclude that the relativistic framework they implemented in gevolution is very competitive with what’s currently state of the art in N-body simulations.
Title and authors: Subrahmanyan: It seems like this GPU implementation offers a very performant alternative to tree based N-body methods, especially when you consider models where the equations are formulated using a field language and solved on a discrete mesh.
Vera: That’s interesting because they also noted that at large scales, gevolution and Gadget-four agree almost perfectly in their comparison of the matter power spectrum <ref:2607.17929#pg1>.
Jocelyn: But they did see a slight, sub percent deficit in power when comparing to PKDGRAV3, which they attribute to the behavior of the tree algorithm relative to the particle-mesh approach.
Subrahmanyan: They also pointed out a limitation: because gevolution uses a uniform mesh and doesn't have adaptive force resolution, you start seeing a suppression of power as you get close to the Nyquist limit of that uniform mesh.
Vera: So, even though it’s fast and scalable, if your scientific question requires very fine detail at short scales, that lack of adaptive resolution might become an issue.
Jocelyn: The overall picture is that this new GPU implementation provides a fast and scalable computational tool for relativistic N-body simulations in cosmology.
Subrahmanyan: It opens up possibilities for treating arbitrary relativistic sources of stress energy consistently by using a pure particle-mesh algorithm with fixed resolution on a discrete mesh.
Vera: The move towards GPU implementation might pay off particularly well for models whose equations can be formulated using a field language and solved numerically on that mesh.
Jocelyn: The hope is that being able to include such dynamics in the nonlinear forward modeling of cosmological observables will ultimately help us understand the true nature of the dark sector in our Universe.
Subrahmanyan: So, for me, this work suggests that if your accuracy requirement is met, the new GPU implementation of gevolution offers a very performant alternative to tree based N-body methods.
Vera: It’s clear they’ve focused on making the particle handling efficient on the device side while keeping things organized for scaling across multiple nodes.
Jocelyn: And their comparison against Gadget-four and PKDGRAV3 gives us a concrete idea of where this new method stands in terms of raw computational speed versus accuracy trade-offs <ref:2607.17929#pg1>.
Subrahmanyan: It's a solid piece of work that shows the power of leveraging modern GPU hardware for complex cosmological simulations.
The paper's summary: Vera: So, this paper is essentially about taking their existing relativistic N-body code and giving it a serious GPU boost to handle cosmological simulations faster.
Jocelyn: Right, they’ve layered in MPI for spreading the load across different computers, OpenMP on each computer for shared memory stuff, and then CUDA to push all the heavy computation onto those graphics cards.
Subrahmanyan: The core idea they're pushing here is consistency when you're dealing with sources of stress energy that aren't just standard matter or radiation. They move everything onto a discrete mesh and use a pure particle-mesh algorithm with fixed resolution.
Vera: So, what does this actually mean for the simulations we can run? It means they can consistently treat arbitrary relativistic sources of stress energy in their cosmological models.
Jocelyn: That opens up new ways to look at things like dynamical dark energy or other complex cosmological scenarios that involve those kinds of sources.
Subrahmanyan: The authors say this GPU implementation might pay off really well for models where the equations are formulated using a field language, and you can solve the dynamics numerically on a discrete mesh.
Vera: That’s interesting because it suggests a way to handle those kinds of dynamics that might be too complex for traditional methods.
Jocelyn: They also mentioned they’re hoping this capability to include such dynamics in the nonlinear forward modeling of cosmological observables will help us figure out the true nature of the dark sector in our Universe.
Subrahmanyan: I'm looking at the performance numbers here, and they showed that strong scaling tests for particle updates, like drift and kick, actually achieve near perfect scaling.
Vera: Near perfect scaling is impressive because it means you can scale up your problem size and expect the simulation time to grow in a very predictable way.
Jocelyn: And they also found that the parts relying on the distributed three dimensional Fourier transform follow an excellent power law relationship during those tests, which is good for efficiency.
Subrahmanyan: They compared this new GPU version against Gadget-four and found a performance gain of about four point five times in their benchmark runs.
Vera: That factor of four point five is significant when you’re talking about how much faster you can get results from the same hardware setup.
Jocelyn: But they also noted a limitation with their uniform mesh approach, because as you get closer to the Nyquist limit of that mesh, the power starts to drop off.
Subrahmanyan: So, while it’s fast and scalable for fixed resolution simulations, if your science question requires very fine detail at short scales, that lack of adaptive force resolution might become an issue.
Vera: Exactly. It's a trade-off between raw speed and the level of detail you can resolve in your simulation.
Jocelyn: So this paper shows they’ve built a really fast tool for relativistic N-body simulations that's competitive with what we have now, but you gotta watch out for those resolution limits.
The paper's improvements: Tom: So, we're looking at how they suggest improving this GPU version of gevolution two point zero by making some changes to the setup and resolution.
Vera: The main thing they point out is that the current uniform mesh can cause a suppression of power as you get closer to the Nyquist limit, which is like hitting a wall with detail.
Jocelyn: That means if you need very fine detail at short scales, this current setup just won't give you it because it’s locked into that fixed grid.
Subrahmanyan: They are looking at how they can do better than just uniform resolution by introducing adaptive force resolution. That would let the simulation adjust its detail where it matters most.
Vera: Adaptive resolution is a big deal because in cosmology, different parts of the universe operate on vastly different scales, so having a fixed grid isn't always ideal for everything.
Jocelyn: If you can adapt that resolution, it means you could get much more accurate results over a wider range of cosmic structures.
Subrahmanyan: From a theoretical side, this moves them toward better modeling of the underlying physics because they can handle those varying scales more naturally within the simulation framework.
Vera: I wonder what kind of computational overhead that adaptive process adds to the overall speed we just talked about? Does it slow down the execution?
Jocelyn: They imply that while it adds complexity, they still want this to be competitive, so they’re looking for a way to make that adaptation efficient on the GPU.
Subrahmanyan: The goal here is to see if we can keep the high performance we saw in the strong scaling tests while gaining that crucial physical flexibility with adaptive resolution.
Vera: It sounds like they're trying to bridge the gap between a super-fast, uniform solver and a more physically accurate, but potentially slower, adaptive one.
Jocelyn: If they can get that adaptation working smoothly on the GPU hardware we discussed earlier, that would be a huge step for solving these kinds of complex cosmological problems.
Subrahmanyan: It really changes how we approach modeling things like the dark sector because it allows for a more nuanced look at how gravity works across different scales.
Vera: So they’re pushing the idea that this framework isn't just about raw speed, but also about gaining better physical insight through smarter resolution.
Jocelyn: And if they manage that, it makes their work even more relevant for understanding those big cosmic mysteries we've been talking about.
Conclusion: Tom: So we’re wrapping up on this talk about "gevolution two point zero: GPU-accelerated relativistic N-body simulations for cosmology."
Vera: Basically, they took their existing relativistic N-body code and put a serious GPU boost to it to make cosmological simulations run much faster.
Jocelyn: They focused on making sure that the way they handle particle data on the device is super efficient, using CUDA blocks for processing.
Subrahmanyan: The big idea is consistency when dealing with sources of stress energy that aren't standard matter or radiation, by moving everything onto a discrete mesh with fixed resolution.
Vera: So this means they can consistently treat those arbitrary relativistic sources in their cosmological models.
Jocelyn: That opens up new ways to look at things like dynamical dark energy or other complex cosmological scenarios that involve those kinds of sources.
Subrahmanyan: They also showed strong scaling tests where particle updates, specifically the drift and kick operations, achieve near perfect scaling when you test how many processing elements you use.
Vera: Near perfect scaling is impressive because it means you can scale up your problem size and expect the simulation time to grow in a very predictable way.
Jocelyn: And they found that the parts relying on the distributed three dimensional Fourier transform follow an excellent power law relationship during those tests, which is good for efficiency.
Subrahmanyan: They compared this new GPU version against Gadget-four and found a performance gain of about four point five times in their benchmark runs.
Vera: That factor of four point five is significant when you’re talking about how much faster you can get results from the same hardware setup.
Jocelyn: But they also noted a limitation with their uniform mesh approach, because as you get closer to the Nyquist limit of that mesh, the power starts to drop off.
Subrahmanyan: So while it’s fast and scalable for fixed resolution simulations, if your science question requires very fine detail at short scales, that lack of adaptive force resolution might become an issue.
Vera: Exactly. It's a trade-off between raw speed and the level of detail you can resolve in your simulation.
Jocelyn: So this paper shows they’ve built a really fast tool for relativistic N-body simulations that's competitive with what we have now, but you gotta watch out for those resolution limits.
Subrahmanyan: Overall, this work is very promising because it gives us a way to handle complex dynamics in cosmology with better performance than before.
Vera: It’s clear they’ve focused on making the particle handling efficient on the device side while keeping things organized for scaling across multiple nodes.
Jocelyn: And their comparison against Gadget-four and PKDGRAV3 gives us a concrete idea of where this new method stands in terms of raw computational speed versus accuracy trade-offs.
Subrahmanyan: The work on "gevolution two point zero: GPU-accelerated relativistic N-body simulations for cosmology" shows that this framework is a very performant alternative to tree based N-body methods when your accuracy requirement is met.
Vera: It’s clear they’ve done a lot of heavy lifting in optimizing how these massive computations run on modern hardware.
Jocelyn: And it’s exciting to see how this capability could be used for the next generation of cosmological modeling we have coming up next week.
More episodes
- The day in conversation for 2026-11-19
- Daily Summary for 2026-11-19
- 2509.02657-On the synergetic use of Ariel and JWST for exoplanet atmospheric science
- 2609.10042-Modelling Fourier filtering wavefront sensors for PSD-based methods: the AOPERA tool
- 2511.05639-Performance of the AstroPix Prototype Module for the Barrel Imaging Calorimeter at the ePIC Detector and in Space-Based Payloads
- 2610.19909-RPCA: a Resolved PSF reconstruction method for undersampled images
- 2512.03440-An Analysis of LIGO Glitches Using t-SNE During the First Part of the Fourth LIGO-Virgo-KAGRA Observing Run
- 2608.10284-Lunar Reflective Interferometry
- 2610.16633-Institutional broadening of the Japanese astronomy and astrophysics research community during 1996-2025
- Daily Summary for 2026-11-18