Skip to content
Snippets Groups Projects
Commit 4c798db1 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #2669: Support for R00R01 added, and increased speed of status commands to *Processing scripts

parent 40f48a4e
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
source locations.sh
function start() {
set_psetinfo
TMPDIR="`mktemp -d`"
PIDFILE="$TMPDIR/pid"
......@@ -23,6 +25,8 @@ function start() {
}
function stop() {
set_psetinfo
# graceful exit
alarm 10 gracefullyStopBGProcessing.sh
......
......@@ -3,6 +3,8 @@
source locations.sh
function start() {
set_psetinfo
# create a new log dir
rm -f "$LOGSYMLINK" || true
mkdir -p "$LOGDIR"
......
......@@ -50,6 +50,8 @@ for R in xrange(3):
# a rack
PartitionPsets[rack] = PartitionPsets["%s-M0" % rack] + PartitionPsets["%s-M1" % rack]
PartitionPsets["R00R01"] = PartitionPsets["R00"] + PartitionPsets["R01"]
if __name__ == "__main__":
from optparse import OptionParser,OptionGroup
import sys
......
......@@ -2,6 +2,8 @@
source locations.sh
set_psetinfo
echo "cancel all" > /dev/tcp/$FIRSTPSET/4000 2>/dev/null &&
echo "quit" > /dev/tcp/$FIRSTPSET/4000 2>/dev/null &&
sleep 5 # allow processes to quit
......@@ -32,14 +32,21 @@ then
. $ETCDIR/BlueGeneControl.conf
fi
# list both the partition directly (small partitions) and recursively (large partitions) to get all -32 subpartitions
# bghierarchy needs a valid stdin for some reason and will read from it, so provide a fake one
SUBPARTITIONS="`(bghierarchy -s $PARTITION;bghierarchy -s \`bghierarchy -s $PARTITION\`) </dev/null`"
# a comma-separated list of all psets in $PARTITION
# xxx-32 means both xxx-J00 and xxx-J01
PSETS=`for i in $SUBPARTITIONS; do echo $i; done|grep -- "-32$"|sort -u|sed 's/-32$/-J00/;p;s/-J00$/-J01/'|xargs -L 1 host -4|cut -d\ -f 4|tr '\n' ','`
# the address of the first pset in the $PARTITION
FIRSTPSET=`for i in $SUBPARTITIONS; do echo $i; done|grep -- "-32$"|sort -u|sed 's/-32$/-J00/;p;s/-J00$/-J01/'|xargs -L 1 host -4|cut -d\ -f 4|head -n 1`
function set_psetinfo() {
# list both the partition directly (small partitions) and recursively (large partitions) to get all -32 subpartitions
# bghierarchy needs a valid stdin for some reason and will read from it, so provide a fake one
if [ "$PARTITION" == "R00R01" ]
then
SUBPARTITIONS="`(bghierarchy -s R00 R01;bghierarchy -s \`bghierarchy -s R00 R01\`) </dev/null`"
else
SUBPARTITIONS="`(bghierarchy -s $PARTITION;bghierarchy -s \`bghierarchy -s $PARTITION\`) </dev/null`"
fi
# a comma-separated list of all psets in $PARTITION
# xxx-32 means both xxx-J00 and xxx-J01
PSETS=`for i in $SUBPARTITIONS; do echo $i; done|grep -- "-32$"|sort -u|sed 's/-32$/-J00/;p;s/-J00$/-J01/'|xargs -L 1 host -4|cut -d\ -f 4|tr '\n' ','`
# the address of the first pset in the $PARTITION
FIRSTPSET=`for i in $SUBPARTITIONS; do echo $i; done|grep -- "-32$"|sort -u|sed 's/-32$/-J00/;p;s/-J00$/-J01/'|xargs -L 1 host -4|cut -d\ -f 4|head -n 1`
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment