From 6fe16501cdaba6da4fde518f33b72d40f58f1cf6 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 11 May 2010 12:34:29 +0000
Subject: [PATCH] bug 1362: start/stopBGL now work for any specified partition

---
 MAC/APL/Appl_Controller/startBGL.sh | 3 ++-
 MAC/APL/Appl_Controller/stopBGL.sh  | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/MAC/APL/Appl_Controller/startBGL.sh b/MAC/APL/Appl_Controller/startBGL.sh
index a7b4aaa226f..cac1f1752c2 100755
--- a/MAC/APL/Appl_Controller/startBGL.sh
+++ b/MAC/APL/Appl_Controller/startBGL.sh
@@ -14,11 +14,12 @@
 
 # startBGL starts specific CEP run scripts directly
 PARSET=/opt/lofar/share/CNProc.parset
+PARTITION=$2
 
 sed -i 's/.*OLAP.CNProc.integrationSteps.*//' $PARSET
 sed -i 's/.*OLAP.IONProc.integrationSteps.*//' $PARSET
 
-/opt/lofar/bin/runParset.py -P R00 parset=$PARSET >>/globalhome/lofarsystem/log/run.runParset.py.log 2>&1 &
+/opt/lofar/bin/runParset.py -P $PARTITION parset=$PARSET >>/globalhome/lofarsystem/log/run.runParset.py.log 2>&1 &
 
 #echo "executing /usr/local/bin/submitjob $2 $3 $4 virtual_node_mode BGLMPI_SIZE=$6 ACC $5" > startBGL.output
 #/usr/local/bin/submitjob $2 $3 $4 virtual_node_mode BGLMPI_SIZE=$6 ACC $5 2>&1 | awk '{split($1, a, "="); print a[2];}' > $1.jobID
diff --git a/MAC/APL/Appl_Controller/stopBGL.sh b/MAC/APL/Appl_Controller/stopBGL.sh
index 4b8d903676d..99e6ee9b4d5 100755
--- a/MAC/APL/Appl_Controller/stopBGL.sh
+++ b/MAC/APL/Appl_Controller/stopBGL.sh
@@ -7,4 +7,8 @@
 #echo -n "Killing job " $2
 #killjob $1 `cat $2.jobID`
 #rm -f $2.pid $2.ps
-/opt/lofar/bin/commandOLAP.py -P R00 cancel $2
+
+JOB=$2
+PARTITION=$1
+
+/opt/lofar/bin/commandOLAP.py -P $PARTITION cancel $JOB
-- 
GitLab