Forked from cinek810/aws-com01 modified init.d slurm startall
Created
May 8, 2018 16:11
-
-
Save davidorman/6d6e7e3880624d7cdd4df79b29cfbc96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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