Skip to content

OpenMalariaContainer

Monica-Golumbeanu edited this page Sep 23, 2018 · 5 revisions

Running OpenMalaria with Singularity

You can run OpenMalaria from the command line via Singularity without having to install any dependencies or compiling the code and without administrator rights on your computer or a HPC cluster. A Singularity container encompasses the environment necessary to run OpenMalaria independently with the same command syntax.

Installing Singularity

First, you need to install Singularity or ask your cluster admin to install it on the cluster:

You can test if singularity is successfully installed with the command:

singularity --version
Note
On the Basel sciCORE cluster, you can load Singularity with the command
module load Singularity

Pulling the container from the SingularityHub and running OpenMalaria

Once Singularity is installed, in a workspace folder of your choice, you can download the OpenMalaria container from the SingularityHub with the following command:

singularity pull -n openMalaria_v38.simg shub://Monica-Golumbeanu/openmalaria.containers:latest

A couple of resource files need to be copied to the workspace as well:

singularity exec openMalaria_v38.simg cp /usr/local/bin/densities.csv .
singularity exec openMalaria_v38.simg cp /usr/local/bin/scenario_current.xsd .

You can copy an example scenario file from here and save it to the workspace folder.

Note
You only need to pull the container image and copy the resource files once to your workspace. The above commands will save the container and files to your machine or home directory.

Finally, you can run OpenMalaria on the example scenario with the command:

singularity run openMalaria_v38.simg --scenario example_scenario_38.xml
Two output files output.txt and ctsout.txt should be produced in your workspace folder when the run ends successfully.
Note
To ensure a clean working environment, the scenario files as well as the outputs should be stored in a separate location from the container image (.simg) and resource files. All the input and output processing should be done outside the workspace folder.

Running older versions of OpenMalaria with Singularity

You can run older versions of OpenMalaria using Singularity. For example, to run version 33, download the corresponding Singularity container with the command:

singularity pull -n openMalaria_v33.simg shub://Monica-Golumbeanu/openmalaria.containers:33
To see all the available OpenMalaria versions check the following link: https://singularity-hub.org/collections/1675

Operating systems

The above instructions show how to run the Singularity container on Linux systems. It is possible to run the container on other operating systems as well by using the Vagrant environment as described here.

Clone this wiki locally