Changeset 28045 for branches/czw_branch/20100519/ippTasks/warp.pro
- Timestamp:
- May 19, 2010, 5:46:14 PM (16 years ago)
- File:
-
- 1 edited
-
branches/czw_branch/20100519/ippTasks/warp.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20100519/ippTasks/warp.pro
r27926 r28045 55 55 active true 56 56 end 57 task warp.summary.load 58 active true 59 end 60 task warp.summary.run 61 active true 62 end 57 63 end 58 64 … … 78 84 end 79 85 task warp.revert.warped 86 active false 87 end 88 task warp.summary.load 89 active false 90 end 91 task warp.summary.run 80 92 active false 81 93 end … … 525 537 end 526 538 end 539 540 ### Load tasks for doing the warps 541 ### Tasks are loaded into warpPendingSkyCell. 542 task warp.summary.load 543 host local 544 545 periods -poll $LOADPOLL 546 periods -exec $LOADEXEC 547 periods -timeout 1200 548 npending 1 549 550 stdout NULL 551 stderr $LOGDIR/warp.summary.log 552 553 task.exec 554 if ($LABEL:n == 0) break 555 $run = warptool -tosummary 556 if ($DB:n == 0) 557 option DEFAULT 558 else 559 # save the DB name for the exit tasks 560 option $DB:$warpSummary_DB 561 $run = $run -dbname $DB:$warpSummary_DB 562 $warpSummary_DB ++ 563 if ($warpSummary_DB >= $DB:n) set warpSummary_DB = 0 564 end 565 add_poll_args run 566 add_poll_labels run 567 command $run 568 end 569 570 # success 571 task.exit 0 572 # convert 'stdout' to book format 573 # XXX change tess_id to tess_dir when db is updated 574 ipptool2book stdout warpPendingSummary -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 575 if ($VERBOSE > 2) 576 book listbook warpPendingSummary 577 end 578 579 # delete existing entries in the appropriate pantaskStates 580 process_cleanup warpPendingSummary 581 end 582 583 # locked list 584 task.exit default 585 showcommand failure 586 end 587 588 task.exit crash 589 showcommand crash 590 end 591 592 # operation times out? 593 task.exit timeout 594 showcommand timeout 595 end 596 end 597 598 ### Run tasks for calculating the warp overlaps 599 ### Tasks are taken from warpPendingSkyCell. 600 task warp.summary.run 601 periods -poll $RUNPOLL 602 periods -exec $RUNEXEC 603 periods -timeout 60 604 605 task.exec 606 # if we are unable to run the 'exec', use a long retry time 607 periods -exec $RUNEXEC 608 609 book npages warpPendingSummary -var N 610 if ($N == 0) break 611 if ($NETWORK == 0) break 612 613 # look for new images in warpPendingSkyCell (pantaskState == INIT) 614 book getpage warpPendingSummary 0 -var pageName -key pantaskState INIT 615 if ("$pageName" == "NULL") break 616 617 book setword warpPendingSummary $pageName pantaskState RUN 618 book getword warpPendingSummary $pageName warp_id -var WARP_ID 619 book getword warpPendingSummary $pageName camera -var CAMERA 620 book getword warpPendingSummary $pageName workdir -var WORKDIR_TEMPLATE 621 book getword warpPendingSummary $pageName dbname -var DBNAME 622 book getword warpPendingSummary $pageName tess_id -var TESS_DIR 623 book getword warpPendingSummary $pageName exp_tag -var EXP_TAG 624 book getword warpPendingSummary $pageName state -var RUN_STATE 625 626 # set the host and workdir based on the skycell hash 627 host anyhost 628 strsub $WORKDIR_TEMPLATE @HOST@.0 $default_host -var WORKDIR 629 # set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR 630 631 # if ("$PATH_BASE" == "NULL") 632 ## generate outroot specific to this exposure 633 basename $TESS_DIR -var TESS_ID 634 635 sprintf outroot "%s/%s/%s.wrp.%s.%s" $WORKDIR $EXP_TAG $EXP_TAG $WARP_ID $TESS_ID 636 637 638 stdout $LOGDIR/warp.summary.log 639 stderr $LOGDIR/warp.summary.log 640 641 $run = skycell_jpeg.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --outroot $outroot 642 add_standard_args run 643 644 # save the pageName for future reference below 645 options $pageName 646 647 # create the command line 648 if ($VERBOSE > 1) 649 echo command $run 650 end 651 periods -exec 0.05 652 command $run 653 end 654 655 # default exit status 656 task.exit default 657 process_exit warpPendingSummary $options:0 $JOB_STATUS 658 end 659 660 # locked list 661 task.exit crash 662 showcommand crash 663 echo "hostname: $JOB_HOSTNAME" 664 book setword warpPendingSummary $options:0 pantaskState CRASH 665 end 666 667 # operation timed out? 668 task.exit timeout 669 showcommand timeout 670 book setword warpPendingSummary $options:0 pantaskState TIMEOUT 671 end 672 end
Note:
See TracChangeset
for help on using the changeset viewer.
