covid-sim
The UCL Pandemic modelling tool used for modelling COVID-19. This is available from https://github.com/mrc-ide/covid-sim/
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 make
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:
python3 regressiontest_UK_100th.py
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)
Running
Once you have compiled the code, you can run it using the data/run_sample.py script.
python3 run_sample.py --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 #SBATCH --mail-user=your.email@here 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 run_sample.py --covidsim=../build/CovidSim --datadir=./ --paramdir=param_files/ --outputdir=outputdir United_Kingdom