Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
22462850
Commit
22462850
authored
May 18, 2017
by
Martin Reinecke
Browse files
Merge branch 'master' into spherical_plots
parents
3f665e63
9bed8f72
Pipeline
#12605
passed with stage
in 5 minutes and 26 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
22462850
...
...
@@ -11,11 +11,10 @@ variables:
before_script
:
-
apt-get update
-
>
apt-get install -y build-essential python python-pip python-dev git
autoconf gsl-bin libgsl-dev wget python-numpy cython
-
pip install --upgrade -r ci/requirements_base.txt
-
chmod +x ci/*.sh
-
ci/install_basics.sh
-
pip install --upgrade -r ci/requirements.txt
test_min
:
stage
:
test
...
...
@@ -26,22 +25,16 @@ test_min:
test_mpi
:
stage
:
test
script
:
-
apt-get install -y openmpi-bin libopenmpi-dev
-
pip install mpi4py
-
ci/install_pyHealpix.sh
-
ci/install_mpi4py.sh
-
python setup.py build_ext --inplace
-
nosetests -vv
test_mpi_fftw
:
stage
:
test
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_mpi4py.sh
-
ci/install_pyfftw.sh
-
python setup.py build_ext --inplace
-
nosetests -vv
...
...
@@ -49,18 +42,10 @@ test_mpi_fftw:
test_mpi_fftw_hdf5
:
stage
:
test
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_
h5
py.sh
-
ci/install_
mpi4
py.sh
-
ci/install_pyfftw.sh
-
ci/install_h5py.sh
-
python setup.py build_ext --inplace
-
nosetests -vv --with-coverage --cover-package=nifty --cover-branches
-
>
...
...
Dockerfile
View file @
22462850
FROM
ubuntu:latest
# dependencies via apt
RUN
\
apt-get update
&&
\
apt-get
install
-y
build-essential python python-pip python-dev git
\
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
RUN
apt-get update
ADD
ci/install_basics.sh /tmp/install_basics.sh
RUN
cd
/tmp
&&
chmod
+x install_basics.sh
&&
./install_basics.sh
# python dependencies
ADD
ci/requirements.txt /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
ADD
ci/install_pyHealpix.sh /tmp/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
RUN
cd
/tmp
&&
chmod
+x install_pyfftw.sh
&&
./install_pyfftw.sh
ADD
ci/install_h5py.sh /tmp/install_h5py.sh
RUN
cd
/tmp
&&
chmod
+x install_h5py.sh
&&
./install_h5py.sh
# copy sources and install nifty
COPY
. /tmp/NIFTy
RUN
pip
install
/tmp/NIFTy
# Cleanup
RUN
rm
-r
/tmp/
*
ci/install_basics.sh
0 → 100644
View file @
22462850
#!/bin/bash
apt-get
install
-y
build-essential python python-pip python-dev git autoconf gsl-bin libgsl-dev wget
ci/install_h5py.sh
View file @
22462850
#!/bin/bash
apt-get
install
-y
libhdf5-10 libhdf5-dev libhdf5-openmpi-10 libhdf5-openmpi-dev hdf5-tools
export
CC
=
mpicc
export
HDF5_DIR
=
/usr/lib/x86_64-linux-gnu/hdf5/openmpi
export
HDF5_MPI
=
"ON"
pip
install
--no-binary
=
h5py h5py
ci/install_mpi4py.sh
0 → 100644
View file @
22462850
#!/bin/bash
apt-get
install
-y
openmpi-bin libopenmpi-dev
pip
install
mpi4py
\ No newline at end of file
ci/install_pyfftw.sh
View file @
22462850
#!/bin/bash
apt-get
install
-y
libatlas-base-dev libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3 libfftw3-quad3 libfftw3-single3
git clone
-b
mpi https://github.com/fredros/pyFFTW.git
cd
pyFFTW/
CC
=
mpicc python setup.py build_ext
install
...
...
ci/requirements.txt
View file @
22462850
numpy
cython
mpi4py
matplotlib
plotly
ipython==5.3.0
nose
parameterized
coverage
...
...
ci/requirements_base.txt
deleted
100644 → 0
View file @
3f665e63
numpy
cython
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
ci/requirements_extras.txt
0 → 100644
View file @
22462850
ipython==5.3.0
nifty/energies/energy.py
View file @
22462850
...
...
@@ -30,7 +30,7 @@ class Energy(Loggable, object):
position
=
position
.
copy
()
except
AttributeError
:
pass
self
.
position
=
position
self
.
_
position
=
position
def
at
(
self
,
position
):
return
self
.
__class__
(
position
)
...
...
nifty/field_types/field_type.py
View file @
22462850
...
...
@@ -27,16 +27,3 @@ class FieldType(DomainObject):
else
:
result
=
x
.
copy
()
return
result
def
process
(
self
,
method_name
,
array
,
inplace
=
True
,
**
kwargs
):
try
:
result_array
=
self
.
__getattr__
(
method_name
)(
array
,
inplace
,
**
kwargs
)
except
AttributeError
:
if
inplace
:
result_array
=
array
else
:
result_array
=
array
.
copy
()
return
result_array
nifty/plotting/plotter/plotter.py
View file @
22462850
...
...
@@ -2,6 +2,7 @@
import
abc
import
os
import
sys
import
numpy
as
np
...
...
@@ -19,10 +20,8 @@ from nifty.plotting.figures import MultiFigure
plotly
=
gdi
.
get
(
'plotly'
)
try
:
if
plotly
is
not
None
and
'IPython'
in
sys
.
modules
:
plotly
.
offline
.
init_notebook_mode
()
except
AttributeError
:
pass
rank
=
d2o
.
config
.
dependency_injector
[
d2o
.
configuration
[
'mpi_module'
]].
COMM_WORLD
.
rank
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment