- Timestamp:
- 08/21/08 18:49:35 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9128 r9129 29 29 * datacenter/scripts/dowebplots: 30 30 - fixed sequencepath in rsync 31 32 * datacenter/scripts/jobmanager: 33 - changed choosing of jobmanager (data or mc) from if to case 34 - implemented case-statement for the choice of the queueing 35 system (condor and sun grid engine implemented up to now) 36 - implemented commands for sun grid engine 37 38 * datacenter/scripts/jobmanager, datacenter/scripts/setup: 39 - moved defining of array scripts and pnoswe(ek) from sourcefile 40 to jobmanager 41 - fixed problem with mc jobmanager pnos 42 43 * datacenter/scripts/setup: 44 - implemented definition of queueing system 45 - exchanged camera version 46 47 * datacenter/scripts/sourcefile: 48 - host is retrieved from sql.rc now 49 50 * datacenter/scripts/runcorsika, datacenter/scripts/runreflector, 51 datacenter/scripts/runcamera, datacenter/scripts/setup: 52 - moved defining of detectorpath from scripts to sourcefile 53 54 * datacenter/scripts/runcorsika, datacenter/scripts/setup: 55 - implemented variable for path of Mmcs 56 57 * datacenter/scripts/runcorsika: 58 - exchanged 'operator' in inputcard by `whoami` 59 - implemented usage of function for new datastructure 60 61 * resources/steps.rc: 62 - added line for primaries for MCRunProcessingStatus 31 63 32 64 -
trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
r9122 r9129 37 37 echo "starting jobmanager ("`date`")" >> $jmscriptlog 2>&1 38 38 39 if [ "$1" == "" ] 40 then 41 echo "running jobmanager for data" >> $jmscriptlog 2>&1 42 scripts=( ${datascripts[@]} ) 43 scriptscolname=( ${datascriptscolname[@]} ) 44 elif [ "$1" = "mc" ] 45 then 46 echo "running jobmanager for mc" >> $jmscriptlog 2>&1 47 scripts=( ${mcscripts[@]} ) 48 scriptscolname=( ${mcscriptscolname[@]} ) 49 else 50 echo "$1 is awrong commandline option for jobmanager -> exit" >> $jmscriptlog 2>&1 51 printprocesslog "WARN $1 is wrong commandline option for jobmanager" 52 finish >> $jmscriptlog 2>&1 53 fi 39 # decide which jobmanager you want to run 40 # setup of the different jobmanagers (which scripts they start) 41 # the number of jobs are defined in the file setup 42 case $1 in 43 data) echo "running jobmanager for data" >> $jmscriptlog 2>&1 44 scripts=( "runganymed" "runstar" "runcallisto" ) # not used: "dodatacheck" "cutslices" 45 scriptscolname=( "fGanymed" "fStar" "fCallisto" ) # not used: "fDataCheckDone" "fCompmux" 46 pnosweek=( ${pnoganymed[@]} ${pnostar[@]} ${pnocallisto[@]} ) # not used: ${pnodatacheck[@]} ${pnocutslices[@]} 47 pnoswe=( ${pnoganymedwe[@]} ${pnostarwe[@]} ${pnocallistowe[@]} ) # not used: ${pnodatacheckwe[@]} ${pnocutsliceswe[@]} 48 break 49 ;; 50 mc) echo "running jobmanager for mc" >> $jmscriptlog 2>&1 51 scripts=( "runcorsika" "runreflector" "runcamera" ) 52 scriptscolname=( "fCorsikaFileAvail" "fReflectorFileAvail" "fCameraFileAvail" ) 53 pnosweek=( ${pnocorsika[@]} ${pnoreflector[@]} ${pnocamera[@]} ) 54 pnoswe=( ${pnocorsikawe[@]} ${pnoreflectorwe[@]} ${pnocamerawe[@]} ) 55 break 56 ;; 57 *) echo "$1 is a wrong commandline option for jobmanager -> exit" >> $jmscriptlog 2>&1 58 printprocesslog "WARN $1 is wrong commandline option for jobmanager" 59 finish >> $jmscriptlog 2>&1 60 break 61 ;; 62 esac 63 64 # choose commands according to queueing system (defined in setup) 65 case $queuesys in 66 sge) echo "setting commands for sun grid engine" >> $jmscriptlog 2>&1 67 alias 'queuesubmit'='/opt/gridengine/bin/lx26-amd64/qsub -b y -e `echo $runlogpath`/error-`echo $date`.log -o `echo $runlogpath`/log-`echo $date`.log `echo $scriptspath`/`echo ${scripts[$i]}` ' 68 # alias 'queuesubmit'='/opt/gridengine/bin/lx26-amd64/qsub -sc runlogpath=`echo $runlogpath` -sc date=`echo $date` -sc scriptspath=`echo $scriptspath` -sc script=`echo ${scripts[$i]}` `echo $scriptspath`/job.sge ' 69 alias 'checkqueue'="/opt/gridengine/bin/lx26-amd64/qstat | awk ' { print \"Owner\"\$4\" \" \$3\"Jobstatus\"\$5 } '" 70 break 71 ;; 72 condor) echo "setting commands for condor" >> $jmscriptlog 2>&1 73 alias 'queuesubmit'='/usr/local/bin/condor_submit -a path=`echo $scriptspath` -a prog=`echo ${scripts[$i]}` -a date=`echo $date` -a dir=`echo $runlogpath` `echo $scriptspath`/run.condor' 74 alias 'checkqueue'='/usr/local/bin/condor_q -global -format "Owner%s " Owner -format "%s" CMD -format "Jobstatus%s\n" Jobstatus ' 75 break 76 ;; 77 *) finish >> $jmscriptlog 2>&1 78 ;; 79 esac 54 80 55 81 prev=$max … … 59 85 nothingtodocount=0 60 86 nothingtodosleeptime=0 87 errorsleeptime=$errorsleeptimedefault 61 88 while (( $notcount < 100 )) 62 89 do … … 96 123 97 124 # get processes in queue 98 q=(`/usr/local/bin/condor_q -global -format "Owner%s " Owner -format "%s" CMD -format "Jobstatus%s\n" Jobstatus 2>&1 `) 125 # q=(`/usr/local/bin/condor_q -global -format "Owner%s " Owner -format "%s" CMD -format "Jobstatus%s\n" Jobstatus 2>&1 `) 126 # q=(`/opt/gridengine/bin/lx26-amd64/qstat | awk ' { print "Owner"$4" " $3"Jobstatus"$5 } ' 2>&1 `) 127 q=(`checkqueue 2>&1 `) 99 128 if echo $q | egrep \(Error\|failed\) 100 129 then 101 echo `date`" WARN c ondor_qfailed" >> $jmscriptlog 2>&1102 printprocesslog "WARN c ondor_qfailed"103 echo `date`" WARN c ondor_qfailed" >> $jmerrorlog130 echo `date`" WARN checking query ($queuesys) failed" >> $jmscriptlog 2>&1 131 printprocesslog "WARN checking query ($queuesys) failed" 132 echo `date`" WARN checking query ($queuesys) failed" >> $jmerrorlog 104 133 cont >> $jmscriptlog 2>&1 105 134 fi … … 111 140 queuedscript=${#q2[@]} 112 141 # get running scripts 113 q3=( `echo ${q[@]} | egrep -o ${scripts[$i]}Jobstatus2`)142 q3=( `echo ${q[@]} | egrep -o \(${scripts[$i]}Jobstatus2\|${scripts[$i]}Jobstatusr\)` ) 114 143 runningscript=${#q3[@]} 115 144 stillinqueue=`echo $queuedscript - $runningscript | bc ` … … 151 180 prev=$max 152 181 153 # submit 1 script to condor182 # submit 1 script to queuing system 154 183 date=`date +%Y-%m-%d` 155 echo " committing 1 ${scripts[$i]} to condor" >> $jmscriptlog 2>&1 156 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $scriptspath/run.condor 2>> $jmerrorlog 157 then 158 echo `date`" WARN condor_submit failed" >> $jmerrorlog 159 echo "condor is not working -> sleeping $errorsleeptime" >> $jmscriptlog 2>&1 160 printprocesslog "WARN submitting ${scripts[$i]} to condor failed" 184 echo " committing 1 ${scripts[$i]} to $queuesys" >> $jmscriptlog 2>&1 185 # if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $scriptspath/run.condor 2>> $jmerrorlog 186 # if ! /opt/gridengine/bin/lx26-amd64/qsub -e $runlogpath/error-$date.log -o $runlogpath/log-$(date).log 2>> $jmerrorlog 187 if ! queuesubmit 2>> $jmerrorlog 188 then 189 echo `date`" WARN submitting job ($queuesys) failed" >> $jmerrorlog 190 echo "$queuesys is not working -> sleeping $errorsleeptime" >> $jmscriptlog 2>&1 191 printprocesslog "WARN submitting ${scripts[$i]} ($queuesys) failed" 161 192 if [ $errorsleeptime -lt $sleeptimelimit ] 162 193 then -
trunk/MagicSoft/Mars/datacenter/scripts/runcamera
r9072 r9129 32 32 program=camera 33 33 column=fCameraFileAvail 34 detectordir=/home/msmeyer/MC/MagicSoft/Simulation/Detector35 34 36 35 set -C -
trunk/MagicSoft/Mars/datacenter/scripts/runcorsika
r9072 r9129 35 35 set -C 36 36 37 export FLUPRO= '/home/operator/Corsika/Mmcs6500/fluka2006_3'37 export FLUPRO=$corsikapath'/fluka2006_3' 38 38 39 39 # printing input card to stdout … … 73 73 echo "CERTEL 1" 74 74 echo " 0. 0. 0. 0. 0. 1800. 1700." 75 echo "USER operator"75 echo "USER "`whoami` 76 76 echo "ATMOSPHERE 11 T" 77 77 echo "EXIT" … … 83 83 84 84 # get sequence # 85 gettodo >> $scriptlog 2>&186 run=$ process85 gettodo "1" >> $scriptlog 2>&1 86 run=${primaries[0]} 87 87 # get corsika runno 88 88 query="SELECT fCorsikaRunNumber FROM MCRunData where fMCRunNumber="$run … … 136 136 makedir $outpath >> $scriptlog 2>&1 137 137 138 cd /home/operator/Corsika/Mmcs6500/138 cd $corsikapath 139 139 140 140 echo "INPUTCARD:" >> $logfile 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/runreflector
r9072 r9129 32 32 program=reflector 33 33 column=fReflectorFileAvail 34 detectordir=/home/msmeyer/MC/MagicSoft/Simulation/Detector35 34 36 35 set -C -
trunk/MagicSoft/Mars/datacenter/scripts/setup
r9116 r9129 37 37 fi 38 38 39 # queuing system 40 queusys=condor # wuerzburg data center 41 #queuesys=sge # isdc 39 42 43 # logging and setup 40 44 logpath=/magic/datacenter/autologs 41 45 lockpath=/magic/datacenter/locks 42 46 setuppath=/magic/datacenter/setup 43 47 48 # paths of data 44 49 datapath=/magic/data 45 50 subsystempath=/magic/subsystemdata … … 47 52 datasetpath=/magic/datasets 48 53 54 # paths and setup for mc 49 55 mcpath=/magic/montecarlo 50 56 mcrawpath=$mcpath/rawfiles 51 57 mcsequpath=$mcpath/sequences 58 corsikapath=/home/operator/Corsika/Mmcs6500/ 59 detectordir=/home/msmeyer/MC/MagicSoft/Simulation/Detector 52 60 reflectorversion="reflector 0.7" 53 cameraversion="camera 0. 75"61 cameraversion="camera 0.8" 54 62 55 63 webpath=/www/htdocs/datacenter … … 66 74 errorsleeptimedefault=60 #60 67 75 max=42 #maximum number of processes 68 69 # not done/used70 #scripts=( "dodatacheck" "cutslices" )71 #scriptscolname=( "fDataCheckDone" "fCompmux" )72 # currently used73 datascripts=( "runganymed" "runstar" "runcallisto" )74 datascriptscolname=( "fGanymed" "fStar" "fCallisto" )75 76 76 77 # … … 91 92 #pnocutslices=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ) 92 93 #pnodatacheck=( 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ) 94 pnocorsika=( 12 12 12 12 12 12 12 10 9 8 7 7 7 7 7 7 7 7 7 8 9 10 12 12 ) 95 pnoreflector=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ) 96 pnocamera=( 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ) 93 97 94 98 pnocallistowe=( 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 ) … … 97 101 #pnocutsliceswe=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ) 98 102 #pnodatacheckwe=( 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ) 103 pnocorsikawe=( 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 ) 104 pnoreflectorwe=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ) 105 pnocamerawe=( 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ) 99 106 100 # not used/done101 #pnosweek=( ${pnodatacheck[@]} ${pnocutslices[@]} )102 #pnoswe=( ${pnodatacheckwe[@]} ${pnocutsliceswe[@]} )103 # currently used104 pnosweek=( ${pnoganymed[@]} ${pnostar[@]} ${pnocallisto[@]} )105 pnoswe=( ${pnoganymedwe[@]} ${pnostarwe[@]} ${pnocallistowe[@]} )106 107 108 # not yet working completely109 110 ## values for mc production111 #mcscripts=( "runcorsika" "runreflector" "runcamera" )112 #mcscriptscolname=( "fCorsikaFileAvail" "fReflectorFileAvail" "fCameraFileAvail" )113 #114 ##hour: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23115 #116 #pnocorsika=( 12 12 12 12 12 12 12 10 9 8 7 7 7 7 7 7 7 7 7 8 9 10 12 12 )117 #pnoreflector=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 )118 #pnocamera=( 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 )119 #120 #pnocorsikawe=( 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 )121 #pnoreflectorwe=( 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 )122 #pnocamerawe=( 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 )123 #124 #pnosweek=( ${pnocorsika[@]} ${pnoreflector[@]} ${pnocamera[@]} )125 #pnoswe=( ${pnocorsikawe[@]} ${pnoreflectorwe[@]} ${pnocamerawe[@]} )126 -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r9122 r9129 231 231 pw=`grep Password $mars/sql.rc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'` 232 232 us=`grep User $mars/sql.rc | grep -v '#' | sed -e 's/User: //' -e 's/ //g'` 233 ho=`grep URL $mars/sql.rc | grep -v '#' | sed -e 's/ //g' -e 's/URL:mysql:\/\///'` 233 234 # echo "setup: " 234 235 # echo " db: "$db 235 236 # echo " pw: "$pw 236 237 # echo " us: "$us 238 # echo " ho: "$ho 237 239 } 238 240 … … 284 286 fi 285 287 echo " QUERY: "$query 286 if ! process=`mysql -s -u $us --password=$pw --host= vela$db -e " $query "`288 if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "` 287 289 then 288 290 echo "ERROR could not query processes from db -> exit" … … 321 323 query=$query" group by $column " 322 324 # echo " QUERY: "$query 323 if ! numproc=`mysql -s -u $us --password=$pw --host= vela$db -e " $query "`325 if ! numproc=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "` 324 326 then 325 327 echo "ERROR could not query number of todo proceses from db -> continue" … … 373 375 done 374 376 echo " QUERY: "$query 375 if ! mysql -s -u $us --password=$pw --host= vela$db -e " $query "377 if ! mysql -s -u $us --password=$pw --host=$ho $db -e " $query " 376 378 then 377 379 echo "ERROR could not insert status into db -> exit" … … 386 388 { 387 389 getdbsetup 388 if ! val=`mysql -s -u $us --password=$pw --host= vela$db -e " $query "`390 if ! val=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "` 389 391 then 390 392 printprocesslog "ERROR could not query db (program: $program, function sendquery)" -
trunk/MagicSoft/Mars/resources/steps.rc
r9122 r9129 4 4 SequenceProcessStatus.Primary: fSequenceFirst fTelescopeNumber 5 5 DataSetProcessStatus.Primary: fDataSetNumber 6 MCRunProcessStatus.Primary: fMCRunNumber 6 7 7 8 #--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.