From 6cccc07ab7ff4d71a30c61575b8e67011f8e3aa2 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Mon, 18 Dec 2023 16:05:31 +0000 Subject: [PATCH] mpich: do not disable gforker by default --- pkgs/development/libraries/mpich/default.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index 12fd4251f7df3..0108867dc7718 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -3,12 +3,21 @@ # either libfabric or ucx work for ch4backend on linux. On darwin, neither of # these libraries currently build so this argument is ignored on Darwin. , ch4backend -# Process manager to build -, withPm ? "hydra:gforker" +# Process manager to build, +# cf. https://github.com/pmodels/mpich/blob/b80a6d7c24defe7cdf6c57c52430f8075a0a41d6/README.vin#L562-L586 +, withPm ? [ "hydra" "gforker" ] , pmix -, pmixSupport ? true +, pmixSupport ? false } : +let + processManagers = if builtins.isList withPm then + withPm + else + builtins.filter builtins.isString (builtins.split ":" withPm); + withPm' = builtins.concatStringsSep ":" processManagers; +in + assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric"); stdenv.mkDerivation rec { @@ -24,7 +33,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-shared" - "--with-pm=${withPm}" + "--with-pm=${withPm'}" ] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [ "FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300 "FCFLAGS=-fallow-argument-mismatch" @@ -48,6 +57,9 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + # --with-pmix silently disables gforker + broken = ((builtins.elem "gforker" processManagers) && pmixSupport); + description = "Implementation of the Message Passing Interface (MPI) standard"; longDescription = ''