From be02ab2f30d55874f477e140ba812d51e0674a7a Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 20 Aug 2018 15:49:46 +0200 Subject: [PATCH 1/2] openmpi: 3.1.0 -> 3.1.2 --- pkgs/development/libraries/openmpi/default.nix | 4 ++-- pkgs/development/python-modules/mpi4py/default.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index a279fe79940f..b5651e8f02ad 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -10,14 +10,14 @@ let majorVersion = "3.1"; - minorVersion = "0"; + minorVersion = "2"; in stdenv.mkDerivation rec { name = "openmpi-${majorVersion}.${minorVersion}"; src = fetchurl { url = "http://www.open-mpi.org/software/ompi/v${majorVersion}/downloads/${name}.tar.bz2"; - sha256 = "0v7hrmf1z5d1rmm0z5gi79l536j3z5s5b0kf9q5rr1fc4i0h8p5j"; + sha256 = "1ibniapqki763agpfh65y284las083fqmj8m5b2pi8ilgy2fsm66"; }; postPatch = '' diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index 1b4ad50c781f..6b69df614137 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -37,6 +37,8 @@ buildPythonPackage rec { # 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 + export OMPI_MCA_osc=sm + export OMPI_MCA_btl=self,vader ''; setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"]; From 676825f6fe45dfddf17ff7659b98771802ba1519 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 20 Sep 2018 23:31:47 +0200 Subject: [PATCH 2/2] mpi4py: Add patch to skip broken tests. Fixes compilation with openmpi-3.1.2 --- pkgs/development/python-modules/mpi4py/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index 6b69df614137..6d3897475ad4 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh }: +{ stdenv, fetchPypi, fetchpatch, python, buildPythonPackage, mpi, openssh }: buildPythonPackage rec { pname = "mpi4py"; @@ -13,6 +13,13 @@ buildPythonPackage rec { inherit mpi; }; + patches = [ (fetchpatch { + # Disable tests failing with 3.1.x and MPI_THREAD_MULTIPLE + url = "https://bitbucket.org/mpi4py/mpi4py/commits/c2b6b7e642a182f9b00a2b8e9db363214470548a/raw"; + sha256 = "0n6bz3kj4vcqb6q7d0mlj5vl6apn7i2bvfc9mpg59vh3wy47119q"; + }) + ]; + postPatch = '' substituteInPlace test/test_spawn.py --replace \ "unittest.skipMPI('openmpi(<3.0.0)')" \ @@ -37,8 +44,6 @@ buildPythonPackage rec { # 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 - export OMPI_MCA_osc=sm - export OMPI_MCA_btl=self,vader ''; setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];