Skip to content

gevolution CPU Edition (v1.2)

An HTML-friendly, skimmable guide to building and running gevolution on CPUs. More detailed information can be found in the file manual.pdf from gevolution-1.2.

Overview

  • GR particle-mesh N-body code with MPI parallelisation (via LATfield2)
  • Fixed comoving grid (no AMR) and no baryonic hydro
  • Built to explore beyond-ΛCDM physics (massive neutrinos, phenomenological dark energy)

What’s new in v1.2

  • Light-cone output (particles + HEALPix metric maps)
  • Better CLASS interface (linear fluids option)
  • Gadget-2 snapshots can be split for very large runs

Quick start

  1. Clone: git clone https://github.com/gevolution-code/gevolution-1.2.git
  2. deps: MPI, FFTW3, GSL+CBLAS, HDF5 (parallel), LATfield2 v1.1
  3. Build: make with the flags you need (see below)
  4. Run: mpirun -np <nproc> ./gevolution -n <n> -m <m> -s settings.ini (n·m = nproc, each ≥ 2)

Build flags (common)

  • -DBENCHMARK timings; -DPHINONLINEAR include shortwave corrections (default choice)
  • -DORIGINALMETRIC revert to v1.0 scalar-potential convention
  • -DCHECK_B diagnostic spin-1 copy (extra memory)
  • -DEXACT_OUTPUT_REDSHIFTS interpolate outputs to requested z
  • -DVELOCITY coarse velocity field
  • -DHAVE_CLASS link CLASS for on the fly transfer functions
  • -DHAVE_HEALPIX enable HEALPix light-cone metric maps
  • -DICGEN_PREVOLUTION prevolution IC generator for non-cold species
  • -DH5_HAVE_PARALLEL parallel HDF5 (recommended); -DEXTERNAL_IO LATfield2 I/O server
  • Mandatory: -DFFT3D -DHDF5; newer patch flag: -DGRADIENT_ORDER=<1|2|...>

Run basics

  • Minimal: mpirun -np 16 ./gevolution -n 4 -m 4 -s settings.ini
  • Extras: -p class_precision.ini (with -DHAVE_CLASS); -i, -g for LATfield2 external I/O

Settings you actually tune

  • ICs: IC generator = basic | prevolution | read from disk
  • Templates: template file = sc1_crystal.dat (list per species), tiling factor = 16
  • Spectra: Tk file = class_tk.dat or mPk file = class_pk.dat; or run CLASS inline when linked
  • Box & grid: boxsize, Ngrid; require Ngrid/n integer and Ngrid/m even integer
  • Time step: Courant factor, move limit (non-CDM), time step limit
  • Physics: gravity theory = GR|Newton, vector method = parabolic|elliptic
  • Radiation/fluids (CLASS): radiation treatment, fluid treatment, switch delta_*, switch B ncdm, switch linear chi
  • Outputs: output path, file bases (generic, snapshot, Pk, lightcone)
  • Snapshots: snapshot redshifts, snapshot outputs = phi,B,chi,Gadget2,..., tracer factor, downgrade factor
  • Spectra: Pk redshifts, Pk outputs = phi,B,chi,hij,delta,..., Pk bins
  • Light cones: lightcone outputs, vertex, distance, opening half-angle, direction, Nside, pixel factor, shell factor, covering
  • Hibernation: hibernation file base, hibernation redshifts, hibernation wallclock limit
  • Cosmology: h, omega_cdm, omega_b, omega_fld, w0_fld, wa_fld, cs2_fld, A_s, n_s, k_pivot, T_cmb, N_ur, N_ncdm, m_ncdm, deg_ncdm, T_ncdm (Λ fixed by closure; K=0)

Outputs at a glance

  • Background log (ASCII per step): cycle, conformal age, scale factor, conformal Hubble, metric monopole, density monopole
  • Power spectra (ASCII): k [h/Mpc], P(k), σ, samples; CIC deconvolved where relevant
  • Snapshots: HDF5; optional Gadget-2 (single or multi-file)
  • Light cones: Gadget-2 particle shells; HEALPix metric shells (convert with lcmap to FITS)

Restart / hibernation

  • Write full restart with hibernation settings; resume via -s output/<base>.ini
  • Safe to tweak output paths post-hibernation; avoid physics changes mid-run

Modding cheat-sheet

  • Key headers: background.hpp, gevolution.hpp, output.hpp, parser.hpp, metadata.hpp, Particles_gevolution.hpp, radiation.hpp, ic_basic.hpp, ic_prevolution.hpp, ic_read.hpp, class_tools.hpp, tools.hpp, velocity.hpp
  • Main loop (high level): parse → build ICs → stress-energy (linear + particles) → solve metric (phi/chi/B/h) → output (bg, cones, snaps, spectra) → update particles (non-CDM subdivided) → advance time → optional hibernation
  • Add physics: define fields + stress-energy, insert before metric solve; extend parser/ICs/output if needed

Units

  • c=1; coordinates/time in box-size units; metric perturbations dimensionless
  • Store -a^3 T00, a^3 Tij, a^4 T0i; k reported in h/Mpc; Gadget units: kpc/h, 1e10 Msun/h, km/s

Patch notes (v1.2 branch)

  • 2019-08: IC fixes (particles, multi-file Gadget read)
  • 2019-11: CLASS 2.8 compatibility
  • 2020-03: Smoother light-cone velocities
  • 2021-09: Fix duplicate light-cone particles; better interpolation
  • 2022-08: CLASS 3.2 compatibility; -DGRADIENT_ORDER added

References

  • Adamek et al. 2016 (JCAP 07, 053): https://arxiv.org/abs/1604.06065
  • Adamek et al. 2017 (MNRAS 470, 303): https://arxiv.org/abs/1703.08585
  • Adamek et al. 2017 (JCAP 11, 004): https://arxiv.org/abs/1707.06938
  • Hassani et al. 2019 (JCAP 12, 011): https://arxiv.org/abs/1910.01104