Skip to content

Installation Instructions for Serval

WIP: Currently sparsley documented and lacking features.

General Instructions

Release

Clone the repo into the local directory and then install with:

pip install .

For development it is recommended to do:

pip install -e '.[all]'

Testing

The currently limited tests can be run with

pytest .
Note that this requires installation with testing or all dependency tag.

Troubleshooting

For MacOS: Serval cannot be compiled with the clang compiler that is the default for MacOS because it does not support OpenMP. You need to install a GNU compiler. Find where your installation is and the gcc version and assign the CC and CXX compilers to the equivalent binaries. For example, if you are using Homebrew to install gcc-15 then export the following variables.

export CC=/opt/homebrew/bin/gcc-15
export CXX=/opt/homebrew/bin/g++-15

Euler

Release (Python 3.11.6)

Load the following modules:

module load stack/2024-0o6 gcc/12.2.0 python/3.11.6 openmpi/4.1.6

Clone the repo into the local directory and then create a virtual environment:

python -m venv --system-site-packages myenv
source myenv/bin/activate

Install serval (including the optional dependencies):

pip3 install -e '.[all]'

Release (Python 3.12.8 - preferred)

Load the following modules:

module load stack/2024-0o6 gcc/12.2.0 python/3.12.8 openmpi/4.1.6

Clone the repo into the local directory and then create a virtual environment:

python -m venv --system-site-packages myenv
source myenv/bin/activate

Install serval (including the optional dependencies):

pip3 install -e '.[all]'

Release (Python 3.13.0)

Load the following modules:

module load stack/2025-0o6 gcc/12.2.0 cmake/3.30.5 openblas/0.3.28 python/3.13.0 openmpi/5.0.5

Clone the repo into the local directory and then create a virtual environment:

python -m venv --system-site-packages myenv
source myenv/bin/activate

Install locally fftw3:

wget http://www.fftw.org/fftw-3.3.10.tar.gz
tar xf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --prefix="$VIRTUAL_ENV" --enable-shared --enable-openmp --disable-mpi CC=gcc
make -j 
make install

Add the local fftw3 installation to the environment variables:

export PKG_CONFIG_PATH="$VIRTUAL_ENV/lib/pkgconfig:$PKG_CONFIG_PATH"

Install serval (including the optional dependencies):

pip3 install -e '.[all]'

Testing

Open a terminal in a computing node in Euler:

srun --cpus-per-task=6 --pty bash 

After loading the modules and activating the virtual environment, the tests can be run with

python -m pytest .
Note that this requires installation with testing or all dependency tag.