Changeset 18764 for trunk/DataCheck


Ignore:
Timestamp:
02/20/17 13:25:04 (8 years ago)
Author:
Daniela Dorner
Message:
rewrote submitting part - now primaries are given in submit to avoid too many queries at a time
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/JobManager.sh

    r15601 r18764  
    4545            # (-hard) -l hostname=compute-*
    4646            #   for qstat this returns the jobs running on that node + all jobs in the queue
    47             alias 'queuesubmit'='$sgepath/qsub -b y -q `echo ${queues[$i]}` -t 1-`echo $tosubmit` -v AUTOMATIONSETUP=$AUTOMATIONSETUP -e `echo $runlogpath`/error-`echo $date`.log -o `echo $runlogpath`/log-`echo $date`.log `echo $noderequirementsub` -N `echo $step` `echo $scriptspath`/`echo ${scripts[$i]}` '
     47            alias 'queuesubmit'='$sgepath/qsub -b y -q `echo ${queues[$i]}` -t 1-`echo $tosubmit` -v AUTOMATIONSETUP=$AUTOMATIONSETUP -v night=$night -v seqid=$seqid -e `echo $runlogpath`/error-`echo $date`.log -o `echo $runlogpath`/log-`echo $date`.log `echo $noderequirementsub` -N `echo $step` `echo $scriptspath`/`echo ${scripts[$i]}` '
    4848            #alias 'queuesubmit'='$sgepath/qsub -b y -q fact_long -t 1-`echo $tosubmit` -v AUTOMATIONSETUP=$AUTOMATIONSETUP -e `echo $runlogpath`/error-`echo $date`.log -o `echo $runlogpath`/log-`echo $date`.log `echo $noderequirementsub` -N `echo $step` `echo $scriptspath`/`echo ${scripts[$i]}` '
    4949#            alias 'queuesubmit'='$sgepath/qsub -b y -v AUTOMATIONSETUP=$AUTOMATIONSETUP -e `echo $runlogpath`/error-`echo $date`.log -o `echo $runlogpath`/log-`echo $date`.log `echo $scriptspath`/`echo ${scripts[$i]}` '
     
    298298      fi
    299299
    300       # set $tosubmit to 1 if something is 'qw', because in this case
    301       #   only one line for several jobs might be shown
    302       if [ ${idlescript[$i]} -gt 0 ] # && [ "$step" == "Callisto" ]
    303       then
     300# submitting individual job now giving night and seqid
     301#      # set $tosubmit to 1 if something is 'qw', because in this case
     302#      #   only one line for several jobs might be shown
     303#      if [ ${idlescript[$i]} -gt 0 ] # && [ "$step" == "Callisto" ]
     304#      then
     305#         tosubmit=1
     306#      fi
     307      #echo "tosubmit: "$tosubmit
     308
     309      # get todo list
     310      gettodo
     311      # setting upper limit for loop
     312      if [ $num -gt $tosubmit ]
     313      then
     314         num=$tosubmit
     315      fi
     316     
     317      for (( s=0 ; s < $num ; s++ ))
     318      do
    304319         tosubmit=1
    305       fi
    306       echo "tosubmit: "$tosubmit
    307       # submit $tosubmit scripts to queuing system
    308       #tosubmit=1 #workaround for test on fact cluster
    309       echo `date +%F\ %T`" Submitting "$tosubmit" jobs for script '"${scripts[$i]}"' to "$queuesys >> $jmscriptlog 2>&1
    310       date=`date +%Y-%m-%d`
    311       if ! queuesubmit 2>> $jmerrorlog
    312       then
    313          echo `date`" WARN submitting job ($queuesys) failed" >> $jmerrorlog
    314          echo `date +%F\ %T`" WARN $queuesys is not working -> sleeping $errorsleeptime [\$errorsleeptime]" >> $jmscriptlog 2>&1
    315          printprocesslog "WARN submitting ${scripts[$i]} ($queuesys) failed"
    316          sleepawhile "error"
    317       fi
     320         night=${primaries[$s+$s]}
     321         seqid=${primaries[$s+$s+1]}
     322         
     323         echo "submit "${scripts[$i]}" "$night" "$seqid
     324         
     325         # set status in DB
     326         setstatus "startj"
     327         
     328         # submit $tosubmit scripts to queuing system
     329         echo `date +%F\ %T`" Submitting ("$s"/"$tosubmit") jobs for script '"${scripts[$i]}"' (night:"$night" seq"$seqid") to "$queuesys >> $jmscriptlog 2>&1
     330         date=`date +%Y-%m-%d`
     331         if ! queuesubmit 2>> $jmerrorlog
     332         then
     333            echo `date`" WARN submitting job ($queuesys) failed" >> $jmerrorlog
     334            echo `date +%F\ %T`" WARN $queuesys is not working -> sleeping $errorsleeptime [\$errorsleeptime]" >> $jmscriptlog 2>&1
     335            printprocesslog "WARN submitting ${scripts[$i]} ($queuesys) failed"
     336            sleepawhile "error"
     337         fi
     338      done
    318339      echo ""
    319340   done
Note: See TracChangeset for help on using the changeset viewer.