IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10758


Ignore:
Timestamp:
Dec 15, 2006, 1:55:55 PM (19 years ago)
Author:
eugene
Message:

adding limits, failures, etc

Location:
trunk/ippTasks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/phase2.pro

    r10746 r10758  
    4646
    4747  task.exec
    48     command p2tool -pendingimfile -simple -limit {$Phase2ImfileFail + 20}
     48    # command p2tool -pendingimfile -simple -limit {$Phase2ImfileFail + 20}
     49    command p2tool -pendingimfile -simple
    4950  end
    5051
     
    133134      echo command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
    134135    end
    135     command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
     136    ## XXX this is annoying: phase2.pl now requires camera :: it should not need this, it has the file.
     137    command phase2.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI --camera CTIO_MOSAIC2
    136138  end
    137139
  • trunk/ippTasks/phase3.pro

    r9506 r10758  
    11## this file contains the tasks for running the phase 0 stage
    22
    3 ## these tasks use the queue Phase3Imfiles
    4 ## the Phase3Imfiles queue contains:
     3## these tasks use the queue Phase3Exposures
     4## the Phase3Exposures queue contains:
    55## STATE EXP_TAG CLASS CLASS_ID URI-FITS
    66## queue keys are counted from 0
     
    1414end
    1515
     16$Phase3ExposureFail = 0
     17
     18if ($?VERBOSE == 0)
     19  echo "VERBOSE not defined: load pantasks.pro first"
     20  break
     21end
     22if ($?LOGDIR == 0)
     23  echo "LOGDIR not defined: load pantasks.pro first"
     24  break
     25end
     26$LOGSUBDIR = $LOGDIR/phase3
     27exec mkdir -p $LOGSUBDIR
     28
     29macro phase3.status
     30  queueprint Phase3Exposures
     31  echo "Phase3ExposureFail: $Phase3ExposureFail"
     32end
     33
    1634# select images ready for phase3 analysis
    1735# new entries are added to queue Phase3Exposures
    1836# compare the new list with the ones already selected
    1937task           phase3.exp.load
    20   command      p3tool -pendingexp -simple
    2138  host         local
    2239
     
    2542  periods      -timeout 30
    2643
    27   stdout phase3.exp.log
    28   stderr phase3.exp.log
     44  stdout $LOGSUBDIR/phase3.exp.log
     45  stderr $LOGSUBDIR/phase3.exp.log
     46
     47  task.exec
     48    command      p3tool -pendingexp -simple
     49  end
    2950
    3051  # success
     
    3758    for i 0 $Nqueue
    3859      queuepop stdout -var line
     60      if ($VERBOSE > 2)
     61        echo $line
     62      end
    3963      list word -split $line
    4064      $EXP_TAG   = $word:0
     
    4872  # default exit status
    4973  task.exit    default
    50     echo       "phase3 pending exp: failure"
     74    showcommand failure
    5175  end
    5276
    5377  # operation times out?
    5478  task.exit    timeout
    55     echo       "phase3 pending exp: timeout"
     79    showcommand timeout
    5680  end
    5781end
    5882
    59 # run the phase3imfile script on pending images
     83# run the phase3exposure script on pending images
    6084task           phase3.exp.run
    6185  periods      -poll $runpoll
     
    6892    if ($network == 0) break
    6993   
    70     # look for new images on the internal DetrendImfilesToProcess queue
     94    # look for new images on the internal DetrendExposuresToProcess queue
    7195    # caution with these 'if' statements: syntax errors
    7296    # will make the task fail without given a good status
     
    82106    $EXP_TAG   = $word:0
    83107
    84     # XXX add $WORKDIR/$LOG_DIR
    85     stdout $EXP_TAG.log
    86     stderr $EXP_TAG.log
     108    # XXX this is still a lame rule
     109    $word = `basename $EXP_TAG | tr '.' ' '`
     110    list word -split $word
     111    $base = $word:0
     112    stdout $LOGSUBDIR/$base/$EXP_TAG.log
     113    stderr $LOGSUBDIR/$base/$EXP_TAG.log
     114    exec mkdir -p $LOGSUBDIR/$base
    87115
    88116    # specify choice of remote host:(need to choose based on chips)
     
    95123    # create the command line
    96124    options "$line"
    97     echo command phase3.pl --exp_tag $EXP_TAG
    98     command phase3.pl --exp_tag $EXP_TAG
     125    if ($VERBOSE > 1)
     126      echo command phase3.pl --exp_tag $EXP_TAG
     127    end
     128    command phase3.pl --exp_tag $EXP_TAG --camera CTIO_MOSAIC2
    99129  end
    100130
     
    107137  # default exit status
    108138  task.exit    default
     139    showcommand failure
    109140    queuepush Phase3Exposures -replace -key 1 "FAIL $options:0"
     141    $Phase3ExposureFail ++
    110142  end
    111143
    112144  # operation times out?
    113145  task.exit    timeout
     146    showcommand timeout
    114147    queuepush Phase3Exposures -replace -key 1 "TIMEOUT $options:0"
     148    $Phase3ExposureFail ++
    115149  end
    116150end
Note: See TracChangeset for help on using the changeset viewer.