Changeset 29515 for branches/eam_branches/ipp-20100823/ippTasks
- Timestamp:
- Oct 21, 2010, 2:45:13 PM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823/ippTasks
- Files:
-
- 9 edited
- 2 copied
-
Makefile.am (modified) (1 diff)
-
destreak.cleanup.pro (copied) (copied from trunk/ippTasks/destreak.cleanup.pro )
-
destreak.pro (modified) (11 diffs)
-
diskbalance.pro (copied) (copied from trunk/ippTasks/diskbalance.pro )
-
dist.pro (modified) (3 diffs)
-
magic.pro (modified) (3 diffs)
-
nightly_stacks.pro (modified) (7 diffs)
-
pstamp.pro (modified) (5 diffs)
-
publish.pro (modified) (1 diff)
-
replicate.pro (modified) (2 diffs)
-
science.cleanup.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/ippTasks/Makefile.am
r28632 r29515 18 18 magic.pro \ 19 19 destreak.pro \ 20 destreak.cleanup.pro \ 20 21 diff.pro \ 21 22 stack.pro \ -
branches/eam_branches/ipp-20100823/ippTasks/destreak.pro
r29124 r29515 10 10 book init magicToDS 11 11 book init magicDSToRevert 12 book init magicDSToCleanup13 12 14 13 ### indexes into Database lists … … 30 29 $magicDSRevertStage = 0 31 30 31 macro destreak.show.stages 32 echo $DS_STAGE:n stages enabled for destreak processing 33 for i 0 $DS_STAGE:n 34 echo $i $DS_STAGE:$i 35 end 36 echo current magicDSStage = $magicDSStage 37 echo current magicDSRevertStage = $magicDSRevertStage 38 end 39 32 40 ### Check status of tasks 33 41 macro destreak.status 34 # since echo and listbook output go to different files these do not come in order35 echo magicToDS36 42 book listbook magicToDS 37 echo magicDSToRevert38 43 book listbook magicDSToRevert 39 echo magicDSToCleanup40 book listbook magicDSToCleanup41 44 end 42 45 … … 45 48 book init magicToDS 46 49 book init magicDSToRevert 47 book init magicDSToCleanup48 50 end 49 51 … … 73 75 end 74 76 75 macro destreak.cleanup.on76 task destreak.cleanup.load77 active true78 end79 task destreak.cleanup.run80 active true81 end82 end83 84 77 ### Turn tasks off 85 78 macro destreak.off … … 106 99 end 107 100 end 108 macro destreak.cleanup.off109 task destreak.cleanup.load110 active false111 end112 task destreak.cleanup.run113 active false114 end115 end116 117 101 118 102 task destreak.load … … 203 187 book getword magicToDS $pageName camera -var CAMERA 204 188 book getword magicToDS $pageName streaks_uri -var STREAKS 189 book getword magicToDS $pageName streaks_path_base -var STREAKS_PATH_BASE 205 190 book getword magicToDS $pageName inv_streaks_uri -var INV_STREAKS 191 book getword magicToDS $pageName inv_streaks_path_base -var INV_STREAKS_PATH_BASE 206 192 book getword magicToDS $pageName stage -var STAGE 207 193 book getword magicToDS $pageName stage_id -var STAGE_ID … … 229 215 # TODO: do not add recoveryroot or replace if they are null or zero 230 216 231 $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --magicked $MAGICKED217 $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks_path_base $STREAKS_PATH_BASE --inv_streaks_path_base $INV_STREAKS_PATH_BASE --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --magicked $MAGICKED 232 218 233 219 add_standard_args run … … 274 260 275 261 periods -poll $LOADPOLL 276 #periods -exec $LOADEXEC277 262 periods -exec 30 278 periods -timeout 60263 periods -timeout 300 279 264 npending 1 280 265 … … 293 278 add_poll_args run 294 279 add_poll_labels run 280 # since this command can be expensive, reduce the limit 281 $run = $run -limit 24 295 282 command $run 296 283 end … … 317 304 task destreak.revert.load 318 305 host local 319 320 periods -poll $LOADPOLL 321 periods -exec $LOADEXEC 322 periods -timeout 20 306 periods -poll 60.0 307 periods -exec 120. 308 periods -timeout 120 323 309 npending 1 324 310 active false … … 518 504 end 519 505 520 task destreak.cleanup.load521 host local522 523 periods -poll $LOADPOLL524 periods -exec $LOADEXEC525 periods -timeout 20526 npending 1527 active false528 529 stdout NULL530 stderr $LOGSUBDIR/destreak.cleanup.load.log531 532 task.exec533 $run = magicdstool -tocleanup534 if ($DB:n == 0)535 option DEFAULT536 else537 538 # save the DB name for the exit tasks539 option $DB:$magicDSToCleanup_DB540 $run = $run -dbname $DB:$magicDSToCleanup_DB541 542 # only bump database number after we have gone through all of the stages543 $magicDSToCleanup_DB ++544 if ($magicDSToCleanup_DB >= $DB:n) set magicDSToCleanup_DB = 0545 end546 add_poll_args run547 add_poll_labels run548 command $run549 end550 551 # success552 task.exit 0553 # convert 'stdout' to book format554 ipptool2book stdout magicDSToCleanup -key magic_ds_id -uniq -setword dbname $options:0 -setword pantaskState INIT555 if ($VERBOSE > 2)556 book listbook magicDSToCleanup557 end558 559 # delete existing entries in the appropriate pantaskStates560 process_cleanup magicDSToCleanup561 end562 563 # locked list564 task.exit default565 showcommand failure566 end567 568 task.exit crash569 showcommand crash570 end571 572 # operation times out?573 task.exit timeout574 showcommand timeout575 end576 end577 578 task destreak.cleanup.run579 periods -poll $RUNPOLL580 periods -exec $RUNEXEC581 periods -timeout 60582 active false583 584 task.exec585 stdout $LOGSUBDIR/destreak.cleanup.run.log586 stderr $LOGSUBDIR/destreak.cleanup.run.log587 588 # if we are unable to run the 'exec', use a long retry time589 periods -exec $RUNEXEC590 591 book npages magicDSToCleanup -var N592 if ($N == 0) break593 if ($NETWORK == 0) break594 595 # look for new images (pantaskState == INIT)596 book getpage magicDSToCleanup 0 -var pageName -key pantaskState INIT597 if ("$pageName" == "NULL") break598 599 book setword magicDSToCleanup $pageName pantaskState RUN600 book getword magicDSToCleanup $pageName magic_ds_id -var MAGIC_DS_ID601 book getword magicDSToCleanup $pageName camera -var CAMERA602 book getword magicDSToCleanup $pageName stage -var STAGE603 book getword magicDSToCleanup $pageName outroot -var OUTROOT604 book getword magicDSToCleanup $pageName dbname -var DBNAME605 606 sprintf logfile "%s/mds.%s.cleanup.log" $OUTROOT $MAGIC_DS_ID607 608 host anyhost609 610 $run = magic_destreak_cleanup.pl --magic_ds_id $MAGIC_DS_ID --stage $STAGE --camera $CAMERA --logfile $logfile611 612 add_standard_args run613 614 # save the pageName for future reference below615 options $pageName616 617 # create the command line618 if ($VERBOSE > 1)619 echo command $run620 end621 # if we are ready to run, drop the retry timeout low so we fill up the queue622 periods -exec 0.05623 command $run624 end625 626 # default exit status627 task.exit 0628 process_exit magicDSToCleanup $options:0 $JOB_STATUS629 end630 631 # locked list632 task.exit default633 showcommand failure634 process_exit magicDSToCleanup $options:0 $JOB_STATUS635 end636 637 task.exit crash638 showcommand crash639 book setword magicDSToCleanup $options:0 pantaskState CRASH640 end641 642 # operation timed out?643 task.exit timeout644 showcommand timeout645 book setword magicDSToCleanup $options:0 pantaskState TIMEOUT646 end647 end648 -
branches/eam_branches/ipp-20100823/ippTasks/dist.pro
r29124 r29515 176 176 host local 177 177 178 periods -poll $LOADPOLL178 periods -poll 20 179 179 periods -exec $LOADEXEC 180 periods -timeout 30 180 periods -timeout 300 181 181 npending 1 182 182 … … 338 338 339 339 periods -poll $LOADPOLL 340 periods -exec $LOADEXEC341 periods -timeout 30 340 periods -exec 30 341 periods -timeout 3000 342 342 npending 1 343 343 … … 479 479 end 480 480 add_poll_labels run 481 echo $run482 481 command $run 483 482 end -
branches/eam_branches/ipp-20100823/ippTasks/magic.pro
r27620 r29515 288 288 book getword magicToProcess $pageName camera -var CAMERA 289 289 book getword magicToProcess $pageName workdir -var WORKDIR_TEMPLATE 290 book getword magicToProcess $pageName raw_workdir -var RAW_TEMPLATE 291 book getword magicToProcess $pageName exp_name -var EXP_NAME 290 292 book getword magicToProcess $pageName dbname -var DBNAME 291 293 … … 308 310 sprintf baseroot "%s/%s/%s.mgc.%s" $WORKDIR $EXP_ID $EXP_ID $MAGIC_ID 309 311 312 if ("$NODE" == "root") 313 # This is the root node, put the streaks file into the rawExps workdir 314 # which is presumably in nebulous and thus will be replicatable 315 set.workdir.by.camera $CAMERA FPA $RAW_TEMPLATE $default_host RAW_WORKDIR 316 sprintf final_outroot "%s/%s.%s/%s.%s.mgc.%s" $RAW_WORKDIR $EXP_NAME $EXP_ID $EXP_NAME $EXP_ID $MAGIC_ID 317 318 $EXTRA_ARGS = --final-outroot $final_outroot 319 else 320 $EXTRA_ARGS = "" 321 end 322 310 323 $logfile = $baseroot.$NODE.log 311 324 if ("$logfile" == "") … … 319 332 mkdir $outpath 320 333 321 $run = magic_process.pl --magic_id $MAGIC_ID --camera $CAMERA --node $NODE --baseroot $baseroot --logfile $logfile 334 $run = magic_process.pl --magic_id $MAGIC_ID --camera $CAMERA --node $NODE --baseroot $baseroot --logfile $logfile $EXTRA_ARGS 322 335 add_standard_args run 323 336 -
branches/eam_branches/ipp-20100823/ippTasks/nightly_stacks.pro
r28982 r29515 436 436 437 437 book getword nsData $options:0 nsNmacros -var ns_Nmacros 438 for i 0 $ns_Nmacros 439 sprintf macroName "ns%dMacro" $i 440 book getword nsData $options:0 $macroName -var macroCmd 441 $macroCmd 438 if ("$ns_Nmacros" != "NULL") 439 for i 0 $ns_Nmacros 440 sprintf macroName "ns%dMacro" $i 441 book getword nsData $options:0 $macroName -var macroCmd 442 $macroCmd 443 end 442 444 end 443 445 … … 498 500 499 501 book getword nsData $options:0 nsNmacros -var ns_Nmacros 500 for i 0 $ns_Nmacros 501 sprintf macroName "ns%dMacro" $i 502 book getword nsData $options:0 $macroName -var macroCmd 503 $macroCmd 502 if ("$ns_Nmacros" != "NULL") 503 for i 0 $ns_Nmacros 504 sprintf macroName "ns%dMacro" $i 505 book getword nsData $options:0 $macroName -var macroCmd 506 $macroCmd 507 end 504 508 end 505 509 … … 560 564 561 565 book getword nsData $options:0 nsNmacros -var ns_Nmacros 562 for i 0 $ns_Nmacros 563 sprintf macroName "ns%dMacro" $i 564 book getword nsData $options:0 $macroName -var macroCmd 565 $macroCmd 566 if ("$ns_Nmacros" != "NULL") 567 for i 0 $ns_Nmacros 568 sprintf macroName "ns%dMacro" $i 569 book getword nsData $options:0 $macroName -var macroCmd 570 $macroCmd 571 end 566 572 end 567 573 … … 623 629 624 630 book getword nsData $options:0 nsNmacros -var ns_Nmacros 625 for i 0 $ns_Nmacros 626 sprintf macroName "ns%dMacro" $i 627 book getword nsData $options:0 $macroName -var macroCmd 628 $macroCmd 631 if ("$ns_Nmacros" != "NULL") 632 for i 0 $ns_Nmacros 633 sprintf macroName "ns%dMacro" $i 634 book getword nsData $options:0 $macroName -var macroCmd 635 $macroCmd 636 end 629 637 end 630 638 … … 684 692 685 693 book getword nsData $options:0 nsNmacros -var ns_Nmacros 686 for i 0 $ns_Nmacros 687 sprintf macroName "ns%dMacro" $i 688 book getword nsData $options:0 $macroName -var macroCmd 689 $macroCmd 694 if ("$ns_Nmacros" != "NULL") 695 for i 0 $ns_Nmacros 696 sprintf macroName "ns%dMacro" $i 697 book getword nsData $options:0 $macroName -var macroCmd 698 $macroCmd 699 end 690 700 end 691 701 … … 747 757 748 758 book getword nsData $options:0 nsNmacros -var ns_Nmacros 749 for i 0 $ns_Nmacros 750 sprintf macroName "ns%dMacro" $i 751 book getword nsData $options:0 $macroName -var macroCmd 752 $macroCmd 759 if ("$ns_Nmacros" != "NULL") 760 for i 0 $ns_Nmacros 761 sprintf macroName "ns%dMacro" $i 762 book getword nsData $options:0 $macroName -var macroCmd 763 $macroCmd 764 end 753 765 end 754 766 … … 870 882 871 883 book getword nsData $options:0 nsNmacros -var ns_Nmacros 872 for i 0 $ns_Nmacros 873 sprintf macroName "ns%dMacro" $i 874 book getword nsData $options:0 $macroName -var macroCmd 875 $macroCmd 884 if ("$ns_Nmacros" != "NULL") 885 for i 0 $ns_Nmacros 886 sprintf macroName "ns%dMacro" $i 887 book getword nsData $options:0 $macroName -var macroCmd 888 $macroCmd 889 end 876 890 end 877 891 -
branches/eam_branches/ipp-20100823/ippTasks/pstamp.pro
r28779 r29515 14 14 $pstampRev_DB = 0 15 15 $pstampDep_DB = 0 16 $pstampRevDep_DB = 0 16 17 $pstampCleanup_DB = 0 18 $pstampStopFaulted_DB = 0 17 19 18 20 # set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config … … 89 91 active false 90 92 end 91 task pstamp.job.revert92 active false93 end94 93 task pstamp.dependent.load 95 94 active false … … 104 103 active true 105 104 end 105 task pstamp.dependent.revert 106 active true 107 end 108 task pstamp.stopfaulted 109 active true 110 end 106 111 end 107 112 macro pstamp.revert.off 108 113 task pstamp.job.revert 114 active false 115 end 116 task pstamp.dependent.revert 117 active false 118 end 119 task pstamp.stopfaulted 109 120 active false 110 121 end … … 513 524 stdout NULL 514 525 stderr $LOGSUBDIR/pstamp.job.revert.log 515 $run = pstamptool -revertjob -all526 $run = pstamptool -revertjob 516 527 if ($DB:n == 0) 517 528 option DEFAULT … … 798 809 end 799 810 811 task pstamp.dependent.revert 812 host local 813 814 periods -poll $LOADPOLL 815 periods -exec 900 816 periods -timeout 300 817 npending 1 818 819 task.exec 820 stdout NULL 821 stderr $LOGSUBDIR/pstamp.dependent.revert.log 822 $run = pstamptool -revertdependent 823 if ($DB:n == 0) 824 option DEFAULT 825 else 826 $run = $run $PS_DBSERVER -dbname $DB:$pstampRevDep_DB 827 $pstampRevDep_DB ++ 828 if ($pstampRevDep_DB >= $DB:n) set pstampRevDep_DB = 0 829 end 830 add_poll_args run 831 add_poll_labels run 832 command $run 833 end 834 835 task.exit $EXIT_SUCCESS 836 # nothing to do 837 end 838 839 task.exit default 840 showcommand failure 841 end 842 843 task.exit crash 844 showcommand crash 845 end 846 847 task.exit timeout 848 showcommand timeout 849 end 850 end 851 852 task pstamp.stopfaulted 853 host local 854 855 periods -poll $LOADPOLL 856 periods -exec 30 857 periods -timeout 300 858 npending 1 859 860 task.exec 861 stderr $LOGSUBDIR/pstamp.stopfaulted.log 862 stderr $LOGSUBDIR/pstamp.stopfaulted.log 863 $run = pstampstopfaulted 864 if ($DB:n == 0) 865 option DEFAULT 866 else 867 $run = $run $PS_DBSERVER -dbname $DB:$pstampStopFaulted_DB 868 $pstampStopFaulted_DB ++ 869 if ($pstampStopFaulted_DB >= $DB:n) set pstampStopFaulted_DB = 0 870 end 871 add_poll_args run 872 add_poll_labels run 873 command $run 874 end 875 876 task.exit $EXIT_SUCCESS 877 # nothing to do 878 end 879 880 task.exit default 881 showcommand failure 882 end 883 884 task.exit crash 885 showcommand crash 886 end 887 888 task.exit timeout 889 showcommand timeout 890 end 891 end -
branches/eam_branches/ipp-20100823/ippTasks/publish.pro
r27074 r29515 75 75 76 76 task.exec 77 if ($LABEL:n == 0) break 78 #otherwise everything will be queued when there is no label. 77 79 $run = pubtool -definerun 78 80 if ($DB:n == 0) -
branches/eam_branches/ipp-20100823/ippTasks/replicate.pro
r24847 r29515 173 173 book getword replicatePending $pageName volume_name -var VOLUME_NAME 174 174 book getword replicatePending $pageName volume_host -var VOLUME_HOST 175 book getword replicatePending $pageName command -var COMMAND 175 176 176 177 set.host.for.replicate $VOLUME_HOST … … 180 181 181 182 # these operations do not require a database to be specified 182 $run = neb-replicate --copies $NEED_COPIES$KEY183 $run = $COMMAND $KEY 183 184 184 185 # save the pageName for future reference below -
branches/eam_branches/ipp-20100823/ippTasks/science.cleanup.pro
r24595 r29515 113 113 task.exec 114 114 book npages chipPendingCleanup -var N 115 if ($N == 0) break 115 if ($N == 0) 116 periods -exec $RUNEXEC 117 break 118 end 116 119 if ($NETWORK == 0) break 117 120 … … 143 146 echo command $run 144 147 end 148 periods -exec 0.05 145 149 command $run 146 150 end … … 569 573 task.exec 570 574 book npages warpPendingCleanup -var N 571 if ($N == 0) break 575 if ($N == 0) 576 periods -exec $RUNEXEC 577 break 578 end 572 579 if ($NETWORK == 0) break 573 580 … … 599 606 echo command $run 600 607 end 608 periods -exec 0.05 601 609 command $run 602 610 end … … 721 729 task.exec 722 730 book npages diffCleanup -var N 723 if ($N == 0) break 731 if ($N == 0) 732 periods -exec $RUNEXEC 733 break 734 end 724 735 if ($NETWORK == 0) break 725 736 … … 751 762 echo command $run 752 763 end 764 periods -exec 0.05 753 765 command $run 754 766 end
Note:
See TracChangeset
for help on using the changeset viewer.
