This page contains instructions for installing the Simbelmynë code.

Installing the dependencies

Mandatory dependencies

The code requires the following software packages:

  • hdf5 (version 1.10 or higher)
  • fftw (version 3.3.6 or higher)
  • gsl (version 2.3 or higher)
  • python 3, as provided for example by anaconda3, with classic extensions such as NumPy, Matplotlib, etc.

The mandatory dependencies should be compiled using the following flags:


./configure --prefix=PATH/TO/gsl
make install


./configure --prefix=PATH/TO/fftw --enable-openmp --enable-shared
make install
./configure --prefix=PATH/TO/fftw --enable-openmp --enable-shared --enable-float
make install


Make sure to install both the double-precision version (first part) and the float-precision version (second part).


./configure --prefix=PATH/TO/hdf5 --enable-shared
make install


Anaconda3 (see its documentation) comes with a bash installer, for instance:


In case of compiler version conflict one may have to remove anaconda’s gcc, and it may be necessary to install packages such as matplotlib:

conda remove libgcc
conda install matplotlib

Setting the environment variable

As the code links the dynamic libraries at compilation, you need to add the libraries’ paths to your LD_LIBRARY_PATH before running:

# add some libraries to $LD_LIBRARY_PATH

For convenience, the code above can be added to your $HOME/.bashrc (or .bash_profile, .profile, .zshrc etc.).

Optional dependencies

The following dependencies are optional but recommended; they are necessary to some features of the Simbelmynë code:

  • CLASS and its python wrapper - used as an option to produce the input power spectrum of simulations
  • healpy - used anywhere projections on the sky are involved

Cloning the repository

Simbelmynë includes a main piece of code in the principal repository, as well as several optional “extensions” (to be released).

To download the main code, clone the repository using:

git clone

where you can replace SBMY_ROOT/ with your desidered installation directory.


Note that if you want to modify the code and/or some of the extensions, you shall first fork the corresponding repositories.

Adjusting the compilation options

Go to SBMY_ROOT/ and open to edit your compilation options. You can add a “SYSTYPE” for your machine and adapt (in particular) the LDFLAGS and INCLUDES to match the path where you have installed your dependencies above. The following template can be used.

ifeq ($(SYSTYPE),"YourSystem")
    CC              = gcc
    RM              = rm -rf
    ECHO            = echo
    MKDIR           = @mkdir -p
    LDFLAGS         = -L PATH/TO/fftw/lib -L PATH/TO/gsl/lib -L PATH/TO/hdf5/lib
    LDLIBS          = -lm -lgsl -lgslcblas -lfftw3 -lfftw3_threads -lfftw3f -lfftw3f_threads -lhdf5
    INCLUDES        = -I PATH/TO/fftw/include -I PATH/TO/gsl/include -I PATH/TO/hdf5/include
    PYTHONFLAGS     = -fPIC -shared
    DEBUG           = "false"

The following options (optimization flags depending on the C-compiler that is used, and code verbose level) can also be adjusted:

ifeq ($(DEBUG),"true")
    OPTIMIZE        = -fopenmp -g3 -ggdb -W -Wall -pedantic -pedantic-errors -std=c99
    OPT             += -DDEBUG
    OPTIMIZE        = -fopenmp -O3 -std=c99

Then, under “Select target computer and optimization mode”, add SYSTYPE="YourSystem" and comment out the other lines.

A number of compilation-time options are contained in and will determine the types of simulations that can be run with a given version of Simbelmynë. These options are documented in the template provided. In principle, it should not be necessary to modify the makefile.


If you are a Simbelmynë developer, please do not include your private version of in your pull requests.

Compiling and running the code

Once everything is set up you should be able to compile:


An executable (simbelmyne) and a shared object ( are produced in SBMY_ROOT/build/.

The code is run by using the alias defined above, or using directly the executable:

SBMY_ROOT/build/simbelmyne PATH/TO/config.sbmy


SBMY_ROOT/build/simbelmyne PATH/TO/config.sbmy PATH/TO/logs.txt

The first mandatory argument is the Simbelmynë parameter file (which can be generated using python), the second optional argument is the path for the output log file. If the second argument is omitted then logs will not be saved.