Skip to content

Arepo Quickstart

This chapter walks you through compiling AREPO and running the official wave_1d example to verify that your environment is set up correctly — before moving on to larger simulations.

  • Install the Miniforge Conda distribution for your OS.
  • Create and activate an arepo-lab virtual environment.
  • Compile the Arepo executable using your local or HPC toolchain.
  • Run the official wave_1d example to completion.
  • Pass the included check.py validation.

Run PowerShell/Windows Terminal as Administrator:

Terminal window
wsl --install -d Ubuntu
wsl --set-default-version 2
wsl -l -v

If wsl --install only prints help text, install Ubuntu explicitly:

Terminal window
wsl --list --online
wsl --install -d Ubuntu

If the installation stalls at 0.0%, try:

Terminal window
wsl --install --web-download -d Ubuntu

Reboot if prompted, open Ubuntu, and create your Linux username/password.

Terminal window
sudo apt update
sudo apt install -y curl bzip2
curl -L -o ~/miniforge.sh \
"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh"
bash ~/miniforge.sh -b -p "$HOME/miniforge3"
source "$HOME/miniforge3/etc/profile.d/conda.sh"
conda init bash
Terminal window
conda create -n arepo-lab -c conda-forge \
python=3.11 compilers make git pkg-config \
openmpi mpi4py gsl fftw hdf5 hwloc -y
conda activate arepo-lab
which python
which mpicc
echo "$CONDA_PREFIX"

AREPO requires a C11-compliant compiler, GNU Make, Python, MPI (2.0+), and GSL. Optional libraries like FFTW3, HDF5, and hwloc are needed only when the corresponding feature flags are enabled.

Terminal window
git clone https://gitlab.mpcdf.mpg.de/vrs/arepo.git
cd arepo

If the repository requires access credentials, obtain the code through your institution’s approved AREPO distribution channel and continue from the source root.

4) Set system type and compile-time config

Section titled “4) Set system type and compile-time config”
Terminal window
cp Template-Makefile.systype Makefile.systype
cp Template-Config.sh Config.sh

Select your SYSTYPE and adjust compiler/library paths to match your machine.

Terminal window
mkdir -p ./run/examples/wave_1d
cp -r ./examples/wave_1d/* ./run/examples/wave_1d/
python ./run/examples/wave_1d/create.py ./run/examples/wave_1d/
make CONFIG=./run/examples/wave_1d/Config.sh \
BUILD_DIR=./run/examples/wave_1d/build \
EXEC=./run/examples/wave_1d/Arepo
cd ./run/examples/wave_1d/
mpiexec -np 1 ./Arepo param.txt
cd ../../../
python ./run/examples/wave_1d/check.py ./run/examples/wave_1d/

The AREPO documentation specifies that 1D examples must run in serial (-np 1).

  • check.py completes without failure.
  • Output files appear in the run directory.
  • No unresolved missing-library errors.