Changeset 27840 for branches/simtest_nebulous_branches/ippTasks/diff.pro
- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/diff.pro (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/ippTasks/diff.pro
r24595 r27840 14 14 ### Database lists 15 15 $diffSkycell_DB = 0 16 $diffAdvance_DB = 0 17 $diff_revert_DB = 0 16 18 #$diffCleanup_DB = 0 17 19 … … 36 38 active true 37 39 end 40 task diff.advance 41 active true 42 end 43 task diff.revert 44 active false 45 end 38 46 end 39 47 … … 46 54 active false 47 55 end 56 task diff.advance 57 active false 58 end 59 task diff.revert 60 active false 61 end 62 end 63 64 macro diff.revert.on 65 task diff.revert 66 active true 67 end 68 end 69 70 macro diff.revert.off 71 task diff.revert 72 active false 73 end 48 74 end 49 75 … … 69 95 ### Load tasks for doing the differences 70 96 ### Tasks are loaded into diffSkyfile. 97 98 71 99 task diff.skycell.load 72 100 host local … … 132 160 133 161 task.exec 162 # if we are unable to run the 'exec', use a long retry time 163 periods -exec $RUNEXEC 164 134 165 book npages diffSkyfile -var N 135 166 if ($N == 0) break 136 167 if ($NETWORK == 0) break 137 168 if ($BURNTOOLING == 1) break 169 138 170 # look for new images in diffSkyfile (pantaskState == INIT) 139 171 book getpage diffSkyfile 0 -var pageName -key pantaskState INIT … … 148 180 book getword diffSkyfile $pageName bothways -var BOTHWAYS 149 181 book getword diffSkyfile $pageName workdir -var WORKDIR_TEMPLATE 182 book getword diffSkyfile $pageName state -var RUN_STATE 150 183 book getword diffSkyfile $pageName dbname -var DBNAME 184 book getword diffSkyfile $pageName reduction -var REDUCTION 185 book getword diffSkyfile $pageName diff_mode -var DIFF_MODE 151 186 152 187 # set the host and workdir based on the skycell hash … … 158 193 # $WORKDIR = $WORKDIR_TEMPLATE 159 194 195 if (($DIFF_MODE == 1)||("$DIFF_MODE" == "NULL")) 196 $DIFF_TAG = "" 197 end 198 if ($DIFF_MODE == 2) 199 $DIFF_TAG = "WS." 200 end 201 if ($DIFF_MODE == 3) 202 $DIFF_TAG = "SW." 203 end 204 if ($DIFF_MODE == 4) 205 $DIFF_TAG = "SS." 206 end 207 160 208 basename $TESS_DIR -var TESS_ID 161 sprintf outroot "%s/%s/%s/%s.%s. dif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID$DIFF_ID209 sprintf outroot "%s/%s/%s/%s.%s.%sdif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_TAG $DIFF_ID 162 210 163 211 stdout $LOGDIR/diff.skycell.log 164 212 stderr $LOGDIR/diff.skycell.log 165 213 166 $run = diff_skycell.pl --threads @MAX_THREADS@ --diff_id $DIFF_ID --skycell_id $SKYCELL_ID --diff_skyfile_id $DIFF_SKYFILE_ID --outroot $outroot --redirect-output 214 $run = diff_skycell.pl --threads @MAX_THREADS@ --diff_id $DIFF_ID --skycell_id $SKYCELL_ID --diff_skyfile_id $DIFF_SKYFILE_ID --outroot $outroot --redirect-output --run-state $RUN_STATE 167 215 if ("$BOTHWAYS" == "T") 168 216 $run = $run --inverse 217 end 218 if ("$REDUCTION" != "NULL") 219 $run = $run --reduction $REDUCTION 169 220 end 170 221 add_standard_args run … … 177 228 echo command $run 178 229 end 230 periods -exec 0.05 179 231 command $run 180 232 end … … 198 250 end 199 251 end 252 253 254 # Advance exposures which have completed 255 task diff.advance 256 host local 257 258 periods -poll $LOADPOLL 259 # periods -exec $LOADEXEC 260 periods -exec 30 261 periods -timeout 60 262 npending 1 263 264 stdout NULL 265 stderr $LOGDIR/diff.advance.log 266 267 task.exec 268 if ($LABEL:n == 0) break 269 $run = difftool -advance 270 if ($DB:n == 0) 271 option DEFAULT 272 else 273 # save the DB name for the exit tasks 274 option $DB:$diffAdvance_DB 275 $run = $run -dbname $DB:$diffAdvance_DB 276 $diffAdvance_DB ++ 277 if ($diffAdvance_DB >= $DB:n) set diffAdvance_DB = 0 278 end 279 add_poll_args run 280 add_poll_labels run 281 command $run 282 end 283 284 # success 285 task.exit 0 286 end 287 288 # locked list 289 task.exit default 290 showcommand failure 291 end 292 293 task.exit crash 294 showcommand crash 295 end 296 297 # operation times out? 298 task.exit timeout 299 showcommand timeout 300 end 301 end 302 303 200 304 201 305 # # select images ready for diff analysis … … 316 420 # end 317 421 # end 422 423 task diff.revert 424 host local 425 426 periods -poll 60.0 427 periods -exec 1800.0 428 periods -timeout 120.0 429 npending 1 430 active false 431 432 stdout NULL 433 stderr $LOGDIR/revert.log 434 435 task.exec 436 if ($LABEL:n == 0) break 437 # Only revert failures with fault=2 (SYS_ERROR), which tend to be 438 # temporary filesystem problems. Every other fault type is 439 # interesting and should be kept for debugging (and so it doesn't 440 # continue to occur). 441 $run = difftool -revertdiffskyfile -fault 2 442 if ($DB:n == 0) 443 option DEFAULT 444 else 445 # save the DB name for the exit tasks 446 option $DB:$diff_revert_DB 447 $run = $run -dbname $DB:$diff_revert_DB 448 $diff_revert_DB ++ 449 if ($diff_revert_DB >= $DB:n) set diff_revert_DB = 0 450 end 451 add_poll_labels run 452 command $run 453 end 454 455 # success 456 task.exit 0 457 end 458 459 # locked list 460 task.exit default 461 showcommand failure 462 end 463 464 task.exit crash 465 showcommand crash 466 end 467 468 # operation times out? 469 task.exit timeout 470 showcommand timeout 471 end 472 end
Note:
See TracChangeset
for help on using the changeset viewer.
