slurm: Rename to slurm-wlm to resolve conflict with net/slurm

ok wiz@
This commit is contained in:
bacon 2018-04-22 17:25:53 +00:00
parent 6c959c55c4
commit 9d8ab5ff5b
13 changed files with 2 additions and 287 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: CHANGES-2018,v 1.1913 2018/04/22 17:02:12 minskim Exp $
$NetBSD: CHANGES-2018,v 1.1914 2018/04/22 17:26:36 bacon Exp $
Changes to the packages collection and infrastructure in 2018:
@ -2675,3 +2675,4 @@ Changes to the packages collection and infrastructure in 2018:
Updated audio/p5-Audio-Scan to 1.00 [wen 2018-04-22]
Updated devel/p5-Storable to 3.09 [wen 2018-04-22]
Updated finance/py-alpha_vantage to 2.0.0 [minskim 2018-04-22]
Renamed parallel/slurm to parallel/slurm-wlm [bacon 2018-04-22]

View file

@ -1,14 +0,0 @@
$NetBSD: distinfo,v 1.8 2018/04/22 17:25:53 bacon Exp $
SHA1 (slurm-17.11.5.tar.bz2) = fe29758ca8d81492e18d59b84968cedf17a6161b
RMD160 (slurm-17.11.5.tar.bz2) = 8d393e7ddf545ac1e8c81e8ddd9160a5e76d9311
SHA512 (slurm-17.11.5.tar.bz2) = cb82e192bf0ab57fbc810fc3c9b32e90d4c28926b4a959514e3df51b63556b13d01057938d73da5bc0bea157bbd7712b1aad0712a913ad912bd7e6089fc0bd21
Size (slurm-17.11.5.tar.bz2) = 6248551 bytes
SHA1 (patch-etc_init.d.slurm.in) = beaedd5385b4aad04583d2bc5a23557519f74ec5
SHA1 (patch-src_plugins_task_cgroup_task__cgroup__memory.c) = 1accc4ebb9456699db477557ddc783e136fdff00
SHA1 (patch-src_slurmd_common_task__plugin.c) = 0d6680b10b45648703fe7a57411e605992fd9040
SHA1 (patch-src_slurmd_common_task__plugin.h) = d4ad9f350efe1e873809adfe9dc4f559634e9ba2
SHA1 (patch-src_slurmd_slurmd_slurmd.c) = 67cac6d8b4545c9053b655a4da77db63f5de7e63
SHA1 (patch-src_slurmd_slurmd_slurmd.h) = a610b0bbe5b6b04be70eb2f8eac2a231139e6d1a
SHA1 (patch-src_slurmd_slurmstepd_io.c) = b56782887621edb539be70d53dff8029a89e90ed
SHA1 (patch-src_slurmd_slurmstepd_task.c) = 7948c76ce65b0e5211486d2e7b1901664c1f7016

View file

@ -1,64 +0,0 @@
#!/bin/sh -e
##########################################################################
# Script description:
#
# Arguments:
#
# Returns:
#
# History:
# Date Name Modification
# 2013-12-26 root Begin
##########################################################################
usage()
{
printf "Usage: $0 node-type\n"
exit 1
}
##########################################################################
# Main
##########################################################################
if [ $# != 1 ]; then
usage
fi
node_type=$1
#./munge-enable $node_type
case $node_type in
'head')
prefix='/usr/pkg-1'
;;
'compute')
prefix='/sharedapps/pkg-1'
;;
*)
printf "$0 is only for head and compute nodes.\n"
exit 1
;;
esac
# slurm.conf
if [ ! -e $prefix/etc/slurm.conf ]; then
printf "Missing $prefix/etc/slurm.conf. Copy it from head node.\n"
exit 1
fi
# Init script
#if [ ! -e /etc/init.d/slurm ]; then
printf "exec_prefix=/$prefix\nprefix=$prefix\n\n" \
> /etc/init.d/slurm
chmod 750 /etc/init.d/slurm
cat $prefix/share/examples/slurm/init.d.slurm >> /etc/init.d/slurm
chkconfig slurm on
service slurm restart
#fi
mkdir -p /var/log/slurm
chown slurm:slurm /var/log/slurm

View file

@ -1,15 +0,0 @@
#!@RCD_SCRIPTS_SHELL@
# $NetBSD: slurmctld.sh,v 1.2 2018/03/25 14:55:30 bacon Exp $
#
# PROVIDE: slurmctld
# REQUIRE: DAEMON munge
# KEYWORD: shutdown
. /etc/rc.subr
name="slurmctld"
rcvar=${name}
command="@PREFIX@/sbin/slurmctld"
load_rc_config $name
run_rc_command "$1"

View file

@ -1,17 +0,0 @@
#!@RCD_SCRIPTS_SHELL@
# $NetBSD: slurmd.sh,v 1.2 2018/03/25 14:55:30 bacon Exp $
#
# PROVIDE: slurmd
# REQUIRE: DAEMON munge
# KEYWORD: shutdown
. /etc/rc.subr
name="slurmd"
rcvar=${name}
command="@PREFIX@/sbin/slurmd"
slurmd_user="root"
load_rc_config $name
run_rc_command "$1"

View file

@ -1,16 +0,0 @@
$NetBSD: patch-etc_init.d.slurm.in,v 1.1 2018/03/25 14:55:30 bacon Exp $
# Provide something for SUBST to replace
--- etc/init.d.slurm.in.orig 2015-03-19 19:38:01.000000000 +0000
+++ etc/init.d.slurm.in
@@ -25,6 +25,9 @@
# Description: Start slurm to provide resource management
### END INIT INFO
+exec_prefix=
+prefix=
+
BINDIR="@bindir@"
CONFDIR="@sysconfdir@"
LIBDIR="@libdir@"

View file

@ -1,16 +0,0 @@
$NetBSD: patch-src_plugins_task_cgroup_task__cgroup__memory.c,v 1.1 2018/03/25 14:55:30 bacon Exp $
# Guard Linuxism?
--- src/plugins/task/cgroup/task_cgroup_memory.c.orig 2018-03-15 18:57:29.000000000 +0000
+++ src/plugins/task/cgroup/task_cgroup_memory.c
@@ -39,7 +39,10 @@
#include <poll.h>
#include <signal.h>
#include <stdlib.h> /* getenv */
+// Should this be defined(__Linux__)?
+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
#include <sys/eventfd.h>
+#endif
#include <sys/types.h>
#include <unistd.h>

View file

@ -1,30 +0,0 @@
$NetBSD: patch-src_slurmd_common_task__plugin.c,v 1.1 2018/03/25 14:55:30 bacon Exp $
# cpuset functions not standardized across platforms
--- src/slurmd/common/task_plugin.c.orig 2018-01-05 18:03:10.000000000 +0000
+++ src/slurmd/common/task_plugin.c
@@ -542,7 +542,11 @@ extern void task_slurm_chkaffinity(cpu_s
int statval)
{
char *bind_type, *action, *status, *units;
+#ifdef __NetBSD__
+ char mstr[1 + cpuset_size(mask) / 4];
+#else
char mstr[1 + CPU_SETSIZE / 4];
+#endif
int task_gid = job->envtp->procid;
int task_lid = job->envtp->localid;
pid_t mypid = job->envtp->task_pid;
@@ -609,7 +613,11 @@ extern char *task_cpuset_to_str(const cp
char *ptr = str;
char *ret = NULL;
+#ifdef __NetBSD__
+ for (base = cpuset_size(mask) - 4; base >= 0; base -= 4) {
+#else
for (base = CPU_SETSIZE - 4; base >= 0; base -= 4) {
+#endif
char val = 0;
if (CPU_ISSET(base, mask))
val |= 1;

View file

@ -1,23 +0,0 @@
$NetBSD: patch-src_slurmd_common_task__plugin.h,v 1.1 2018/03/25 14:55:30 bacon Exp $
# cpuset functions not standardized across platforms
--- src/slurmd/common/task_plugin.h.orig 2018-01-04 21:15:01.000000000 +0000
+++ src/slurmd/common/task_plugin.h
@@ -42,6 +42,16 @@
#include "src/slurmd/slurmstepd/slurmstepd_job.h"
+// Keep in sync with slurmd/slurmd.h
+#ifdef __NetBSD__
+#define cpu_set_t cpuset_t
+#define CPU_ZERO(c) cpuset_zero((c))
+#define CPU_SET(i,c) cpuset_set((i),(c))
+#define CPU_ISSET(i,c) cpuset_isset((i),(c))
+#define sched_getaffinity sched_getaffinity_np
+#define SCHED_GETAFFINITY_THREE_ARGS
+#endif
+
/*
* Initialize the task plugin.
*

View file

@ -1,29 +0,0 @@
$NetBSD: patch-src_slurmd_slurmd_slurmd.c,v 1.1 2018/03/25 14:55:30 bacon Exp $
# cpuset functions not standardized across platforms
--- src/slurmd/slurmd/slurmd.c.orig 2018-01-04 21:15:01.000000000 +0000
+++ src/slurmd/slurmd/slurmd.c
@@ -2067,7 +2067,13 @@ static int _core_spec_init(void)
uint32_t task_params;
bool slurmd_off_spec;
bitstr_t *res_mac_bitmap;
+#ifdef __NetBSD__
+ cpuset_t *mask = cpuset_create();
+#define CPU_SET_SIZE cpuset_size(mask)
+#else
cpu_set_t mask;
+#define CPU_SET_SIZE sizeof(cpu_set_t)
+#endif
if ((conf->core_spec_cnt == 0) && (conf->cpu_spec_list == NULL)) {
debug("Resource spec: No specialized cores configured by "
@@ -2165,7 +2171,7 @@ static int _core_spec_init(void)
rval = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID,
pid, sizeof(cpu_set_t), &mask);
#elif defined(SCHED_GETAFFINITY_THREE_ARGS)
- rval = sched_setaffinity(pid, sizeof(cpu_set_t), &mask);
+ rval = sched_setaffinity(pid, CPU_SET_SIZE, &mask);
#else
rval = sched_setaffinity(pid, &mask);
#endif

View file

@ -1,23 +0,0 @@
$NetBSD: patch-src_slurmd_slurmd_slurmd.h,v 1.1 2018/03/25 14:55:30 bacon Exp $
# cpuset functions not standardized across platforms
--- src/slurmd/slurmd/slurmd.h.orig 2018-01-04 21:15:01.000000000 +0000
+++ src/slurmd/slurmd/slurmd.h
@@ -48,6 +48,16 @@
#include "src/common/slurm_protocol_api.h"
#include "src/common/slurm_cred.h"
+// Keep in sync with common/task_plugin.h
+#ifdef __NetBSD__
+#define CPU_ZERO(c) cpuset_zero((c))
+#define CPU_SET(i,c) cpuset_set((i),(c))
+#define CPU_ISSET(i,c) cpuset_isset((i),(c))
+#define sched_getaffinity sched_getaffinity_np
+#define sched_setaffinity sched_setaffinity_np
+#define SCHED_GETAFFINITY_THREE_ARGS
+#endif
+
#ifndef __USE_XOPEN_EXTENDED
extern pid_t getsid(pid_t pid); /* missing from <unistd.h> */
extern pid_t getpgid(pid_t pid);

View file

@ -1,14 +0,0 @@
$NetBSD: patch-src_slurmd_slurmstepd_io.c,v 1.1 2018/03/25 14:55:30 bacon Exp $
# Portability
--- src/slurmd/slurmstepd/io.c.orig 2018-01-05 23:43:03.000000000 +0000
+++ src/slurmd/slurmstepd/io.c
@@ -45,6 +45,7 @@
#endif
#ifdef HAVE_UTMP_H
+# include <time.h>
# include <utmp.h>
#endif

View file

@ -1,25 +0,0 @@
$NetBSD: patch-src_slurmd_slurmstepd_task.c,v 1.2 2018/03/25 14:55:30 bacon Exp $
# Linux compat
--- src/slurmd/slurmstepd/task.c.orig 2016-05-03 22:41:59.000000000 +0000
+++ src/slurmd/slurmstepd/task.c
@@ -558,6 +558,18 @@ _make_tmpdir(stepd_step_rec_t *job)
* still work with older systems we include this check.
*/
+/* FIXME: Come up with a real solution for EUID instead of substituting RUID */
+#if defined(__NetBSD__)
+#define eaccess(p,m) (access((p),(m)))
+#define HAVE_EACCESS 1
+#endif
+
+// Unsure about the reason for this patch, but it dates back to SLURM 2.6.4
+//#if defined(__FreeBSD__) || defined(__NetBSD__)
+//#define __GLIBC__ (1)
+//#define __GLIBC_PREREQ(a,b) (1)
+//#endif
+
#if defined(HAVE_FACCESSAT)
else if (faccessat(AT_FDCWD, tmpdir, X_OK|W_OK, AT_EACCESS))
#elif defined(HAVE_EACCESS)