Source-linked AI summary
Ahf: Amiga's Halo Finder
Steffen R. Knollmann, Alexander Knebe
TL;DR
Large cosmological simulations require reliable parallel halo identification, but existing approaches must handle growing data volumes without compromising results. The paper presents AHF, an MPI-parallel halo finder, and shows that careful boundary-zone selection preserves serial results while enabling scaling to billion-particle simulations.
Problem
Growing cosmological simulations require reliable parallel halo finders that can identify bound halos while handling increasingly large data files.
Method
AHF combines a halo-finding algorithm with parallel data handling and parameter studies, emphasizing boundary-zone choices that affect result reliability.
Results
With a suitable LB parameter, AHF matches serial results, achieves reasonable scaling, and scales well with increasing particle resolution, including a 1024^3 simulation.
Takeaways & Limitations
AHF provides a freely available tool for analyzing large cosmological simulations, including billion-particle datasets, when its parallel parameters are chosen carefully.
Takeaways & Limitations
Because each halo is analyzed by one CPU, massive halos can dictate speed-up and create workload imbalance in parallel analyses.
Abstract
from arXiv · showhide
Cosmological simulations are the key tool for investigating the different processes involved in the formation of the universe from small initial density perturbations to galaxies and clusters of galaxies observed today. The identification and analysis of bound objects, halos, is one of the most important steps in drawing useful physical information from simulations. In the advent of larger and larger simulations, a reliable and parallel halo finder, able to cope with the ever-increasing data files, is a must. In this work we present the freely available MPI parallel halo finder AHF. We provide a description of the algorithm and the strategy followed to handle large simulation data. We also describe the parameters a user may choose in order to influence the process of halo finding, as well as pointing out which parameters are crucial to ensure untainted results from the parallel approach. Furthermore, we demonstrate the ability of AHF to scale to high resolution simulations.
1. INTRODUCTION
Halo finding identifies density peaks and hierarchically groups particles into bound structures within cosmological simulations. The paper introduces AHF, a stand-alone successor to MHF with parallel routines for large simulation data.
- Halo-finding methods: Halo finding identifies density peaks and groups nearby dark matter, star, or gas particles into hierarchical clumps.Methods differ in how they estimate density and associate particles with peaks.
- Halo-finding methods: Friends-of-Friends links particles within a fixed linking length but can incorrectly merge separate structures through linking bridges.Its geometric criterion separates the particle distribution into isolated regions, yet fixed linking can produce undesired connections.
- Halo-finding methods: Density-based approaches include Spherical Overdensity, Denmax, HOP, BDM, VOBOZ, and Subfind, using nearest neighbours, gradients, iterative centers, or tessellations.These methods represent alternative strategies for locating density maxima and defining halo boundaries.
- Halo-finding methods: MHF uses adaptive-mesh refinement grids that trace high-density contours and naturally define halo-subhalo hierarchies across refinement levels.The grid structure supports both halo selection and substructure identification.
- Contribution: AHF is the successor to MHF, functioning within Amiga or as a stand-alone finder with parallel reading routines for large simulation data and enhanced features.The paper describes AHF’s algorithm, parallel strategy, parameter effects, artefact checks, comparisons, and scalability.
2. HALO FINDING THE Ahf WAY
Ahf identifies halos by constructing a density-tracing hierarchy of nested grids, classifying substructure, and iteratively removing unbound particles. Its parallel implementation partitions the simulation volume along a Hilbert spacefilling curve with buffer zones, while requiring careful load-balancing and boundary-zone choices.
- 2.1. Ahf: Ahf covers the simulation box with a user-sized grid, estimates particle density using TSC weighting, and recursively refines cells exceeding DomRef.The domain-grid resolution is controlled by DomGrid, while refinements use cells half the parent size.
- 2.1. Ahf: The resulting grid hierarchy traces the density field: isolated regions are identified from finest to coarser levels and linked into a nested grid tree.Branches can join when patches isolated at one level connect on the next coarser grid, producing an inside-out halo-following structure.
- 2.1. Ahf: Substructure classification proceeds from coarse to fine levels, continuing the main branch through the isolated patch containing the most particles.The classification uses particle counts when a finer level splits into multiple isolated patches.
- 2.1. Ahf: Particles are assigned to candidate halos, then unbound particles are iteratively removed while halo extent is defined from an overdensity criterion and subhalos may be truncated at higher overdensity.The bound particle lists support calculation of halo properties and production of integral, radial-bin, and particle-ID output files.
- Parallel implementation: Parallel Ahf blindly partitions the full computational volume across CPUs, using a Hilbert spacefilling curve and LB-controlled load-balancing grid.The volume is segmented into particle-balanced SFC chunks, while buffer zones reduce communication caused by objects crossing process boundaries.
- Parallel implementation: Each halo is processed by one task, so particle duplication can imbalance workloads; splitting and analysing can be separated, and LB must be chosen carefully for reliable results.The number of CPUs affects total runtime, whereas boundary-zone size has a significant influence on the reliability of derived results.
3. TESTING
Testing shows that AHF’s statistical halo properties are generally robust to grid, refinement, CPU, and boundary choices when parameters are appropriately selected. Numerical perturbations and undersized boundary zones mainly affect low-count or individual-halo results.
- Test setup: Tests use three 256^3-particle simulations with box sizes 20 h−1 Mpc, 50 h−1 Mpc, and 1.5 h−1 Gpc to vary AHF parameters.The parameter study compares serial and parallel analyses across the set-1 simulations.
- Numerical effects: 1−3 per cent deviations in mass functions and spin distributions arise from shifted particle grids, without systematic statistical bias.Low-count bins artificially amplify apparent deviations, and halos with fewer than 100 particles were excluded from the plotted spin distribution.
- Grid parameters: Domain-grid size and domain-grid refinement criterion have negligible impact, while a coarse domain grid avoids many empty cells on each CPU.The domain grid is refined nearly everywhere because the tested particle resolution and criteria rarely leave pronounced underdense regions unrefined.
- Refinement parameters: Only refinement criteria ≲3.0 ensure completeness at the low-particle-count end, while including halos with more than 100 particles makes spin distributions coincide.The most massive B1500 halo contains only 237 particles, illustrating the resolution sensitivity of low-count objects.
- Parallel parameters: Choosing a boundary size satisfying the halo extent condition makes integrated properties independent of CPU count, and the parallel version reproduces the serial results.Undersized boundaries produce differences for B20 and B50 at high LB levels, whereas B1500 remains unaffected across tested choices.
4. COMPARISON TO OTHER HALO FINDERS AND THEORTICAL PREDICTIONS
AHF mass functions agree well with BDM and SKID, while FOF shows a systematic offset; among analytical prescriptions, Tinker et al. (2008) best describes the measured function. AHF also reproduces the expected subhalo mass-function slope, supporting its use for field halos and subhalos.
- Comparison to other halo finders: AHF mass functions are incomplete below masses corresponding to 100 particles, and BDM’s sharp low-mass decline results from density-field smoothing.The BDM density field was smoothed on 10h−1kpc, approximately corresponding to a mass scale of 10^9h−1Mpc.
- Comparison to other halo finders: BDM and SKID mass functions match AHF within the error bars, whereas FOF exhibits a systematic offset.The FOF discrepancy is expected from differences between FOF and spherical-overdensity mass definitions.
- Theoretical predictions: Theoretical mass-function prescriptions use different halo overdensities, including ∆=178 for Sheth and Tormen and ∆=200 for Reed and Warren.These differing calibrations can affect comparisons with AHF measurements.
- Theoretical predictions: Tinker et al. (2008) gives an excellent description of the observed mass function, while Jenkins et al. (2001) provides a good description but overestimates intermediate-mass halos.Other formulas adequately describe intermediate masses but overestimate halo numbers at the high-mass end.
- Subhalo mass function: A power-law fit to AHF’s cumulative subhalo mass function yields α=0.81, within the previously reported range α=0.7...0.9.This confirms AHF reproduces earlier subhalo mass-function findings and supports its operation as a universal halo finder.
5. RESULTS
AHF’s results show that parameter choices can preserve derived properties while refining completeness, but parallel performance is limited by load imbalance and duplicated boundaries. The method tracks expected N log N scaling with increasing particle resolution, while single-CPU execution becomes infeasible for larger simulations.
- Parameter study: DomGrid and DomRef negligibly affect derived properties, and CPU count has no impact when the LB level is adequate.RefRef can force completeness of the mass function to small particle counts, at the cost of increased runtime and memory relative to RefRef = 5.0.
- Load balancing: Increasing CPUs reduces runtime but widens the spread between fastest and slowest tasks, most strongly for B20’s halo analysis.The imbalance arises because one halo cannot be jointly analyzed by multiple CPUs, so the most massive halo limits achievable speed-up.
- Load balancing: Higher LB levels reduce task-time spread, but taint results by decreasing the boundary size.The spread reflects non-homogeneous particle distributions: small boxes are typically dominated by one big halo, whereas large boxes contain more similarly sized objects.
- Memory and scalability: 256^3 particles require ∼30 minutes and ∼2 −3GB on one CPU, whereas a single CPU is unfeasible for 512^3 simulations.Parallel memory scaling cannot be linear because boundary zones are duplicated; larger boxes track the ideal estimate more closely than smaller boxes.
- Scaling with problem size: The expected N log N scaling is tracked quite remarkably as particle resolution increases, although scaling is worse for smaller box sizes.The large box represents the ideal situation for AHF.
6. SUMMARY & CONCLUSIONS
AHF is a freely available, MPI-parallel halo finder that supports large simulation data and inclusion of star and gas particles. Reliable completeness and parallel results depend on refinement and load-balancing choices, while a two-stage workflow addresses runtime imbalance.
- Tool capabilities: AHF is freely available, reads Gadget and Amiga data, supports star and gas particles, and requires only five (three) parameters for parallel (serial) use.The tool is designed to handle large simulation data.
- Completeness and refinement: A refinement criterion of ≲3.0 is required for completeness of halos containing less than 50 particles, increasing memory by ∼40 per cent and runtime by a factor of 2 −3.This setting is especially relevant for high-redshift, low-resolution analyses.
- Parallel scaling: With a carefully chosen LB parameter, CPU count does not affect derived properties and AHF achieves reasonable scaling, including memory scaling for billion-particle simulations.The LB choice is therefore central to preserving untainted parallel results while scaling analyses.
- Recommended parameters: For trustworthy results for halos made up by more than 50 particles, the recommended parameters are DomGrid 64, DomRef 5.0, and RefRef 5.0.The parallel LB level should satisfy the relation given in equation 3.
- Runtime management: A two-stage approach constructs independent volume chunks with boundaries on all CPUs, dumps them to disk, and then analyzes them serially or concurrently to address runtime imbalance.This approach is important for inhomogeneous matter distributions, small box sizes, and particle counts greater than 512^3.
APPENDIX AHF’S UNBINDING PROCEDURE
AHF removes gravitationally unbound particles by computing the local escape velocity from the gravitational potential under spherical symmetry. The potential normalization and unbinding classification are recomputed iteratively for radially ordered particles, assuming truncation at rvir.
- Escape-velocity calculation: AHF identifies unbound particles using the local escape velocity vesc(r), which is directly related to the local potential φ.The procedure requires obtaining vesc(r) at each particle position.
- Potential calculation: The potential is obtained by integrating Poisson’s equation under the assumption of spherical symmetry.The derivation proceeds through successive integrations of the radial potential equation.
- Iterative unbinding: Unbound particles are removed iteratively by integrating the potential equation over radially ordered particles and re-evaluating φ0 each iteration.The initial particle assignment comes from Amiga’s adaptive mesh hierarchy.
- Iterative unbinding: The integral for the potential is evaluated assuming the halo is truncated at rvir.This truncation applies when evaluating the relevant integral.