Installation

This section contains installation instructions for users of runko. See the developer notes for a development-friendly installation.

Requirements

The software listed below is not obtained automatically and must be made available. Runko is built with CMake, which is also used to locate dependencies. Depending on the system configuration, CMake may or may not find the correct libraries automatically. See the CMake documentation for instructions on how to make CMake find the dependencies.

Note

Runko offically supports installations only to a python virtual environment. Create and activate it before proceeding with the installation:

python -m venv venv
source venv/bin/activate

Virtual environment can be deactivated with deactivate command.

Common requirements (version numbers are the ones tested to work; newer versions should also work):

  • Python >=3.11.7

  • CMake >=3.23

  • MPI

Consult your Linux distribution’s package manager for these packages.

  • LLVM 19-based C++ compiler with HIP support (tested with GCC 14 libstdc++)

  • ROCm 6.3.4

  • MPI implementation that supports GPU-aware MPI

mpi4py might have to be installed manually. The default installation, obtained automatically or with python -m pip install mpi4py, can link against a different MPI implementation than the one runko uses. This can lead to problems, so mpi4py can instead be installed manually:

MPI4PY_BUILD_MPICC=<mpi-aware C compiler> python -m pip install --no-cache-dir --no-binary=mpi4py mpi4py

Building

Runko ships a set of CMake configure presets in CMakePresets.json — one per (machine, backend) combination — so the build is driven by a single --config-settings=cmake.args=--preset=<NAME> argument. The available presets are: unix-cpu, macos-cpu, unix-hip, lumi-cpu, lumi-gpu, hile-cpu, hile-gpu.

Build and install runko with:

pip install git+https://github.com/hel-astro-lab/runko --config-settings=cmake.args=--preset=unix-hip

Note

unix-hip will use hipcc as the compiler by default.

Hint

Overriding preset variables:

Provide --config-settings=cmake.define.<VAR>=<VALUE> to CMake.

Hint

Explicitly choosing the compiler:

Provide --config-settings=cmake.define.CMAKE_CXX_COMPILER=<compiler> to CMake.

Hint

Compiling a specific git <branch> can be done with pip install git+https://github.com/hel-astro-lab/runko@<branch>

Running

The HIP backend uses GPU-aware MPI, which has to be enabled:

export MPICH_GPU_SUPPORT_ENABLED=1

Now we can test if the installed package can be imported:

python -c 'import runko'