Skip to content

HBTplus halo finder adapted for the FLAMINGO and COLIBRE simulations

Notifications You must be signed in to change notification settings

SWIFTSIM/HBTplus

Repository files navigation

HBT+

Implementation of the Hierarchical Bound Tracing Algorithm (HBT+) in C++, using MPI and OpenMP. Documentation is available on the wiki.

About this repository.

The version hosted in this repository was developed from a fork of the MPI branch that contained the original HBT+ code.

Several additions have been made to the code in this version, which primarily address:

  • Compatibility with SWIFT outputs.
  • Improved tracking of subhaloes in hydrodynamical and dark matter-only simulations.
  • Better domain decomposition, which was required to run on the large-scale FLAMINGO simulations.

Dependencies

Required:

  • C++ compiler with OpenMP support.
  • HDF5 library.
  • MPI library.
  • cmake.

Optional:

  • GSL if interested in computing inertia tensors.

In our main runs, we have used: GCC 13.1.0, HDF5 1.12.2, and OpenMPI 4.1.4.

Compilation

First clone this repository:

git clone https://github.com/SWIFTSIM/HBTplus
cd HBTplus

Create a directory where the HBT executable will be generated.

mkdir build
cd build

Generate the Makefile using CMake. Several options relevant to your particular setup can be chosen here, e.g. if it is a DMO or a hydrodynamical simulation, or if the gas thermal energy is accounted for when computing its binding energy. We therefore recommend using ccmake to see all the options.

ccmake ../

Once the appropiate options have been chosen, and the Makefile generated, you can compile HBT+ as follows:

make -j

Running

Once the executable has been compiled, HBT can be run as follows:

./HBT <PATH_TO_CONFIG> <START_OUTPUT_NUMBER> <END_OUTPUT_NUMBER>

<PATH_TO_CONFIG> is the path to a configuration text file containing information about the run. See configs for example configuration files to get started. <START_OUTPUT_NUMBER> and <END_OUTPUT_NUMBER> are optional arguments that are passed when a subset of the simulation outputs are analysed. For example, when restarting an HBT analysis, or when not all the simulation data is available when running HBT. If no values are specified, they default to MinSnapshotIndex and MaxSnapshotIndex, as defined in the configuration file.