From 1d980c3038d711ccf8ad3d5502e69c6a6004cd78 Mon Sep 17 00:00:00 2001 From: marian Date: Mon, 16 Nov 2009 14:54:17 +0000 Subject: [PATCH] M filterRecLog.sh - remove the ssyswatch log parsing - too long M resubmitMissing.sh - specify the input run list M submitCalib.sh - remove old logs ReadmeTrain.txt runTrainBatch.sh - move the files from the CalibMacros directory --- TPC/scripts/ReadmeTrain.txt | 43 +++++++++++ TPC/scripts/filterRecLog.sh | 5 +- TPC/scripts/resubmitMissing.sh | 3 +- TPC/scripts/runTrainBatch.sh | 127 +++++++++++++++++++++++++++++++++ TPC/scripts/submitCalib.sh | 3 +- 5 files changed, 176 insertions(+), 5 deletions(-) create mode 100644 TPC/scripts/ReadmeTrain.txt create mode 100644 TPC/scripts/runTrainBatch.sh diff --git a/TPC/scripts/ReadmeTrain.txt b/TPC/scripts/ReadmeTrain.txt new file mode 100644 index 00000000000..1b14c109227 --- /dev/null +++ b/TPC/scripts/ReadmeTrain.txt @@ -0,0 +1,43 @@ +Calibration and Performace train at GSI: + +1. The calibration train will run on the regular basis. +2. The results of the calibration and the setup of the calibration + will be done in workspace. +3. Content of the workspace: + 3.a) ConfigOCDB.C macro - define the OCDB setup (Default and Specific + storage) + + the RecoParam used for refitting of the track (possibility to switch On/OFF different kind of corrections) + 3.b) CalibrateTPC.C macro - define the Tasks and components of the current calibration / performance train + +4. run.list - list of runs used in the calibration +5. esdxxx.txt files - list of the esd for run xxx +6. Run directories + The calibration at GSI is done on the batch farm. The results are merged per run. + + + +List of files: +Macros: +CalibrateTPC.C - standard in $ALICE_ROOT/TPC/macros +ConfigOCDB.C - example (to be modified according studies) in $ALICE_ROOT/TPC/macros +filterESD.C - $ALICE_ROOT/TPC/macros/filterESD.C + +Shell scripts: +balice.sh - symbolic link to the AliRoot setup script + - example (to be modified): + ln -sf ~/.balice64HEAD0108 balice.sh +alienSetup.sh - symbolic link to the alien setup script + - hint (don't modify unles you know what are you doing): + - ln -sf $ALICE_ROOT/TPC/CalibMacros/alienSetupGSI.sh alienSetup.sh +submitCalib.sh - hint: copy of the (don't change it unless ...) + - cp $ALICE_ROOT/TPC/CalibMacros/submitcalib.sh . + +Run lists: +(No recepie for the moment how to create it) +run.list - main source of the run numbers (created from the logbook) +esd.list - the list of files -standard + + +Run the train: +runTrainGSI.sh - this is a recepie + - $ALICE_ROOT/TPC/scripts/runTrainGSI.sh \ No newline at end of file diff --git a/TPC/scripts/filterRecLog.sh b/TPC/scripts/filterRecLog.sh index 51aeeacb1ca..318004864ea 100755 --- a/TPC/scripts/filterRecLog.sh +++ b/TPC/scripts/filterRecLog.sh @@ -34,10 +34,9 @@ for efile in `cat errRec.log` ;do echo $efile ofile=`echo $efile| sed s_err_out_` cat $ofile >> abortout.log - cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log + #cat $sysfile | grep -v hname\/C:sname\/C: >> syswatchAbort.log fi - cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log - + #cat $sysfile | grep -v hname\/C:sname\/ >> syswatchAll.log done; # diff --git a/TPC/scripts/resubmitMissing.sh b/TPC/scripts/resubmitMissing.sh index 086fa3c39c7..546902d1d60 100644 --- a/TPC/scripts/resubmitMissing.sh +++ b/TPC/scripts/resubmitMissing.sh @@ -4,7 +4,8 @@ # 2 - batch queues # 3 - number of chunks per calibration job # 0. Find runs with esd but missing calibration -# +# Example: +# $ALICE_ROOT/TPC/scripts/resubmitMissing.sh run.list alice-t3 10 runlist=$1 bqueue=$2 diff --git a/TPC/scripts/runTrainBatch.sh b/TPC/scripts/runTrainBatch.sh new file mode 100644 index 00000000000..744b7078bd9 --- /dev/null +++ b/TPC/scripts/runTrainBatch.sh @@ -0,0 +1,127 @@ +####################################################################### +# +# Run train commands at GSI: +# marian.ivanov@cern.ch +# +# This is just pseudo code. Bellow you can find the sequence of steps +# to be done to run and update calibration using batch farm. +####################################################################### + + +#################################################################################### +# Make workspace +# This is just example (see $ALICE_ROOT/TPC/scripts/ReadmeTrain.txt) +#################################################################################### +cp $ALICE_ROOT/TPC/macros/CalibrateTPC.C . +cp $ALICE_ROOT/TPC/macros/ConfigOCDB.C . +#modify ConfigOCDB.C +ln -sf ~/.balice64HEAD0108 balice.sh +#use your favourite aliroot +ln -sf $ALICE_ROOT/TPC/CalibMacros/alienSetupGSI.sh alienSetup.sh +#use your alien setup +cp $ALICE_ROOT/TPC/scripts/submitCalibJob.sh . +cp ../lists/run.list . +cp ../lists/esd.list . + + +#################################################################################### +# 0. Create a list for each run - the superlist are located in the lists directory +# and make directory structure. +# To be in workspace dir: +# 0.0 run.list +# 0.1 esd.list +$ALICE_ROOT/TPC/scripts/makeWorkspace.sh run.list + + +#################################################################################### +# 1. Get list of missing +# +$ALICE_ROOT/TPC/scripts/filterMissing.sh +#################################################################################### +# 2. Filter corrupted +# +$ALICE_ROOT/TPC/scripts/filterCorrupted.sh alice-t3_8h +cat */esd*.txt.Bad > esdBad.txt +cat */esd*.txt.Good > esdGood.txt + + +#################################################################################### +# 3. Run calibration: +# You have to wait until the lists are filtered +# Only Afterwards you should process with calibration submission +# Submitting calibration +# +$ALICE_ROOT/TPC/scripts/submitCalib.sh run.list alice-t3 50 +#$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 2 +#$ALICE_ROOT/TPC/scripts/submitCalib.sh run85034.list alice-t3 5 +#$ALICE_ROOT/TPC/scripts/submitCalib.sh run90000.list alice-t3 10 + + +################################################################### +# +# 4. Check the error and out log +# +find `pwd`/*/err* > errRec.log +find `pwd`/*/out* > outRec.log +$ALICE_ROOT/TPC/scripts/filterRecLog.sh + +################################################################### +# +# 5. Submitting merging +# +$ALICE_ROOT/TPC/scripts/submitMerging.sh run.list alice-t3_8h + +################################################################### +# +# 6. resubmit missing if neccessary +# e.g if the lists were updated +$ALICE_ROOT/TPC/scripts/resubmitMissing.sh run.list alice-t3 10 +# +# +#$ALICE_ROOT/TPC/scripts/resubmitMissing.sh runLaser.list alice-t3 5 + + + + + + + + + + +# +# Merge mag field data +# +mydir=`pwd` +mkdir mergeMag +cd mergeMag +rm mergeTrain1.txt +rm mergeTrain2.txt +touch mergeTrain1.txt +touch mergeTrain2.txt +for adir in `cat ../../lists/runMag*s.list`; do +ls $mydir/$adir/CalibObjectsTrain1.root >> mergeTrain1.txt; +ls $mydir/$adir/CalibObjectsTrain2.root >> mergeTrain2.txt; +done; +aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain1.root\",10000,\"mergeTrain1.txt\"\) +aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain2.root\",10000,\"mergeTrain2.txt\"\) +cd .. +# +# +# Merge mag 0 +# +mydir=`pwd` +mkdir mergeMag0 +cd mergeMag0 +rm mergeTrain1.txt +rm mergeTrain2.txt +touch mergeTrain1.txt +touch mergeTrain2.txt +for adir in `cat ../../lists/runMag0.list`; do +ls $mydir/$adir/CalibObjectsTrain1.root >> mergeTrain1.txt; +ls $mydir/$adir/CalibObjectsTrain2.root >> mergeTrain2.txt; +done; +aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain1.root\",10000,\"mergeTrain1.txt\"\) +aliroot $ALICE_ROOT/TPC/macros/CalibFileMerger.C+\(\"CalibObjectsTrain2.root\",10000,\"mergeTrain2.txt\"\) +cd .. +# diff --git a/TPC/scripts/submitCalib.sh b/TPC/scripts/submitCalib.sh index 46d97d64c8b..40655282167 100755 --- a/TPC/scripts/submitCalib.sh +++ b/TPC/scripts/submitCalib.sh @@ -17,6 +17,8 @@ echo mydir=`pwd` for adir in `cat $runlist`; do cd $mydir + rm -f *.log + rm -f core* up=`cat $adir/esd.txt.Good | grep -c .root` if [ $up -gt 0 ] ; then myvar=0; @@ -25,7 +27,6 @@ for adir in `cat $runlist`; do cp ../ConfigOCDB.C . cp ../CalibrateTPC.C . rm -rf *_* - rm *.log rm -rf */V3/ while [ $myvar -le ${up} ] ; do bsub -q $bqueues -oo out$myvar.log -eo err$myvar.log $ALICE_ROOT/TPC/scripts/submitCalibJob.sh $myvar $(($myvar+step)) `pwd`/esd.txt.Good $adir; -- 2.43.0