IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25462


Ignore:
Timestamp:
Sep 21, 2009, 1:24:32 PM (17 years ago)
Author:
bills
Message:

type of $NO_MAGIC changed from int to BOOL.
remove dist.queueruns task.
Changed the list of stages from STAGE to DIST_STAGE to disambibutate with
the list in destreak.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r25429 r25462  
    1818### list of stages
    1919#list of stages
    20 $STAGE:n = 0
    21 list STAGE -add "raw"
    22 list STAGE -add "chip"
    23 list STAGE -add "camera"
    24 list STAGE -add "fake"
    25 list STAGE -add "warp"
    26 list STAGE -add "diff"
    27 list STAGE -add "stack"
     20$DIST_STAGE:n = 0
     21list DIST_STAGE -add "raw"
     22list DIST_STAGE -add "chip"
     23list DIST_STAGE -add "camera"
     24list DIST_STAGE -add "fake"
     25list DIST_STAGE -add "warp"
     26list DIST_STAGE -add "diff"
     27list DIST_STAGE -add "stack"
    2828
    2929$currentStage = 0
     
    5555    active true
    5656  end
    57   task dist.queueruns
    58 #   We aren't ready to run this task yet. It will queue much too much
    59 #    active true
    60     active false
    61   end
    62 end
     57end
     58
    6359macro dist.off
    6460  task dist.process.load
     
    7268  end
    7369  task dist.advance.run
    74     active false
    75   end
    76   task dist.queueruns
    7770    active false
    7871  end
     
    8780  npending     1
    8881
    89   stdout NULL
    90   stderr $LOGDIR/dist.process.log
    9182
    9283  task.exec
    93     $run = disttool -pendingcomponent -stage $STAGE:$currentStage
     84     # stdout NULL
     85     # stderr $LOGSUBDIR/dist.process.load.log
     86
     87    $run = disttool -pendingcomponent -stage $DIST_STAGE:$currentStage
    9488    $currentStage ++
    95     if ($currentStage >= $STAGE:n) set currentStage = 0
     89    if ($currentStage >= $DIST_STAGE:n) set currentStage = 0
     90
    9691    if ($DB:n == 0)
    9792      option DEFAULT
     
    154149    if ("$pageName" == "NULL") break
    155150
     151#    echo running $pageName
     152
    156153    book setword distToProcess $pageName pantaskState RUN
    157154    book getword distToProcess $pageName dist_id -var DIST_ID
    158155    book getword distToProcess $pageName camera -var CAMERA
    159     book getword distToProcess $pageName stage -var STAGE
    160     book getword distToProcess $pageName stage_id -var STAGE_ID
     156    book getword distToProcess $pageName stage -var DIST_STAGE
     157    book getword distToProcess $pageName stage_id -var DIST_STAGE_ID
    161158    book getword distToProcess $pageName clean -var CLEAN
    162159    book getword distToProcess $pageName component -var COMPONENT
     
    179176        $EXTRA_ARGS = $EXTRA_ARGS --magicked
    180177    end
    181     # no_magic is output as integer due to the union in the sql
    182     if ($NO_MAGIC)
     178    # is this right for stack and fake?
     179    if ("$NO_MAGIC" == "T")
    183180        $EXTRA_ARGS = $EXTRA_ARGS --no_magic
    184181    end
     
    190187#    set.workdir.by.camera $CAMERA $MAGIC_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    191188#    host anyhost
    192 
    193189
    194190    substr $COMPONENT 0 3 COMP_HEAD
     
    200196    end
    201197
    202 
    203198    sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT
    204     stdout $logfile
    205     stderr $logfile
    206 
    207     $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_ARGS --outdir $OUTDIR --logfile $logfile
     199#    stdout $logfile
     200#    stderr $logfile
     201
     202    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $DIST_STAGE --stage_id $DIST_STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_ARGS --outdir $OUTDIR --logfile $logfile
    208203
    209204    add_standard_args run
     
    231226end
    232227
    233 
    234228task           dist.advance.load
    235229  host         local
     
    240234  npending     1
    241235
    242   stdout NULL
    243   stderr $LOGDIR/dist.advance.load.log
    244 
    245236  task.exec
     237  #  stderr $LOGSUBDIR/dist.advance.load.log
     238
    246239    $run = disttool -toadvance
    247240    if ($DB:n == 0)
     
    281274  end
    282275end
     276
    283277
    284278task           dist.advance.run
     
    311305
    312306    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
    313     stdout $logfile
    314     stderr $logfile
     307#    stdout $logfile
     308#    stderr $logfile
    315309
    316310    $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
     
    338332  end
    339333end
    340 
    341 task           dist.queueruns
    342 #  host         local
    343 
    344   periods      -poll $RUNPOLL
    345   periods      -exec 30
    346   periods      -timeout 45
    347   npending     1
    348 
    349   active false
    350 
    351 #  stdout $LOGDIR/dist.queuruns
    352 #  stderr $LOGDIR/dist.queueruns
    353 
    354   task.exec
    355     $MYARGS = ""
    356     # assume that we need magic unless we are running simtest
    357     if ($?SIMTEST_CAMERA != 0)
    358         $MYARGS = --no_magic
    359     end
    360 
    361     $run = dist_queue_runs.pl $MYARGS --stage_limit 16 --logfile $LOGDIR/dist.queueruns
    362 
    363     if ($DB:n == 0)
    364        $DBNAME = DEFAULT
    365     else
    366       # save the DB name for add_standard_args
    367       $DBNAME =  $DB:$distQueue_DB
    368       $distQueue_DB ++
    369       if ($distQueue_DB >= $DB:n) set distQueue_DB = 0
    370     end
    371 
    372     host anyhost
    373 
    374     add_standard_args run
    375 
    376     # create the command line
    377     if ($VERBOSE > 1)
    378       echo command $run
    379     end
    380     command $run
    381   end
    382 
    383   task.exit     $EXIT_SUCCESS
    384     # nothing to do
    385   end
    386 
    387   # default exit status
    388   task.exit    default
    389     showcommand failure
    390   end
    391 
    392   # operation timed out?
    393   task.exit    timeout
    394     showcommand timeout
    395   end
    396 
    397   # operation timed out?
    398   task.exit    crash
    399     showcommand crash
    400   end
    401 end
Note: See TracChangeset for help on using the changeset viewer.