about summary refs log tree commit diff
path: root/pkgs/development/python-modules/h5py
diff options
context:
space:
mode:
authorMarkus Kowalewski <markus.kowalewski.uu@gmail.com>2018-01-26 18:26:22 -0800
committerMarkus Kowalewski <markus.kowalewski.uu@gmail.com>2018-01-26 18:46:07 -0800
commitaa83877cf874f38d998262e25e5cf1e547181e2f (patch)
tree218176e8487227748e53d1eeacc13c803b1e9775 /pkgs/development/python-modules/h5py
parent58765282f821216795a75c5cc130a75a02120df8 (diff)
mpi4py/h5py: fix test to run reliably with openmpi-3
Diffstat (limited to 'pkgs/development/python-modules/h5py')
-rw-r--r--pkgs/development/python-modules/h5py/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix
index e9bae3f82060b..bdbdcdcc2e743 100644
--- a/pkgs/development/python-modules/h5py/default.nix
+++ b/pkgs/development/python-modules/h5py/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, python, buildPythonPackage
 , numpy, hdf5, cython, six, pkgconfig
-, mpi4py ? null }:
+, mpi4py ? null, openssh }:
 
 assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
 
@@ -24,6 +24,10 @@ in buildPythonPackage rec {
 
   postConfigure = ''
     ${python.executable} setup.py configure ${configure_flags}
+
+    # Needed to run the tests reliably. See:
+    # https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
+    ${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
   '';
 
   preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
@@ -33,7 +37,7 @@ in buildPythonPackage rec {
     ++ optional mpiSupport mpi
     ;
   propagatedBuildInputs = [ numpy six]
-    ++ optional mpiSupport mpi4py
+    ++ optionals mpiSupport [ mpi4py openssh ]
     ;
 
   meta = {