From 59c14df1926fdd72604059067504a775560c6e4d Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 23 Oct 2023 13:10:27 +0200 Subject: [PATCH 1/6] openmpi: 4.1.5 -> 4.1.6 --- pkgs/development/libraries/openmpi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index d843e1e462f7..cb09ede5ee62 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -25,11 +25,11 @@ let }; in stdenv.mkDerivation rec { pname = "openmpi"; - version = "4.1.5"; + version = "4.1.6"; src = with lib.versions; fetchurl { url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2"; - sha256 = "sha256-pkCYa8JXOJ3TeYhv2uYmTIz6VryYtxzjrj372M5h2+M="; + sha256 = "sha256-90CZRIVRbetjtTEa8SLCZRefUyig2FelZ7hdsAsR5BU="; }; postPatch = '' From 901503526860d0c84b5f4dcf8ab3b2361c3b5b11 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 23 Oct 2023 14:06:27 +0200 Subject: [PATCH 2/6] openmpi: add ucc to inputs UCC is supported since openmpi 4.1.4, see https://raw.githubusercontent.com/open-mpi/ompi/v4.1.x/NEWS --- pkgs/development/libraries/openmpi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index cb09ede5ee62..1c4955e2c51a 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, gfortran, perl, libnl , rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin -, libpsm2, libfabric, pmix, ucx +, libpsm2, libfabric, pmix, ucx, ucc , config # Enable CUDA support , cudaSupport ? config.cudaSupport, cudatoolkit @@ -46,7 +46,7 @@ in stdenv.mkDerivation rec { outputs = [ "out" "man" ]; buildInputs = [ zlib ] - ++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ] + ++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ucc ] ++ lib.optionals cudaSupport [ cudatoolkit ] ++ [ libevent hwloc ] ++ lib.optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core From 1c5f7eabee51cd86aa0be51426c813c015f8419c Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 23 Oct 2023 13:30:37 +0200 Subject: [PATCH 3/6] slurm: remove pmix-configure.patch Use --without-rpath instead. This leads to the correct configuration, that picks up the the correct dlopen path at runtime. Verified with nixos/tests/slurm.nix. --- pkgs/servers/computing/slurm/default.nix | 3 +-- pkgs/servers/computing/slurm/pmix-configure.patch | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 pkgs/servers/computing/slurm/pmix-configure.patch diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix index 226755b14c9e..fe8f95ecdf36 100644 --- a/pkgs/servers/computing/slurm/default.nix +++ b/pkgs/servers/computing/slurm/default.nix @@ -32,8 +32,6 @@ stdenv.mkDerivation rec { # increase string length to allow for full # path of 'echo' in nix store ./common-env-echo.patch - # Required for configure to pick up the right dlopen path - ./pmix-configure.patch ]; prePatch = '' @@ -72,6 +70,7 @@ stdenv.mkDerivation rec { "--sysconfdir=/etc/slurm" "--with-pmix=${pmix}" "--with-bpf=${libbpf}" + "--without-rpath" # Required for configure to pick up the right dlopen path ] ++ (optional enableGtk2 "--disable-gtktest") ++ (optional (!enableX11) "--disable-x11"); diff --git a/pkgs/servers/computing/slurm/pmix-configure.patch b/pkgs/servers/computing/slurm/pmix-configure.patch deleted file mode 100644 index 21c2197c3ff1..000000000000 --- a/pkgs/servers/computing/slurm/pmix-configure.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/configure b/configure -index 1cf53bc..ab68441 100755 ---- a/configure -+++ b/configure -@@ -21207,7 +21207,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext - as_fn_error $? "error processing $x_ac_cv_pmix_libdir: PMIx v3.x was already found in one of the previous paths" "$LINENO" 5 - fi - _x_ac_pmix_v3_found="1" -- PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include" -+ PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include -DPMIXP_V3_LIBPATH=\\\"$x_ac_cv_pmix_libdir\\\"" - if test "$ac_with_rpath" = "yes"; then - PMIX_V3_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_pmix_libdir -L$x_ac_cv_pmix_libdir" - else From 2f479ac1f8cb387a7037d0bc4352346de56db864 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 23 Oct 2023 13:11:13 +0200 Subject: [PATCH 4/6] pmix: 3.2.4 -> 5.0.1 --- pkgs/development/libraries/pmix/default.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pmix/default.nix b/pkgs/development/libraries/pmix/default.nix index 3f1b2e2cf368..f5fb65f7989b 100644 --- a/pkgs/development/libraries/pmix/default.nix +++ b/pkgs/development/libraries/pmix/default.nix @@ -1,16 +1,17 @@ { lib, stdenv, fetchFromGitHub, perl, autoconf, automake -, libtool, flex, libevent, hwloc, munge, zlib, pandoc +, libtool, python3, flex, libevent, hwloc, munge, zlib, pandoc, gitMinimal } : stdenv.mkDerivation rec { pname = "pmix"; - version = "3.2.4"; + version = "5.0.1"; src = fetchFromGitHub { repo = "openpmix"; owner = "openpmix"; rev = "v${version}"; - sha256 = "sha256-79zTZm549VRsqeziCuBT6l4jTJ6D/gZaMAvgHZm7jn4="; + hash = "sha256-ZuuzQ8j5zqQ/9mBFEODAaoX9/doWB9Nt9Sl75JkJyqU="; + fetchSubmodules = true; }; postPatch = '' @@ -18,14 +19,25 @@ stdenv.mkDerivation rec { patchShebangs ./config ''; - nativeBuildInputs = [ pandoc perl autoconf automake libtool flex ]; + nativeBuildInputs = [ + pandoc + perl + autoconf + automake + libtool + flex + gitMinimal + python3 + ]; buildInputs = [ libevent hwloc munge zlib ]; configureFlags = [ "--with-libevent=${lib.getDev libevent}" + "--with-libevent-libdir=${lib.getLib libevent}/lib" "--with-munge=${munge}" "--with-hwloc=${lib.getDev hwloc}" + "--with-hwloc-libdir=${lib.getLib hwloc}/lib" ]; preConfigure = '' From 668553027f1b0e5e5695b3c8703e208867dbcaa1 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 26 Oct 2023 00:11:11 +0200 Subject: [PATCH 5/6] pythonPackages.pyslurm: add patch to fix build --- pkgs/development/python-modules/pyslurm/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/pyslurm/default.nix b/pkgs/development/python-modules/pyslurm/default.nix index 52649fed6710..52d0d2612e97 100644 --- a/pkgs/development/python-modules/pyslurm/default.nix +++ b/pkgs/development/python-modules/pyslurm/default.nix @@ -1,6 +1,7 @@ { lib , pythonOlder , fetchFromGitHub +, fetchpatch , buildPythonPackage , cython , slurm @@ -20,6 +21,12 @@ buildPythonPackage rec { hash = "sha256-M8seh5pkw2OTiDU4O96D0Lg3+FrlB2w4ehy53kSxyoU="; }; + patches = [ (fetchpatch { + name = "remove-undeclared-KILL_JOB_ARRAY"; + url = "https://github.com/PySlurm/pyslurm/commit/f7a7d8beb8ceb4e4c1b248bab2ebb995dcae77e2.patch"; + hash = "sha256-kQLGiGzAhqP8Z6pObz9vdTRdITd12w7KuUDXsfyLIU8="; + })]; + buildInputs = [ cython slurm ]; setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ]; From 15981fa4fe4b8d3a686bfb4f57456491c3253f0a Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 26 Oct 2023 00:12:47 +0200 Subject: [PATCH 6/6] pythonPackages.pyslurm: use getLib/getDev --- pkgs/development/python-modules/pyslurm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyslurm/default.nix b/pkgs/development/python-modules/pyslurm/default.nix index 52d0d2612e97..c960cfedfdde 100644 --- a/pkgs/development/python-modules/pyslurm/default.nix +++ b/pkgs/development/python-modules/pyslurm/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { buildInputs = [ cython slurm ]; - setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ]; + setupPyBuildFlags = [ "--slurm-lib=${lib.getLib slurm}/lib" "--slurm-inc=${lib.getDev slurm}/include" ]; # Test cases need /etc/slurm/slurm.conf and require a working slurm installation doCheck = false;