We use cookies to ensure that we give you the best experience on our website. You can change your cookie settings at any time. Otherwise, we'll assume you're OK to continue.

Durham University



The UCL Pandemic modelling tool used for modelling COVID-19. This is available from

Installation: you will need a compiler module, the cmake module and python3.

So, e.g. module load gnu_comp/9.3.0 python/3.6.5 cmake

This is a cmake build process:

mkdir build
cd build
cmake ../src

If using the Intel compiler, the following options can be used:

cmake -DCMAKE_CXX_COMPILER:FILEPATH=icpc DCMAKE_CXX_FLAGS:STRING="-O3 -no-prec-sqrt -no-prec-div -fp-model fast=2 -xAVX" -DOpenMP_CXX_FLAGS:STRING="-qopenmp" -DCMAKE_C_COMPILER:FILEPATH=icc -DCMAKE_C_FLAGS:STRING="-O3 -no-prec-sqrt -no-prec-div -fp-model fast=2 -xAVX" -DOpenMP_C_FLAGS:STRING="-qopenmp" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCOUNTRY:STRING=UK -DUSE_OPENMP:BOOL=ON ../src/

The regression test in tests/ will attempt to compile its own version of the code, e.g. when you run:


To avoid this, edit the file and replace the subprocess.check_call lines that call cmake with something appropriate (e.g. nothing, or a cp if copying your CovidSim from elsewhere)


Once you have compiled the code, you can run it using the data/ script.

python3 --covidsim=../build/CovidSim --datadir=./ --paramdir=param_files/ --outputdir=outputdir United_Kingdom

Batch script:

#!/bin/bash -l
#SBATCH --ntasks 16
#SBATCH -J covidsim
#SBATCH -o slurmout%J.txt
#SBATCH -e slurmerr%J.txt
#SBATCH -p cosma
#SBATCH -A durham
#SBATCH --exclusive
#SBATCH -t 1:00:00
#SBATCH --mail-type=END
module purge#load the modules used to build your program.
module load intel_comp
module load python/3.6.5
module load cmake
cd data
python3 --covidsim=../build/CovidSim --datadir=./ --paramdir=param_files/ --outputdir=outputdir United_Kingdom