Installation

For the installation of NMMA on smaller servers (e.g. our Uni Potsdam machines) a conda environment can be used for installation, while for larger cluster such as HAWK or Supermuc, a python virtual-environment is the better way to install NMMA. The main reason for the latter is that the mpi4py python package installed within a conda environment can be incompatible with default modules given by a specific cluster.

Installation on Uni Potsdam machines

Here, we use a mini conda environment, in which separate virtual environments can be created with:

conda create --name <name_of_env> python=3.8

For the conda environment creation, make sure to use python=3.8 as all dependencies of all included packages work best with this python version.

In order to activate the conda environment, you can use:

conda activate <name_of_env>

In order to allow python programs to exploit multiple processors, the mpi4py package needs to be installed first using

conda install mpi4py

NMMA can be source cloned from the git repo with the following command:

git clone https://github.com/nuclear-multimessenger-astronomy/nmma.git

We change into the cloned NMMA directory and pip install it using:

pip install -r requirements.txt
pip install .

Installation on Super-Computer Clusters (e.g. Supermuc)

For larger computer clusters, a virtual python-based environment is recommended which can be created using:

python3 -m venv /path/to/new/virtual/environment

This creates a local environment under /path/to/new/virtual/environment, which can be loaded via:

source /path/to/new/virtual/environment/bin/activate

With activated virtual environment, we now install mpi4py this time with pip:

pip install mpi4py 

If this is done, all the other steps can be taken from the installation version explained above, meaning source cloning NMMA and pip installing it with potential on-top installations explained below.

Optional on-top installations (applicable for both installation versions)

Some further installations (use-case dependent) might be needed. For GRB based analyses make sure to install

pip install afterglowpy

For using tensorflow-based interpolation during an inference make sure to install

pip install imgaug==0.2.6
pip install tensorflow-cpu