pkgsrc/parallel/slurm-wlm/files/linux-slurm-enable
bacon 76b982d4be parallel/slurm-wlm: import slurm-wlm-17.11.5
SLURM is an open-source resource manager designed for Linux clusters of
all sizes. It provides three key functions. First it allocates exclusive
and/or non-exclusive access to resources (computer nodes) to users for some
duration of time so they can perform work. Second, it provides a framework
for starting, executing, and monitoring work (typically a parallel job) on
a set of allocated nodes. Finally, it arbitrates contention for resources
by managing a queue of pending work.

Renamed from parallel/slurm.

OK wiz@
2018-04-22 21:31:09 +00:00

64 lines
1.3 KiB
Bash

#!/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