Changeset 8482 for trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
- Timestamp:
- 05/09/07 17:05:15 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
r8462 r8482 20 20 # Author(s): Daniela Dorner 08/2006 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 622 # Copyright: MAGIC Software Development, 2000-2007 23 23 # 24 24 # … … 37 37 scriptlog=$runlogpath/scriptlauncher`date +%F`.log 38 38 39 echo `date`": starting $0 $@" 39 echo `date`": starting $0 $@" >> $scriptlog 2>&1 40 40 41 41 path=`dirname $0` 42 42 date=`date +%Y-%m-%d` 43 43 44 for i in $@ 44 scripts=( `echo $@ | sed -e 's/allatthesametime//'` ) 45 num=${#scripts[@]} 46 echo "$num scripts have to be launched" >> $scriptlog 2>&1 47 i=0 48 49 while [ $i -lt $num ] 45 50 do 46 if [ "$i" = "allatthesametime" ] 47 then 48 continue 49 fi 50 echo " launching $i..." >> $scriptlog 2>&1 51 pid=`/usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2` 51 echo " launching ${scripts[$i]}..." >> $scriptlog 2>&1 52 pid=`/usr/local/bin/condor_submit -a path=$path -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2` 52 53 if [ "$pid" = "" ] 53 54 then 54 55 echo `date`" WARN condor is not working " >> $errorlog 2>&1 55 printprocesslog "WARN submitting $i to condor failed" 56 printprocesslog "WARN submitting ${scripts[$i]} to condor failed" 57 continue 56 58 fi 57 59 if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog 58 60 then 59 echo " waiting for $ ito be done..." >> $scriptlog 2>&161 echo " waiting for ${scripts[$i]} to be done..." >> $scriptlog 2>&1 60 62 /usr/local/bin/condor_wait $runlogpath/condor-$date.log $pid >/dev/null 2>$errorlog 61 63 fi 64 i=`expr $i + 1` 62 65 done 63 66 echo `date`": all done/submitted." >> $scriptlog 2>&1
Note:
See TracChangeset
for help on using the changeset viewer.