Installing dependencies#

For compiling SeisSol, you will need the following dependencies during build:

  • A C++17-capable compiler. The following work:

    • GCC (>= 9.0; tested: 13.2)

    • ICX (tested: 2024.2)

    • Clang (tested: 18, 19)

    • NVHPC (tested: 24.09; currently still slow!)

    • Cray CE (however: no commthread support; needs SEISSOL_COMMTHREAD=0)

    • ICC 2021.9 (except v1.3.0; v1.3.1 will work again)

  • CMake (>= 3.20)

  • Python (>= 3.9)

    • numpy (>= 1.12.0)

    • setuptools (>= 0.61.0)

(the CI currently verifies the build against GCC 13.2, Clang 19, ICX 2024.2, and NVHPC 24.09)

Additionally, you need the following libraries:

  • MPI (Support for MPI Standard >= 2.2)

  • Eigen (>= 3.4)

  • Hdf5 (>= 1.8, parallel)

  • easi (>= 1.5)

  • (optional, recommended) a code generator

    • libxsmm (== 1.17 if using inline-assembly (LIBXSMM); otherwise >= 1.17 (LIBXSMM_JIT))

    • PSpaMM

  • (optional, recommended) a mesh partitioning library

    • ParMETIS (needs METIS and sometimes GKLib to be installed as well)

    • ParHIP

    • PT-SCOTCH

  • (optional, recommended) Netcdf (>= 4.4)

  • (optional, recommended) ASAGI

All dependencies can be installed automatically with spack or manually. For the maximal performance and functionality, we always recommend installing all optional dependencies. (they can be skipped when pursuing a purely minimal installation)

For the GPU version, the following packages need to be installed as well:

  • A GPU runtime model.

    • CUDA (>= 11.8) for NVIDIA GPUs

    • ROCm with HIP (>= 6.0.0) for AMD GPUs

    • SYCL: either AdaptiveCpp (>= 23.10) or DPC++; for Intel, AMD, NVIDIA, or other GPUs (note: SYCL was mandatory up to including SeisSol 1.3.0)

  • gemmforge (>= 0.0.218, for NVIDIA, AMD and Intel GPUs)

  • chainforge (>= 0.0.3, for NVIDIA and AMD GPUs)

Installation with Spack#

The Spack repository contains seissol as a package which automatically installs all necessary dependencies. All relevant build parameters are mapped to Spack variants; and architecture information is mostly inferred automatically—as known by Spack.

In case you work on a cluster with an older Spack version which does not have SeisSol as a package yet, we also provide an out-of-tree dependency setup environment under SeisSol/seissol-spack-aid as seissol-env. See for reference our documentation on how to compile seissol-env on SuperMUC-NG, Shaheen (Cray system) and Frontera. However, seissol-env is deprecated; we strongly advise switching to the upstream Spack package instead.

Manual installation#

We recommend setting up a folder on your system which will contain the build files for all dependencies. For example, do mkdir ~/seissol; cd seissol.

In _all_ cases before building something manually, make sure to check the installed module files. That is, type module avail and look for the software you want to use. Type module load NAME to load the respective software (with NAME being the name of the software, including the text after the slash, e.g. module load cmake/4.2.0).

However, in some cases, the modules may be incomplete. Check that especially when using NVHPC, or the components for building AdaptiveCpp (LLVM, Boost).

Setting helpful environment variables#

Create a file setup.sh with the following enviroment variables. The following script assumes that you use the folder ~/seissol for building—adjust to your actual location.

# Set your compiler, e.g., for the Intel compiler
# source /opt/intel/compiler/VERSION/bin/compilervars.sh intel64
# or
# export CC=icx
# export CXX=icpx

# write the path here which you created your directory in (you can figure it out via the `pwd` command)
# here, $HOME/my-seissol-installation is used as an example; customize to your likening
export SEISSOL_BASE=$HOME/my-seissol-installation

export SEISSOL_PREFIX=$SEISSOL_BASE/local
export PATH=$SEISSOL_PREFIX/bin:$PATH
export LIBRARY_PATH=$SEISSOL_PREFIX/lib:$SEISSOL_PREFIX/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=$SEISSOL_PREFIX/lib:$SEISSOL_PREFIX/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$SEISSOL_PREFIX/lib/pkgconfig:$SEISSOL_PREFIX/lib64/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=$SEISSOL_PREFIX:$CMAKE_PREFIX_PATH
export CMAKE_INSTALL_PREFIX=$SEISSOL_PREFIX
export CPATH=$SEISSOL_PREFIX/include:$CPATH
export C_INCLUDE_PATH=$SEISSOL_PREFIX/include:$C_INCLUDE_PATH
export CXX_INCLUDE_PATH=$SEISSOL_PREFIX/include:$CXX_INCLUDE_PATH
export EDITOR=nano # or e.g. vi,vim

# run "source ~/my-seissol-installation/setup.sh" to apply environment to the current shell

Required dependencies#

We assume that you have a compiler already installed. The same goes for a suitable Python installation. You will also need CMake in version 3.20.0 or above. Most likely, you system will already have a version of CMake installed; however, you may have to load a module to get a new enough version.

If you do not have CMake in a new enough version available, you may also install it manually into your folder as follows. (NOTE: you will need to adjust the x86_64 on ARM machines; as e.g. using NVIDIA Grace or Vera)

(cd $(mktemp -d) && wget -qO- https://github.com/Kitware/CMake/releases/download/v4.2.0/cmake-4.2.0-Linux-x86_64.tar.gz | tar -xvz -C "." && mv "./cmake-4.2.0-linux-x86_64/*" "${SEISSOL_PREFIX}")

Note that you may now also use ccmake to get a terminal UI for configuring the following libraries.

Required libraries#

The following libraries need to be installed for all SeisSol CPU and GPU builds. To get a working CPU build, installing all libraries described here is enough. However, installing a GEMM generator and a graph partitioner is still recommended for better performance and better load balancing, respectively.

Installing HDF5#

If your system does not have it e.g. as a module file (type module avail | grep hdf5 to look for it), you may compile it manually with the following commands:

wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.bz2
tar -xaf hdf5-1.12.3.tar.bz2
cd hdf5-1.12.3
CPPFLAGS="-fPIC ${CPPFLAGS}" CC=mpicc CXX=mpicxx ./configure --enable-parallel --prefix=$SEISSOL_PREFIX --with-zlib --disable-shared
make -j8
make install
cd ..

Make sure to use the MPI compiler wrappers here. For the Intel compilers, you may use CC=mpiicx CXX=mpiicpx instead.

HDF5 is used for both mesh input (the PUML format, default in SeisSol) and high-order mesh output, as well as for checkpointing.

Installing Eigen#

Uf you do not have Eigen installed, you may do so manually as follows:

wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
tar -xf eigen-3.4.0.tar.gz
cd eigen-3.4.0
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$SEISSOL_PREFIX
make install
cd ../..

Eigen conveniently uses CMake as a build system for itself. It is used in SeisSol for setting up matrices and other numerical computations, and optionally, also as code generator backend for matrix chain products.

Installing Easi#

Easi is used for setting up the model parameters. It is (most likely) not already installed on your system or as a module file, as it is a more SeisSol-specific library. You can find the installation instructions for it under this link.

And with that, we’re good to go!

… or rather, we would be for just installing it. But to make SeisSol fast, we will need some additional software packages.

Additional requirements for GPUs#

For GPUs, we need to install a GPU code generator, of which there is the choice of three:

  • TensorForge (recommended for NVIDIA and AMD GPUs)

  • Tiny Tensor Compiler (recommended for Intel GPUs)

  • GemmForge, ChainForge (legacy)

Once you have at least one of these code generators installed and ready, you are set for compiling SeisSol with GPUs.

Installing TensorForge#

A new code generator is TensorForge which works on NVIDIA, AMD, and Intel GPUs.

You may install it as a Python package; by running

pip3 install git+https://github.com/SeisSol/TensorForge.git

Installing Tiny Tensor Compiler#

A code generator for Intel GPUs (as e.g. used in SuperMUC-NG Phase 2). Written by Intel, it is the recommended code generator for them.

To install it, follow the instructions in its documentation.

Installing GemmForge, ChainForge#

The GPU code generators are called GemmForge and ChainForge. Conveniently, they come as Python packages and can be installed with the following commands.

pip3 install git+https://github.com/SeisSol/gemmforge.git
pip3 install git+https://github.com/SeisSol/chainforge.git

Note that ChainForge is optional, but highly recommended for AMD and NVIDIA GPUs. However, it does currently not support code generation to SYCL.

Installing SYCL (optional for AMD and NVIDIA GPUs)#

SYCL is currently necessary for non-NVIDIA and non-AMD GPUs; but already included into your oneAPI (ICX/ICPX) installation when compiling for Intel GPUs.

You can also use AdaptiveCpp as SYCL distribution instead for all architectures; replacing CUDA, HIP, or the oneAPI SYCL distribution.

Compiling SeisSol#

And with that, we’re ready to compile SeisSol itself. For that, proceed to the next page Compiling SeisSol.