Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installation_nmma [2023/06/10 18:24]
theoastro
installation_nmma [2023/06/10 18:51] (current)
theoastro
Line 5: Line 5:
 === Installation on Uni Potsdam machines === === Installation on Uni Potsdam machines ===
  
-While it is not strictly necessaryit reduces possible conflicts if one installs python packages that do not need to be available system-wide into local, virtual environments. An easy option to setup such virtual environments is the [[https://docs.python.org/3/library/venv.html#module-venv|venv]] module. +Herewe use a [[https://docs.conda.io/en/latest/miniconda.html#| mini conda environment]], in which separate virtual environments can be created with: 
- +  conda create --name <name_of_env> python=3.8 
-  python3 -m venv /path/to/new/virtual/environment +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
- +
-This creates a local environment under /path/to/new/virtual/environment, which can be loaded via: +
-  source /path/to/new/virtual/environment/bin/activate +
- +
-Another way is to install a [[https://docs.conda.io/en/latest/miniconda.html#| mini conda environment]], in which separate virtual environments can be created with: +
-  conda create --name <name> python=<version>+
  
 In order to activate the conda environment, you can use: In order to activate the conda environment, you can use:
   conda activate <name_of_env>   conda activate <name_of_env>
  
 +In order to allow python programs to exploit multiple processors, the [[https://mpi4py.readthedocs.io/en/stable/#| mpi4py]] package needs to be installed first using 
 +  conda install mpi4py
  
-=== Cloning and installation ===+NMMA can be source cloned from the git repo with the following command: 
 +  git clone https://github.com/nuclear-multimessenger-astronomy/nmma.git
  
-With activated virtual environment, basic packages need to be installed with+We change into the cloned NMMA directory and pip install it using
-  pip install afterglowpy extinction dill multiprocess bilby lalsuite+  pip install -r requirements.txt 
 +  pip install .
  
-In order to allow python programs to exploit multiple processors, the [[https://mpi4py.readthedocs.io/en/stable/#| mpi4py]] packages needs to be installed using: +=== Installation on Super-Computer Clusters (e.g. Supermuc) === 
-  conda install mpi4py+For larger computer clusters, a virtual python-based environment is recommended which can be created using: 
 +  python3 -m venv /path/to/new/virtual/environment
  
-In additioninstall+This creates a local environment under /path/to/new/virtual/environmentwhich can be loaded via
-  conda install -c conda-forge parallel_bilby+  source /path/to/new/virtual/environment/bin/activate
  
-NMMA can be source cloned from the git repo with the following command+With activated virtual environment, we now install **mpi4py** this time with pip
-  git clone git@github.com:nuclear-multimessenger-astronomy/nmma.git+  pip install mpi4py 
  
-This will create an nmma folderin which you can install the NMMA package using: +If this is doneall 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.
-  pip install .+
  
-=== Optional on-top installations === +=== Optional on-top installations (applicable for both installation versions) === 
-Several tasks require the Bayesian inference tool [[https://github.com/JohannesBuchner/MultiNest|Multinest]], which can be installed using: +Some further installations (use-case dependent) might be needed. For GRB based analyses make sure to install 
-  conda install pymultinest+  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 
  
-=== Installation on Super-Computer Clusters (e.g. Supermuc) === 
Last modified: le 2023/06/10 18:24