From ea317d7050cefd9a2465758540e1692a8f59ce37 Mon Sep 17 00:00:00 2001
From: Jait Dixit <jait.dixit@tum.de>
Date: Tue, 31 Jan 2017 18:33:23 +0100
Subject: [PATCH] Install h5py with MPI support

---
 .gitlab-ci.yml     |  5 +++--
 ci/install_h5py.sh | 13 +++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
 create mode 100644 ci/install_h5py.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ccddf0efa..aa651ae92 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,7 @@ before_script:
   - apt-get update
   - >
     apt-get install -y build-essential python python-pip python-dev git 
-    gfortran autoconf gsl-bin libgsl-dev
+    gfortran autoconf gsl-bin libgsl-dev wget
   - pip install -r ci/requirements_base.txt
   - chmod +x ci/*.sh
 
@@ -58,9 +58,10 @@ test_mpi_fftw_hdf5:
       libfftw3-quad3 libfftw3-single3
     - >
       apt-get install -y libhdf5-10 libhdf5-dev libhdf5-openmpi-10
-      libhdf5-openmpi-dev hdf5-tools python-h5py
+      libhdf5-openmpi-dev hdf5-tools
     - pip install astropy healpy mpi4py
     - pip install git+https://github.com/mrbell/gfft
+    - ci/install_h5py.sh
     - ci/install_libsharp.sh
     - ci/install_pyfftw.sh
     - python setup.py build_ext --inplace
diff --git a/ci/install_h5py.sh b/ci/install_h5py.sh
new file mode 100644
index 000000000..0f008f3f3
--- /dev/null
+++ b/ci/install_h5py.sh
@@ -0,0 +1,13 @@
+#!/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
+tar xzf h5py.tar.gz
+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
-- 
GitLab