Documentation & resources

Get the code

git clone --recurse-submodules \
  https://github.com/idefix-code/idefix.git idefix
cd idefix
export IDEFIX_DIR=$PWD

Requirements

Idefix is written in standard C++20 and needs no external library in serial (non-MPI). Kokkos is bundled as a submodule and compiled on the fly. For MPI parallelisation an external (GPU-aware, on GPU architectures) MPI library is required (OpenMPI, MPICH or IntelMPI). The Python interface Pydefix needs Python ≥ 3.10 with pybind11. Tested compilers include GCC ≥ 11, Intel ≥ 2022 and Clang on Intel/AMD CPUs, nvcc ≥ 12 on NVIDIA GPUs and hipcc on AMD GPUs (Mi50–Mi300).

Configure & run

cd $IDEFIX_DIR/test/HD/sod     # pick any example
cmake $IDEFIX_DIR                 # options: -DIdefix_MPI=ON, -DKokkos_ENABLE_OPENMP=ON,
                                  # -DKokkos_ENABLE_CUDA=ON / HIP, -DIdefix_RECONSTRUCTION=Parabolic, ...
make -j8
./idefix                          # serial / OpenMP
mpirun -np 8 ./idefix -dec 1 2 4  # MPI, e.g. 1x2x4 decomposition

Useful runtime flags: ./idefix -profile for the built-in profiler. For debugging, configure with -DIdefix_DEBUG=ON. Most tests in test/ can be validated against analytical or reference solutions with ./testme.py -all.

Contributing

Idefix uses the pre-commit framework and cpplint (Google C++ style). Install the hooks from the top-level directory, then just commit — the hooks will fix or flag style issues:

python3 -m pip install pre-commit
pre-commit install

Open a pull request on GitHub; CI runs the full test suite. See the contributing guide and testing pages for details.

License & citation

Idefix is distributed freely under the CeCILL license. Its data structure and algorithm derive from A. Mignone's PLUTO code (GPL), and it relies on the Kokkos ecosystem. If you use Idefix, please cite: Lesur et al. 2023, A&A 677, A9 (DOI, arXiv, ADS).