installation.rst 1.56 KB
Newer Older
Martin Reinecke's avatar
Martin Reinecke committed
1 2 3 4
Installation
============


Martin Reinecke's avatar
Martin Reinecke committed
5
In the following, we assume a Debian-based Linux distribution. For other
Martin Reinecke's avatar
Martin Reinecke committed
6 7
distributions, the "apt" lines will need slight changes.

Philipp Arras's avatar
Philipp Arras committed
8
NIFTy5 and its mandatory dependencies can be installed via::
Martin Reinecke's avatar
Martin Reinecke committed
9

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
10
    sudo apt-get install git python3 python3-pip python3-dev
Martin Reinecke's avatar
Martin Reinecke committed
11
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_5
Martin Reinecke's avatar
Martin Reinecke committed
12

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
13 14
Plotting support is added via::

Martin Reinecke's avatar
Martin Reinecke committed
15
    sudo apt-get install python3-matplotlib
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
16

Philipp Arras's avatar
Philipp Arras committed
17 18
NIFTy uses Numpy's FFT implementation by default. For large problems FFTW may be
used because of its higher performance. It can be installed via::
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
19 20 21 22

    sudo apt-get install libfftw3-dev
    pip3 install --user pyfftw

Philipp Arras's avatar
Philipp Arras committed
23
To enable FFTW usage in NIFTy, call::
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
24 25 26 27 28

    nifty5.fft.enable_fftw()

at the beginning of your code.

Martin Reinecke's avatar
Martin Reinecke committed
29 30 31 32 33
(Note: If you encounter problems related to `pyFFTW`, make sure that you are
using a pip-installed `pyFFTW` package. Unfortunately, some distributions are
shipping an incorrectly configured `pyFFTW` package, which does not cooperate
with the installed `FFTW3` libraries.)

Martin Reinecke's avatar
Martin Reinecke committed
34
Support for spherical harmonic transforms is added via::
Martin Reinecke's avatar
Martin Reinecke committed
35

Martin Reinecke's avatar
Martin Reinecke committed
36
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
Martin Reinecke's avatar
Martin Reinecke committed
37 38 39

MPI support is added via::

Martin Reinecke's avatar
Martin Reinecke committed
40
    sudo apt-get install python3-mpi4py
41 42 43 44 45 46 47 48 49 50 51 52

NIFTy documentation is provided by Sphinx. To build the documentation::

    sudo apt-get install python3-sphinx-rtd-theme dvipng
    cd <nifty_directory>
    sh docs/generate.sh

To view the documentation in firefox::

    firefox docs/build/index.html

(Note: Make sure that you reinstall nifty after each change since sphinx
Martin Reinecke's avatar
tweaks  
Martin Reinecke committed
53
imports nifty from the Python path.)
54