Ignore:
Timestamp:
08/15/08 13:49:05 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/jobmanager

    r8527 r9122  
    6868
    6969      # check if there's something to do
     70      column=${scriptscolname[$i]}
    7071      getstatus >> $jmscriptlog 2>&1
    7172      echo " $numproc ${scripts[$i]} still do to" >> $jmscriptlog 2>&1
  • trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher

    r8482 r9122  
    3131printprocesslog "INFO starting $0 $@"
    3232
    33 makedir $listpath
    34 makedir $lockpath
    35 
    3633errorlog=$runlogpath/scriptlauncher-error`date +%F`.log
    3734scriptlog=$runlogpath/scriptlauncher`date +%F`.log
     
    4239date=`date +%Y-%m-%d`
    4340
    44 scripts=( `echo $@ | sed -e 's/allatthesametime//'` )
    45 num=${#scripts[@]}
    46 echo "$num scripts have to be launched" >> $scriptlog 2>&1
    47 i=0
     41num=$#
     42echo "$num scripts have to be launched" #>> $scriptlog 2>&1
     43i=1
    4844
    49 while [ $i -lt $num ]
     45if echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
     46then
     47   all="yes"
     48else
     49   all="no"
     50fi
     51
     52while [ $i -le $num ]
    5053do
    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`
     54   com=( )
     55   prog=
     56   if [ "$1" = "allatthesametime" ]
     57   then
     58      shift
     59      i=`expr $i + 1`
     60      continue
     61   fi
     62   com=( $1 )
     63   prog=${com[0]}
     64   if ! ls $path/${com[0]} >/dev/null 2>&1
     65   then
     66      echo "script $path/$1 does not exist." >> $scriptlog 2>&1
     67      shift
     68      i=`expr $i + 1`
     69      continue
     70   fi
     71   if [ `echo $1 | wc -w` -gt 1 ]
     72   then
     73      unset com[0]
     74      args='-a args="'${com[@]}'"'
     75   fi
     76   echo " launching $1..." >> $scriptlog 2>&1
     77   echo "/usr/local/bin/condor_submit -a path=$path -a prog=$prog $args -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2" >> $scriptlog 2>&1
     78   pid=`/usr/local/bin/condor_submit -a path=$path -a prog=$prog $args -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2`
    5379   if [ "$pid" = "" ]
    5480   then
    5581      echo `date`" WARN condor is not working " >> $errorlog 2>&1
    56       printprocesslog "WARN submitting ${scripts[$i]} to condor failed"
     82      printprocesslog "WARN submitting $1 to condor failed"
     83      shift
     84      i=`expr $i + 1`
    5785      continue
    5886   fi
    59    if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
     87   if [ "$all" = "no" ]
    6088   then
    61       echo "  waiting for ${scripts[$i]} to be done..." >> $scriptlog 2>&1
     89      echo "  waiting for $1 to be done..." >> $scriptlog 2>&1
    6290      /usr/local/bin/condor_wait $runlogpath/condor-$date.log $pid >/dev/null 2>$errorlog
    6391   fi
     92   shift
    6493   i=`expr $i + 1`
    6594done
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r9088 r9122  
    3737scriptspath=$mars/datacenter/scripts
    3838
    39 webpath=/www/htdocs/datacenter
    40 
    4139datetime=`date +%F-%H-%M-%S`
    4240
     
    6967
    7068makedir $lockpath
    71 makedir $listpath
    7269
    7370# set checkvalue to ok at the beginning of the scripts
     
    107104#again run process status
    108105FCompmux=26
     106Fdowebplots=27
    109107
    110108# setup for jobmanager:
     
    160158function checklock()
    161159{
    162    date > $lockfile
     160   date > $lockfile 
    163161   checklock0=$?
    164162   case $checklock0 in
     
    309307   numproc=
    310308   getdbsetup
    311    column=${scriptscolname[$i]}
    312309   getstepinfo
    313310   # get query
     
    324321   query=$query" group by $column "
    325322#   echo " QUERY: "$query
    326    numproc=0
    327323   if ! numproc=`mysql -s -u $us --password=$pw --host=vela $db -e " $query "`
    328324   then
     
    336332function setstatus()
    337333{
     334   if [ "$column" = "no" ]
     335   then
     336      return
     337   fi
    338338   resetstatusvalues
    339339   evalstatus $@
Note: See TracChangeset for help on using the changeset viewer.