From c6f039e59cda597af3165ebfdf3a9147c095c2a1 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 7 Feb 2019 13:34:06 +0100 Subject: [PATCH] openmpi: add patch for mpi tests on machines with less than 4 cores Fix a bug that ignores OMPI_MCA_rmaps_base_oversubscribe (upstream patch). This bug breaks the test from libs, such as scalapack, on machines with less than 4 cores. --- pkgs/development/libraries/openmpi/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index b3f17021606..cd60e0edca1 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, gfortran, perl, libnl, rdma-core, zlib -, numactl, libevent, hwloc +{ stdenv, fetchurl, fetchpatch, gfortran, perl, libnl +, rdma-core, zlib, numactl, libevent, hwloc # Enable the Sun Grid Engine bindings , enableSGE ? false @@ -19,6 +19,14 @@ in stdenv.mkDerivation rec { sha256 = "0srnjwzsmyhka9hhnmqm86qck4w3xwjm8g6sbns58wzbrwv8l2rg"; }; + patches = [ (fetchpatch { + # Fix a bug that ignores OMPI_MCA_rmaps_base_oversubscribe (upstream patch). + # This bug breaks the test from libs, such as scalapack, + # on machines with less than 4 cores. + url = https://github.com/open-mpi/ompi/commit/98c8492057e6222af6404b352430d0dd7553d253.patch; + sha256 = "1mpd8sxxprgfws96qqlzvqf58pn2vv2d0qa8g8cpv773sgw3b3gj"; + }) ]; + postPatch = '' patchShebangs ./ '';