Add slurm 16.05.8.1 and hwloc 1.11.6

This commit is contained in:
2023-04-02 21:23:46 +02:00
parent 054d70d23b
commit 94fa0de4fc
8 changed files with 233 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/src/common/env.c b/src/common/env.c
index 987846d..73d3b3b 100644
--- a/src/common/env.c
+++ b/src/common/env.c
@@ -1941,7 +1941,7 @@ char **env_array_user_default(const char *username, int timeout, int mode,
char **env = NULL;
char *starttoken = "XXXXSLURMSTARTPARSINGHEREXXXX";
char *stoptoken = "XXXXSLURMSTOPPARSINGHEREXXXXX";
- char cmdstr[256], *env_loc = NULL;
+ char cmdstr[MAXPATHLEN], *env_loc = NULL;
char *stepd_path = NULL;
int fd1, fd2, fildes[2], found, fval, len, rc, timeleft;
int buf_read, buf_rem, config_timeout;

View File

@@ -0,0 +1,87 @@
{ stdenv, lib, fetchFromGitHub, pkgconfig, libtool, curl
, python3, munge, perl, pam, zlib, shadow, coreutils
, ncurses, libmysqlclient, lua, hwloc, numactl
, readline, freeipmi, xorg, lz4, rdma-core, nixosTests
, pmix, enableX11 ? false
}:
stdenv.mkDerivation rec {
pname = "slurm";
version = "16.05.8.1";
# N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
# because the latter does not keep older releases.
src = fetchFromGitHub {
owner = "SchedMD";
repo = "slurm";
# The release tags use - instead of .
rev = "${pname}-${builtins.replaceStrings ["."] ["-"] version}";
sha256 = "1fkrbi4f22jb2pq19sv3j2yyvac4nh25fk8mzw6ic24swxp8wq9s";
};
outputs = [ "out" "dev" ];
patches = [
./major.patch
./mvwprintw.patch
# 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 = ''
substituteInPlace src/common/env.c \
--replace "/bin/echo" "${coreutils}/bin/echo"
'';
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
# this doesn't fix tests completely at least makes slurmd to launch
hardeningDisable = [ "fortify" "bindnow" ];
nativeBuildInputs = [ pkgconfig libtool python3 ];
buildInputs = [
curl python3 munge perl pam zlib
libmysqlclient ncurses lz4 rdma-core
lua hwloc numactl readline freeipmi shadow.su
pmix
];
configureFlags = [
"CFLAGS=-fcommon"
"--with-freeipmi=${freeipmi}"
"--with-hwloc=${hwloc}"
"--with-lz4=${lz4.dev}"
"--with-munge=${munge}"
"--with-zlib=${zlib}"
"--with-ofed=${rdma-core}"
"--sysconfdir=/etc/slurm"
"--with-pmix=${pmix}"
"--disable-gtktest"
"--disable-x11"
];
preConfigure = ''
patchShebangs ./doc/html/shtml2html.py
patchShebangs ./doc/man/man2html.py
'';
postInstall = ''
rm -f $out/lib/*.la $out/lib/slurm/*.la
'';
enableParallelBuilding = true;
passthru.tests.slurm = nixosTests.slurm;
meta = with lib; {
homepage = "http://www.schedmd.com/";
description = "Simple Linux Utility for Resource Management";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ jagajaga markuskowa ];
};
}

View File

@@ -0,0 +1,10 @@
--- a/src/plugins/task/cgroup/task_cgroup_devices.c 1970-01-01 01:00:01.000000000 +0100
+++ b/src/plugins/task/cgroup/task_cgroup_devices.c 1970-01-01 01:00:01.000000000 +0100
@@ -43,6 +43,7 @@
#include <glob.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <slurm/slurm.h>
#include <slurm/slurm_errno.h>
#include "src/common/xstring.h"

View File

@@ -0,0 +1,11 @@
--- a/src/smap/partition_functions.c 2023-04-02 21:07:54.505816546 +0200
+++ b/src/smap/partition_functions.c 2023-04-02 21:07:43.512816197 +0200
@@ -588,7 +588,7 @@
else
tmp_state = "unk";
mvwprintw(text_win, main_ycord, main_xcord,
- tmp_state);
+ "%s", tmp_state);
main_xcord += 7;
if (part_ptr->max_time == INFINITE)

View File

@@ -0,0 +1,22 @@
{
stdenv
, slurm
}:
stdenv.mkDerivation rec {
name = "pmi2-${version}";
inherit (slurm) src version prePatch nativeBuildInputs buildInputs
configureFlags preConfigure;
# Only build the pmi2 library
preBuild = ''cd contribs/pmi2'';
# Include also the pmi.h header
postInstall = ''
mkdir -p $out/include
cp ../../slurm/pmi.h $out/include
'';
enableParallelBuilding = true;
}

View File

@@ -0,0 +1,13 @@
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