mpi4py/h5py: fix test to run reliably with openmpi-3
This commit is contained in:
parent
58765282f8
commit
aa83877cf8
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, python, buildPythonPackage
|
{ stdenv, fetchurl, python, buildPythonPackage
|
||||||
, numpy, hdf5, cython, six, pkgconfig
|
, numpy, hdf5, cython, six, pkgconfig
|
||||||
, mpi4py ? null }:
|
, mpi4py ? null, openssh }:
|
||||||
|
|
||||||
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
|
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
|
||||||
|
|
||||||
@ -24,6 +24,10 @@ in buildPythonPackage rec {
|
|||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
${python.executable} setup.py configure ${configure_flags}
|
${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 "";
|
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
|
||||||
@ -33,7 +37,7 @@ in buildPythonPackage rec {
|
|||||||
++ optional mpiSupport mpi
|
++ optional mpiSupport mpi
|
||||||
;
|
;
|
||||||
propagatedBuildInputs = [ numpy six]
|
propagatedBuildInputs = [ numpy six]
|
||||||
++ optional mpiSupport mpi4py
|
++ optionals mpiSupport [ mpi4py openssh ]
|
||||||
;
|
;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchPypi, python, buildPythonPackage, mpi }:
|
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "mpi4py";
|
pname = "mpi4py";
|
||||||
@ -28,11 +28,15 @@ buildPythonPackage rec {
|
|||||||
# sometimes packages specify where files should be installed outside the usual
|
# sometimes packages specify where files should be installed outside the usual
|
||||||
# python lib prefix, we override that back so all infrastructure (setup hooks)
|
# python lib prefix, we override that back so all infrastructure (setup hooks)
|
||||||
# work as expected
|
# work as expected
|
||||||
|
|
||||||
|
# Needed to run the tests reliably. See:
|
||||||
|
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
|
||||||
|
export OMPI_MCA_rmaps_base_oversubscribe=yes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
|
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
|
||||||
|
|
||||||
buildInputs = [ mpi ];
|
buildInputs = [ mpi openssh ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description =
|
description =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user