Changeset 25625 for branches/eam_branches/20090715/ippTasks/dist.pro
- Timestamp:
- Sep 27, 2009, 11:34:24 AM (17 years ago)
- File:
-
- 1 edited
-
branches/eam_branches/20090715/ippTasks/dist.pro (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/ippTasks/dist.pro
r25402 r25625 16 16 $distQueue_DB = 0 17 17 18 ### list of stages 19 #list of stages 20 $DIST_STAGE:n = 0 21 list DIST_STAGE -add "raw" 22 list DIST_STAGE -add "chip" 23 list DIST_STAGE -add "camera" 24 list DIST_STAGE -add "fake" 25 list DIST_STAGE -add "warp" 26 list DIST_STAGE -add "diff" 27 list DIST_STAGE -add "stack" 28 29 $currentStage = 0 30 18 31 ### Check status of tasks 19 32 macro dist.status … … 42 55 active true 43 56 end 44 task dist.queueruns 45 # We aren't ready to run this task yet. It will queue much too much 46 # active true 47 active false 48 end 49 end 57 end 58 50 59 macro dist.off 51 60 task dist.process.load … … 59 68 end 60 69 task dist.advance.run 61 active false62 end63 task dist.queueruns64 70 active false 65 71 end … … 74 80 npending 1 75 81 76 stdout NULL77 stderr $LOGDIR/dist.process.log78 82 79 83 task.exec 80 $run = disttool -pendingcomponent 84 # stdout NULL 85 # stderr $LOGSUBDIR/dist.process.load.log 86 87 $run = disttool -pendingcomponent -stage $DIST_STAGE:$currentStage 88 $currentStage ++ 89 if ($currentStage >= $DIST_STAGE:n) set currentStage = 0 90 81 91 if ($DB:n == 0) 82 92 option DEFAULT … … 85 95 option $DB:$distToProcess_DB 86 96 $run = $run -dbname $DB:$distToProcess_DB 87 $distToProcess_DB ++ 88 if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0 97 98 # only increment the database number after we have gone through all of 99 # the stages 100 if ($currentStage == 0) 101 $distToProcess_DB ++ 102 if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0 103 end 89 104 end 90 105 add_poll_args run … … 134 149 if ("$pageName" == "NULL") break 135 150 151 # echo running $pageName 152 136 153 book setword distToProcess $pageName pantaskState RUN 137 154 book getword distToProcess $pageName dist_id -var DIST_ID 138 155 book getword distToProcess $pageName camera -var CAMERA 139 book getword distToProcess $pageName stage -var STAGE140 book getword distToProcess $pageName stage_id -var STAGE_ID156 book getword distToProcess $pageName stage -var DIST_STAGE 157 book getword distToProcess $pageName stage_id -var DIST_STAGE_ID 141 158 book getword distToProcess $pageName clean -var CLEAN 142 159 book getword distToProcess $pageName component -var COMPONENT … … 159 176 $EXTRA_ARGS = $EXTRA_ARGS --magicked 160 177 end 161 # no_magic is output as integer due to the union in the sql162 if ( $NO_MAGIC)178 # is this right for stack and fake? 179 if ("$NO_MAGIC" == "T") 163 180 $EXTRA_ARGS = $EXTRA_ARGS --no_magic 164 181 end … … 170 187 # set.workdir.by.camera $CAMERA $MAGIC_ID $WORKDIR_TEMPLATE $default_host WORKDIR 171 188 # host anyhost 172 173 189 174 190 substr $COMPONENT 0 3 COMP_HEAD … … 180 196 end 181 197 182 183 198 sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT 184 stdout $logfile185 stderr $logfile186 187 $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 $logfile199 # 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 188 203 189 204 add_standard_args run … … 211 226 end 212 227 213 214 228 task dist.advance.load 215 229 host local … … 220 234 npending 1 221 235 222 stdout NULL223 stderr $LOGDIR/dist.advance.load.log224 225 236 task.exec 237 # stderr $LOGSUBDIR/dist.advance.load.log 238 226 239 $run = disttool -toadvance 227 240 if ($DB:n == 0) … … 261 274 end 262 275 end 276 263 277 264 278 task dist.advance.run … … 291 305 292 306 sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID 293 stdout $logfile294 stderr $logfile307 # stdout $logfile 308 # stderr $logfile 295 309 296 310 $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile … … 318 332 end 319 333 end 320 321 task dist.queueruns322 # host local323 324 periods -poll $RUNPOLL325 periods -exec 30326 periods -timeout 45327 npending 1328 329 active false330 331 # stdout $LOGDIR/dist.queuruns332 # stderr $LOGDIR/dist.queueruns333 334 task.exec335 $MYARGS = ""336 # assume that we need magic unless we are running simtest337 if ($?SIMTEST_CAMERA != 0)338 $MYARGS = --no_magic339 end340 341 $run = dist_queue_runs.pl $MYARGS --stage_limit 16 --logfile $LOGDIR/dist.queueruns342 343 if ($DB:n == 0)344 $DBNAME = DEFAULT345 else346 # save the DB name for add_standard_args347 $DBNAME = $DB:$distQueue_DB348 $distQueue_DB ++349 if ($distQueue_DB >= $DB:n) set distQueue_DB = 0350 end351 352 host anyhost353 354 add_standard_args run355 356 # create the command line357 if ($VERBOSE > 1)358 echo command $run359 end360 command $run361 end362 363 task.exit $EXIT_SUCCESS364 # nothing to do365 end366 367 # default exit status368 task.exit default369 showcommand failure370 end371 372 # operation timed out?373 task.exit timeout374 showcommand timeout375 end376 377 # operation timed out?378 task.exit crash379 showcommand crash380 end381 end
Note:
See TracChangeset
for help on using the changeset viewer.
