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

Task #2669: Allow OLAP swlevel scripts to run from /localhome and other...

Task #2669: Allow OLAP swlevel scripts to run from /localhome and other directories that are not present on bgsn (workaround for a DNA bug)
parent c0a1c3a1
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ function stop() {
}
function getpid() {
STATUS=`bgpartstatus $PARTITION </dev/null`
STATUS=`cd /;bgpartstatus $PARTITION </dev/null`
case $STATUS in
busy) PID="UP [$PARTITION]"
......
......@@ -39,7 +39,7 @@ function stop() {
mpikill "$PID" ||
# ask DNA to kill the job
(bgjobs -u $USER -s | awk "/$PARTITION/ { print \$1; }" | xargs -L 1 bgkilljob) ||
(cd /;bgjobs -u $USER -s | awk "/$PARTITION/ { print \$1; }" | xargs -L 1 bgkilljob) ||
# kill -9 is the last resort
kill -9 "$PID"
......@@ -50,8 +50,8 @@ function stop() {
while true
do
JOBSTATUS=`bgjobs -u $USER -s | awk "/$PARTITION/ { print \\$6; }"`
JOBID=`bgjobs -u $USER -s | awk "/$PARTITION/ { print \\$1; }"`
JOBSTATUS=`cd /;bgjobs -u $USER -s | awk "/$PARTITION/ { print \\$6; }"`
JOBID=`cd /;bgjobs -u $USER -s | awk "/$PARTITION/ { print \\$1; }"`
if [ -z "$JOBID" ]
then
......
......@@ -88,9 +88,9 @@ function set_psetinfo() {
# 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`"
SUBPARTITIONS="`(cd /;bghierarchy -s R00 R01;bghierarchy -s \`bghierarchy -s R00 R01\`) </dev/null`"
else
SUBPARTITIONS="`(bghierarchy -s $PARTITION;bghierarchy -s \`bghierarchy -s $PARTITION\`) </dev/null`"
SUBPARTITIONS="`(cd /;bghierarchy -s $PARTITION;bghierarchy -s \`bghierarchy -s $PARTITION\`) </dev/null`"
fi
# a comma-separated list of all psets in $PARTITION
......
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