mpich: fix darwin build

The darwin build was failing because neither of the ch4backend libraries
build on darwin.

Changes:
* delete unused argument device
* pass the derivation for the ch4backend in directly rather than using
  a string to switch between two other arguments. (3 args to 1 arg)
* don't use ch4backend on Darwin

Resolves #121978
This commit is contained in:
Noah D. Brenowitz 2021-05-06 21:08:19 -07:00
parent e62feb3bf4
commit a3d423090b
No known key found for this signature in database
GPG Key ID: 55465F962E05AAD1
2 changed files with 8 additions and 9 deletions

View File

@ -1,15 +1,13 @@
{ stdenv, lib, fetchurl, perl, gfortran { stdenv, lib, fetchurl, perl, gfortran
, openssh, hwloc, autoconf, automake, libtool , openssh, hwloc, autoconf, automake, libtool
# device options are ch3 or ch4 # either libfabric or ucx work for ch4backend on linux. On darwin, neither of
, device ? "ch4" # these libraries currently build so this argument is ignored on Darwin.
# backend option are libfabric or ucx , ch4backend
, ch4backend ? "libfabric"
, ucx, libfabric
# Process manager to build # Process manager to build
, withPm ? "hydra:gforker" , withPm ? "hydra:gforker"
} : } :
assert (ch4backend == "ucx" || ch4backend == "libfabric"); assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric");
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mpich"; pname = "mpich";
@ -45,8 +43,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ perl gfortran openssh hwloc ] buildInputs = [ perl gfortran openssh hwloc ]
++ lib.optional (ch4backend == "ucx") ucx ++ lib.optional (!stdenv.isDarwin) ch4backend;
++ lib.optional (ch4backend == "libfabric") libfabric;
doCheck = true; doCheck = true;

View File

@ -16711,7 +16711,9 @@ in
libmpc = callPackage ../development/libraries/libmpc { }; libmpc = callPackage ../development/libraries/libmpc { };
mpich = callPackage ../development/libraries/mpich { }; mpich = callPackage ../development/libraries/mpich {
ch4backend = libfabric;
};
mstpd = callPackage ../os-specific/linux/mstpd { }; mstpd = callPackage ../os-specific/linux/mstpd { };