Skip to content

Instantly share code, notes, and snippets.

@cinek810
Created October 29, 2017 19:21
Show Gist options
  • Save cinek810/d4bfa2d660c51ba0bb17bd0204fd7606 to your computer and use it in GitHub Desktop.
Save cinek810/d4bfa2d660c51ba0bb17bd0204fd7606 to your computer and use it in GitHub Desktop.
startall() {
for prog in `$BINDIR/scontrol show daemons`; do
if [[ ${prog} == slurmd ]]
then
#configure ip in slurmctl
IPADDRESS=$(ip a s eth0 | grep "inet "| awk '{split($2,a,"/");print(a[1])}')
scontrol update nodename=$(hostname -s) nodeaddr=$IPADDRESS nodehostname=$(hostname -s)
fi
optvar=`echo ${prog}_OPTIONS | tr "a-z" "A-Z"`
if [[ ${MULTIPLE_SLURMD} == yes ]] && [[ ${prog} == slurmd ]]
then
for node in $($BINDIR/scontrol show aliases)
do
start $prog -N ${node} ${!optvar}
done
else
start $prog ${!optvar}
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment