Changeset 7914
- Timestamp:
- 08/22/06 16:50:52 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7912 r7914 55 55 (relative path for Mars version) 56 56 - moved setup from jobsourcefile to sourcefile 57 - added locking for gettodo 57 58 58 59 * datacenter/scripts/setup: … … 93 94 datacenter/scripts/writesequencefiles: 94 95 - improved logging and comments 96 97 * datacenter/scripts/scriptlauncher: 98 - added (script to start submit other scripts to condor) 95 99 96 100 -
trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
r7913 r7914 38 38 for (( i=0 ; i < ${#scripts[@]} ; i++ )) 39 39 do 40 date #>> $scriptlog 2>&141 echo "sleeping $sleeptime..." #>> $scriptlog 2>&140 date >> $scriptlog 2>&1 41 echo "sleeping $sleeptime..." >> $scriptlog 2>&1 42 42 sleep $sleeptime 43 43 dayofweek=`date +%u` 44 44 hour=`date +%k` 45 45 source `dirname $0`/sourcefile 46 echo "script: ${scripts[$i]}" #>> $scriptlog 2>&147 # echo " day: $dayofweek hour: $hour" #>> $scriptlog 2>&146 echo "script: ${scripts[$i]}" >> $scriptlog 2>&1 47 # echo " day: $dayofweek hour: $hour" >> $scriptlog 2>&1 48 48 queued=`/usr/local/bin/condor_q -global -format "%s\n" Owner | grep -c $user` 49 49 queued=`setzero $queued` … … 59 59 num=`echo "((( $i + 1 ) * 24 ) + ( $hour + 1 ) ) - 24 - 1 " | bc ` 60 60 pnoscript=${pnos[$num]} 61 echo " found $queued jobs in the queue (incl. running jobs) [allowed $pnototal]" #>> $scriptlog 2>&162 echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" #>> $scriptlog 2>&163 # echo " => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" #>> $scriptlog 2>&161 echo " found $queued jobs in the queue (incl. running jobs) [allowed $pnototal]" >> $scriptlog 2>&1 62 echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" >> $scriptlog 2>&1 63 # echo " => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" >> $scriptlog 2>&1 64 64 65 65 if [ "$queued" -gt "$pnototal" ] … … 73 73 fi 74 74 75 # get todofile 76 lockfile=$lockpath/lock-getting-${script[$i]}-list.txt 77 checklock >> $scriptlog 2>&1 75 78 singleprocess="yes" 76 79 gettodo 80 rm -v $lockfile >> $scriptlog 2>&1 77 81 78 82 date=`date +%Y/%m/%d` 79 83 date2=`date +%Y-%m-%d` 80 84 condordir=$logpath/condor/$date 81 makedir $condordir #>> $scriptlog 2>&185 makedir $condordir >> $scriptlog 2>&1 82 86 83 87 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>$errorlog -
trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
r7913 r7914 33 33 scriptslog=$logpath/scriptlauncher/`date +%Y/%m`/jobmanager`date +%F`.log 34 34 35 date #>> $scriptlog 2>&135 date >> $scriptlog 2>&1 36 36 37 37 path=`dirname $0` … … 47 47 continue 48 48 fi 49 echo "launching $i..." #>> $scriptlog 2>&149 echo "launching $i..." >> $scriptlog 2>&1 50 50 /usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date2 -a dir=$condordir $path/run.condor >/dev/null 2>$errorlog 51 51 if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog 52 52 then 53 echo " waiting for $i to be done..." #>> $scriptlog 2>&153 echo " waiting for $i to be done..." >> $scriptlog 2>&1 54 54 /usr/local/bin/condor_wait $condordir/condor-$date2.log >/dev/null 2>$errorlog 55 55 fi
Note:
See TracChangeset
for help on using the changeset viewer.