- Timestamp:
- Jan 3, 2014, 1:54:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bills_branches/bills_201312/ippTasks/fullforce.pro
r36388 r36417 8 8 ### Initialise the books containing the tasks to do 9 9 book init fullForceRun 10 book init fullForceSummary 10 11 11 12 ### Database lists 12 13 $fullForce_DB = 0 13 14 $fullForce_revert_DB = 0 15 $fullForceSummary_DB = 0 16 $fullForceSummary_revert_DB = 0 14 17 15 18 ### Check status of fullForce tasks 16 macro full Force.status19 macro fullforce.status 17 20 book listbook fullForceRun 18 21 end 19 22 20 23 ### Reset fullForce tasks 21 macro full Force.reset24 macro fullforce.reset 22 25 book init fullForceRun 23 26 end 27 macro fullforce.summary.status 28 book listbook fullForceSummary 29 end 30 31 ### Reset fullForce tasks 32 macro fullforce.summary.reset 33 book init fullForceSummary 34 end 24 35 25 36 ### Turn fullForce tasks on 26 macro fullForce.on 27 task fullForce.load 28 active true 29 end 30 task fullForce.run 37 macro fullforce.on 38 task fullforce.load 39 active true 40 end 41 task fullforce.run 42 active true 43 end 44 task fullforce.summary.load 45 active true 46 end 47 task fullforce.summary.run 31 48 active true 32 49 end … … 34 51 35 52 ### Turn fullForce tasks off 36 macro fullForce.off 37 task fullForce.load 38 active false 39 end 40 task fullForce.run 41 active false 42 end 43 end 44 45 macro fullForce.revert.on 46 task fullForce.revert 47 active true 48 end 49 end 50 51 macro fullForce.revert.off 52 task fullForce.revert 53 active false 54 end 55 end 56 57 ### Load tasks for fullForce 53 macro fullforce.off 54 task fullforce.load 55 active false 56 end 57 task fullforce.run 58 active false 59 end 60 task fullforce.summary.load 61 active false 62 end 63 task fullforce.summary.run 64 active false 65 end 66 end 67 68 macro fullforce.revert.on 69 task fullforce.revert 70 active true 71 end 72 task fullforce.summary.revert 73 active true 74 end 75 end 76 77 macro fullforce.revert.off 78 task fullforce.revert 79 active false 80 end 81 task fullforce.summary.revert 82 active false 83 end 84 end 85 86 ### Load tasks for fullforce 58 87 ### Tasks are loaded into fullForceRun. 59 task full Force.load88 task fullforce.load 60 89 host local 61 90 … … 66 95 67 96 stdout NULL 68 stderr $LOGDIR/full Force.log97 stderr $LOGDIR/fullforce.log 69 98 70 99 task.exec … … 88 117 task.exit 0 89 118 # convert 'stdout' to book format 90 ipptool2book stdout fullForceRun -key ff_id -uniq -setword dbname $options:0 -setword pantaskState INIT119 ipptool2book stdout fullForceRun -key ff_id:warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 91 120 if ($VERBOSE > 2) 92 121 book listbook fullForceRun … … 112 141 end 113 142 114 ### Run tasks for the full Force analysis143 ### Run tasks for the fullforce analysis 115 144 ### Tasks are taken from fullForceRun. 116 task full Force.run145 task fullforce.run 117 146 periods -poll $RUNPOLL 118 147 periods -exec $RUNEXEC … … 152 181 sprintf outroot "%s/%s/%s/%s.%s.wrp.%s.ff.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $WARP_ID $FF_ID 153 182 154 stdout $LOGDIR/full Force.log155 stderr $LOGDIR/full Force.log156 157 $run = psphot_fullforce_warp.pl --ff_id $FF_ID -- outroot $outroot --redirect-output --camera $CAMERA --warp_path_base $WARP_PATH_BASE --sources_path_base $SOURCES_PATH_BASE --skycell_id $SKYCELL_ID --threads @MAX_THREADS@183 stdout $LOGDIR/fullforce.log 184 stderr $LOGDIR/fullforce.log 185 186 $run = psphot_fullforce_warp.pl --ff_id $FF_ID --warp_id $WARP_ID --outroot $outroot --redirect-output --camera $CAMERA --warp_path_base $WARP_PATH_BASE --sources_path_base $SOURCES_PATH_BASE --skycell_id $SKYCELL_ID --threads @MAX_THREADS@ 158 187 if ("$REDUCTION" != "NULL") 159 188 $run = $run --reduction $REDUCTION … … 192 221 end 193 222 194 task full Force.revert223 task fullforce.revert 195 224 host local 196 225 … … 202 231 203 232 stdout NULL 204 stderr $LOGDIR/ revert.log233 stderr $LOGDIR/fullforce.revert.log 205 234 206 235 task.exec … … 243 272 end 244 273 274 ### Load tasks for fullForceSummary 275 ### Tasks are loaded into fullForceSummary. 276 task fullforce.summary.load 277 host local 278 279 periods -poll $LOADPOLL 280 periods -exec $LOADEXEC 281 periods -timeout 30 282 npending 1 283 284 stdout NULL 285 stderr $LOGDIR/fullforce.summary.log 286 287 task.exec 288 if ($LABEL:n == 0) break 289 $run = fftool -toadvance 290 if ($DB:n == 0) 291 option DEFAULT 292 else 293 # save the DB name for the exit tasks 294 option $DB:$fullForceSummary_DB 295 $run = $run -dbname $DB:$fullForceSummary_DB 296 $fullForceSummary_DB ++ 297 if ($fullForceSummary_DB >= $DB:n) set fullForceSummary_DB = 0 298 end 299 add_poll_args run 300 add_poll_labels run 301 command $run 302 end 303 304 # success 305 task.exit 0 306 # convert 'stdout' to book format 307 ipptool2book stdout fullForceSummary -key ff_id -uniq -setword dbname $options:0 -setword pantaskState INIT 308 if ($VERBOSE > 2) 309 book listbook fullForceSummary 310 end 311 312 # delete existing entries in the appropriate pantaskStates 313 process_cleanup fullForceSummary 314 end 315 316 # locked list 317 task.exit default 318 showcommand failure 319 end 320 321 task.exit crash 322 showcommand crash 323 end 324 325 # operation times out? 326 task.exit timeout 327 showcommand timeout 328 end 329 end 330 331 ### Run tasks for the fullForceSummary analyasis 332 ### Tasks are taken from fullForceSummary. 333 task fullforce.summary.run 334 periods -poll $RUNPOLL 335 periods -exec $RUNEXEC 336 periods -timeout 10800 337 338 task.exec 339 # if we are unable to run use "long" exectime 340 periods -exec $RUNEXEC 341 book npages fullForceSummary -var N 342 if ($N == 0) break 343 if ($NETWORK == 0) break 344 if ($BURNTOOLING == 1) break 345 346 347 # look for new entries in fullForceSummary (pantaskState == INIT) 348 book getpage fullForceSummary 0 -var pageName -key pantaskState INIT 349 if ("$pageName" == "NULL") break 350 351 book setword fullForceSummary $pageName pantaskState RUN 352 book getword fullForceSummary $pageName ff_id -var FF_ID 353 book getword fullForceSummary $pageName tess_id -var TESS_DIR 354 book getword fullForceSummary $pageName skycell_id -var SKYCELL_ID 355 book getword fullForceSummary $pageName camera -var CAMERA 356 book getword fullForceSummary $pageName workdir -var WORKDIR_TEMPLATE 357 book getword fullForceSummary $pageName reduction -var REDUCTION 358 book getword fullForceSummary $pageName dbname -var DBNAME 359 360 # set the host and workdir based on the skycell hash 361 # set.host.for.skycell $SKYCELL_ID 362 host anyhost 363 set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR 364 365 basename $TESS_DIR -var TESS_ID 366 sprintf outroot "%s/%s/%s/%s.%s.ff.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $FF_ID 367 368 stdout $LOGDIR/fullforce.summary.log 369 stderr $LOGDIR/fullforce.summary.log 370 371 $run = psphot_fullforce_summary.pl --ff_id $FF_ID --outroot $outroot --redirect-output --camera $CAMERA --threads @MAX_THREADS@ 372 if ("$REDUCTION" != "NULL") 373 $run = $run --reduction $REDUCTION 374 end 375 add_standard_args run 376 377 # save the pageName for future reference below 378 options $pageName 379 380 # create the command line 381 if ($VERBOSE > 1) 382 echo command $run 383 end 384 # since we have work to do shorten exec time 385 periods -exec .05 386 command $run 387 end 388 389 # default exit status 390 task.exit default 391 process_exit fullForceSummary $options:0 $JOB_STATUS 392 end 393 394 # locked list 395 task.exit crash 396 showcommand crash 397 echo "hostname: $JOB_HOSTNAME" 398 book setword fullForceSummary $options:0 pantaskState CRASH 399 end 400 401 # operation timed out? 402 task.exit timeout 403 showcommand timeout 404 book setword fullForceSummary $options:0 pantaskState TIMEOUT 405 end 406 end 407 408 task fullforce.summary.revert 409 host local 410 411 periods -poll 10.0 412 periods -exec 1200.0 413 periods -timeout 120.0 414 npending 1 415 active true 416 417 stdout NULL 418 stderr $LOGDIR/fullforce.summary.revert.log 419 420 task.exec 421 if ($LABEL:n == 0) break 422 # Only revert failures with fault=2 (SYS_ERROR), which tend to be 423 # temporary filesystem problems. Every other fault type is 424 # interesting and should be kept for debugging (and so it does not 425 # continue to occur). 426 $run = fftool -revertsummary -fault 2 427 if ($DB:n == 0) 428 option DEFAULT 429 else 430 # save the DB name for the exit tasks 431 option $DB:$fullForceSummary_revert_DB 432 $run = $run -dbname $DB:$fullForceSummary_revert_DB 433 $fullForceSummary_revert_DB ++ 434 if ($fullForceSummary_revert_DB >= $DB:n) set fullForceSummary_revert_DB = 0 435 end 436 add_poll_labels run 437 command $run 438 end 439 440 # success 441 task.exit 0 442 end 443 444 # locked list 445 task.exit default 446 showcommand failure 447 end 448 449 task.exit crash 450 showcommand crash 451 end 452 453 # operation times out? 454 task.exit timeout 455 showcommand timeout 456 end 457 end 458
Note:
See TracChangeset
for help on using the changeset viewer.
