Commit 93b05b97 authored by Jakob Knollmueller's avatar Jakob Knollmueller

master merged

parents 61b1f73b 4af562db
*.html # custom
setup.cfg
.idea
.DS_Store
*.pyc
# from https://github.com/github/gitignore/blob/master/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.c *.c
*.o *.o
*.so *.so
*.pyc
*.log # Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg *.egg
*.egg-info *.egg-info
*~ *~
...@@ -17,3 +44,67 @@ build ...@@ -17,3 +44,67 @@ build
.idea .idea
*.csv.coverage *.csv.coverage
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
...@@ -11,11 +11,10 @@ variables: ...@@ -11,11 +11,10 @@ variables:
before_script: before_script:
- apt-get update - apt-get update
- >
apt-get install -y build-essential python python-pip python-dev git
autoconf gsl-bin libgsl-dev wget python-numpy
- pip install --upgrade -r ci/requirements_base.txt
- chmod +x ci/*.sh - chmod +x ci/*.sh
- ci/install_basics.sh
- pip install --upgrade -r ci/requirements.txt
test_min: test_min:
stage: test stage: test
...@@ -26,22 +25,16 @@ test_min: ...@@ -26,22 +25,16 @@ test_min:
test_mpi: test_mpi:
stage: test stage: test
script: script:
- apt-get install -y openmpi-bin libopenmpi-dev
- pip install mpi4py
- ci/install_pyHealpix.sh - ci/install_pyHealpix.sh
- ci/install_mpi4py.sh
- python setup.py build_ext --inplace - python setup.py build_ext --inplace
- nosetests -vv - nosetests -vv
test_mpi_fftw: test_mpi_fftw:
stage: test stage: test
script: script:
- apt-get install -y openmpi-bin libopenmpi-dev
- >
apt-get install -y libatlas-base-dev libfftw3-bin libfftw3-dev
libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3
libfftw3-quad3 libfftw3-single3
- pip install mpi4py
- ci/install_pyHealpix.sh - ci/install_pyHealpix.sh
- ci/install_mpi4py.sh
- ci/install_pyfftw.sh - ci/install_pyfftw.sh
- python setup.py build_ext --inplace - python setup.py build_ext --inplace
- nosetests -vv - nosetests -vv
...@@ -49,18 +42,10 @@ test_mpi_fftw: ...@@ -49,18 +42,10 @@ test_mpi_fftw:
test_mpi_fftw_hdf5: test_mpi_fftw_hdf5:
stage: test stage: test
script: script:
- apt-get install -y openmpi-bin libopenmpi-dev
- >
apt-get install -y libatlas-base-dev libfftw3-bin libfftw3-dev
libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3
libfftw3-quad3 libfftw3-single3
- >
apt-get install -y libhdf5-10 libhdf5-dev libhdf5-openmpi-10
libhdf5-openmpi-dev hdf5-tools
- pip install mpi4py
- ci/install_pyHealpix.sh - ci/install_pyHealpix.sh
- ci/install_h5py.sh - ci/install_mpi4py.sh
- ci/install_pyfftw.sh - ci/install_pyfftw.sh
- ci/install_h5py.sh
- python setup.py build_ext --inplace - python setup.py build_ext --inplace
- nosetests -vv --with-coverage --cover-package=nifty --cover-branches - nosetests -vv --with-coverage --cover-package=nifty --cover-branches
- > - >
......
FROM ubuntu:latest FROM ubuntu:latest
# dependencies via apt # dependencies via apt
RUN \ RUN apt-get update
apt-get update && \ ADD ci/install_basics.sh /tmp/install_basics.sh
apt-get install -y build-essential python python-pip python-dev git \ RUN cd /tmp && chmod +x install_basics.sh && ./install_basics.sh
autoconf gsl-bin libgsl-dev openmpi-bin wget \
libopenmpi-dev libatlas-base-dev libfftw3-bin libfftw3-dev \
libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3 \
libfftw3-quad3 libfftw3-single3 libhdf5-10 libhdf5-dev \
libhdf5-openmpi-10 libhdf5-openmpi-dev hdf5-tools \
python-tk
# python dependencies # python dependencies
ADD ci/requirements.txt /tmp/requirements.txt ADD ci/requirements.txt /tmp/requirements.txt
RUN pip install --upgrade -r /tmp/requirements.txt RUN pip install --upgrade -r /tmp/requirements.txt
ADD ci/requirements_extras.txt /tmp/requirements_extras.txt
RUN pip install --upgrade -r /tmp/requirements_extras.txt
# install pyHealpix, pyfftw and h5py # install pyHealpix, pyfftw and h5py
ADD ci/install_pyHealpix.sh /tmp/install_pyHealpix.sh ADD ci/install_pyHealpix.sh /tmp/install_pyHealpix.sh
RUN cd /tmp && chmod +x install_pyHealpix.sh && ./install_pyHealpix.sh RUN cd /tmp && chmod +x install_pyHealpix.sh && ./install_pyHealpix.sh
ADD ci/install_mpi4py.sh /tmp/install_mpi4py.sh
RUN cd /tmp && chmod +x install_mpi4py.sh && ./install_mpi4py.sh
ADD ci/install_pyfftw.sh /tmp/install_pyfftw.sh ADD ci/install_pyfftw.sh /tmp/install_pyfftw.sh
RUN cd /tmp && chmod +x install_pyfftw.sh && ./install_pyfftw.sh RUN cd /tmp && chmod +x install_pyfftw.sh && ./install_pyfftw.sh
ADD ci/install_h5py.sh /tmp/install_h5py.sh ADD ci/install_h5py.sh /tmp/install_h5py.sh
RUN cd /tmp && chmod +x install_h5py.sh && ./install_h5py.sh RUN cd /tmp && chmod +x install_h5py.sh && ./install_h5py.sh
# copy sources and install nifty # copy sources and install nifty
COPY . /tmp/NIFTy COPY . /tmp/NIFTy
RUN pip install /tmp/NIFTy RUN pip install /tmp/NIFTy
# Cleanup # Cleanup
RUN rm -r /tmp/* RUN rm -r /tmp/*
...@@ -11,7 +11,7 @@ Summary ...@@ -11,7 +11,7 @@ Summary
### Description ### Description
**NIFTY**, "**N**umerical **I**nformation **F**ield **T**heor**y**", is **NIFTY**, "**N**umerical **I**nformation **F**ield **T**heor<strong>y</strong>", is
a versatile library designed to enable the development of signal a versatile library designed to enable the development of signal
inference algorithms that operate regardless of the underlying spatial inference algorithms that operate regardless of the underlying spatial
grid and its resolution. Its object-oriented framework is written in grid and its resolution. Its object-oriented framework is written in
...@@ -38,25 +38,25 @@ certain grids, **fields** that are defined on spaces, and **operators** ...@@ -38,25 +38,25 @@ certain grids, **fields** that are defined on spaces, and **operators**
that apply to fields. that apply to fields.
- [Spaces](http://www.mpa-garching.mpg.de/ift/nifty/space.html) - [Spaces](http://www.mpa-garching.mpg.de/ift/nifty/space.html)
- `rg_space` - *n*-dimensional regular Euclidean grid - `RGSpace` - *n*-dimensional regular Euclidean grid
- `lm_space` - spherical harmonics - `LMSpace` - spherical harmonics
- `gl_space` - Gauss-Legendre grid on the 2-sphere - `GLSpace` - Gauss-Legendre grid on the 2-sphere
- `hp_space` - [HEALPix](http://sourceforge.net/projects/healpix/) - `HPSpace` - [HEALPix](http://sourceforge.net/projects/healpix/)
grid on the 2-sphere grid on the 2-sphere
- [Fields](http://www.mpa-garching.mpg.de/ift/nifty/field.html) - [Fields](http://www.mpa-garching.mpg.de/ift/nifty/field.html)
- `field` - generic class for (discretized) fields - `Field` - generic class for (discretized) fields
<!-- --> <!-- -->
field.conjugate field.dim field.norm Field.conjugate Field.dim Field.norm
field.dot field.set_val field.weight Field.dot Field.set_val Field.weight
- [Operators](http://www.mpa-garching.mpg.de/ift/nifty/operator.html) - [Operators](http://www.mpa-garching.mpg.de/ift/nifty/operator.html)
- `diagonal_operator` - purely diagonal matrices in a specified - `DiagonalOperator` - purely diagonal matrices in a specified
basis basis
- `projection_operator` - projections onto subsets of a specified - `ProjectionOperator` - projections onto subsets of a specified
basis basis
- `propagator_operator` - information propagator in Wiener filter - `PropagatorOperator` - information propagator in Wiener filter
theory theory
- (and more) - (and more)
- (and more) - (and more)
...@@ -74,9 +74,7 @@ Installation ...@@ -74,9 +74,7 @@ Installation
### Download ### Download
The latest release is tagged **v1.0.7** and is available as a source The current version of Nifty3 can be obtained by cloning the repository:
package at [](https://gitlab.mpcdf.mpg.de/ift/NIFTy/tags). The current
version can be obtained by cloning the repository:
git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
...@@ -89,53 +87,26 @@ Starting with a fresh Ubuntu installation move to a folder like ...@@ -89,53 +87,26 @@ Starting with a fresh Ubuntu installation move to a folder like
- Install basic packages like python, python-dev, gsl and others: - Install basic packages like python, python-dev, gsl and others:
sudo apt-get install curl git autoconf sudo apt-get install curl git autoconf libtool python-dev python-pip python-numpy
sudo apt-get install python-dev python-pip gsl-bin libgsl0-dev libfreetype6-dev libpng-dev libatlas-base-dev
- Using pip install numpy etc...:
sudo pip install numpy
- Install pyHealpix: - Install pyHealpix:
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
cd pyHealpix (cd pyHealpix && autoreconf -i && ./configure --prefix=$HOME/.local --enable-openmp --enable-native-optimizations && make -j4 install)
autoreconf -i && ./configure && make -j4 && sudo make install
cd ..
- Finally, NIFTy: - Finally, NIFTy:
git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
cd nifty (cd NIFTy && python setup.py install --user)
sudo python setup.py install
cd ..
### Installation on a Linux cluster
This is for you if you want to install NIFTy on a HPC machine or cluster
that is hosted by your university or institute. Most of the dependencies
will most likely already be there, but you won't have superuser
privileges. In this case, instead of:
sudo python setup.py install
use:
python setup.py install --user
or: ### Installation on Linux systems in general
python setup.py install --install-lib=/SOMEWHERE Since all the "unconventional" packages (i.e. pyHealpix and NIFTy) listed in the
section above are installed
in the instruction above. This will install the python packages into within the home directory of the user, the installation instructions for these
your local user directory. should also work on any Linux machine where you do not have root access.
In this case you have to ensure with your system administrators that the
For pyHealpix, use: "standard" dependencies (python, numpy, etc.) are installed system-wide.
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
cd pyHealpix
autoreconf -i && ./configure --prefix=$HOME/.local && make -j4 && make install
cd ..
### Installation on OS X 10.11 ### Installation on OS X 10.11
...@@ -154,33 +125,23 @@ may cause trouble. ...@@ -154,33 +125,23 @@ may cause trouble.
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
cd pyHealpix cd pyHealpix
autoreconf -i && ./configure --prefix=`python-config --prefix` && make -j4 && sudo make install autoreconf -i && ./configure --prefix=`python-config --prefix` --enable-openmp --enable-native-optimizations && make -j4 && sudo make install
cd .. cd ..
(The third command installs the package system-wide. User-specific
installation would be preferrable, but we haven't found a simple recipe yet
how to determine the installation prefix ...)
- Install NIFTy: - Install NIFTy:
git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
cd nifty (cd NIFTy && python setup.py install --user)
sudo python setup.py install
cd ..
### Installation using pypi
NIFTY can be installed using [PyPI](https://pypi.python.org/pypi) and
**pip** by running the following command:
pip install ift_nifty
Alternatively, a private or user specific installation can be done by:
pip install --user ift_nifty
### Running the tests ### Running the tests
In oder to run the tests one needs two additional packages: In oder to run the tests one needs two additional packages:
pip install nose pip install nose parameterized
pip install parameterized
Afterwards the tests (including a coverage report) are run using the following Afterwards the tests (including a coverage report) are run using the following
command in the repository root: command in the repository root:
......
#!/bin/bash
apt-get install -y build-essential python python-pip python-dev git autoconf libtool gsl-bin libgsl-dev wget
#!/bin/bash #!/bin/bash
wget https://api.github.com/repos/h5py/h5py/tags -O - | grep tarball_url | grep -v rc | head -n 1 | cut -d '"' -f 4 | wget -i - -O h5py.tar.gz apt-get install -y libhdf5-10 libhdf5-dev libhdf5-openmpi-10 libhdf5-openmpi-dev hdf5-tools
tar xzf h5py.tar.gz CC=mpicc HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi HDF5_MPI="ON" pip install --no-binary=h5py h5py
cd h5py-h5py*
export CC=mpicc
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
python setup.py configure --mpi
python setup.py build
python setup.py install
cd ..
rm -r h5py-h5py*
rm h5py.tar.gz
#!/bin/bash
apt-get install -y openmpi-bin libopenmpi-dev
pip install mpi4py
#!/bin/bash #!/bin/bash
git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git git clone https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
cd pyHealpix (cd pyHealpix && autoreconf -i && ./configure --enable-openmp && make -j4 install)
autoreconf -i && ./configure && make -j4 install
cd ..
rm -rf pyHealpix rm -rf pyHealpix
#!/bin/bash #!/bin/bash
git clone -b mpi https://github.com/ultimanet/pyFFTW.git apt-get install -y libatlas-base-dev libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3 libfftw3-quad3 libfftw3-single3
cd pyFFTW/
CC=mpicc python setup.py build_ext install git clone -b mpi https://github.com/fredros/pyFFTW.git
cd .. (cd pyFFTW && CC=mpicc python setup.py build_ext install)
rm -r pyFFTW rm -rf pyFFTW
numpy numpy
mpi4py cython
matplotlib matplotlib
plotly plotly
ipython==5.3.0
nose nose
parameterized parameterized
coverage coverage
......
numpy
nose
parameterized
coverage
git+https://gitlab.mpcdf.mpg.de/ift/mpi_dummy.git
git+https://gitlab.mpcdf.mpg.de/ift/keepers.git
git+https://gitlab.mpcdf.mpg.de/ift/D2O.git
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"