Changeset 30049 for trunk/ippTasks
- Timestamp:
- Dec 15, 2010, 1:29:28 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 1 copied
-
. (modified) (1 prop)
-
ippTasks/Makefile.am (modified) (2 diffs)
-
ippTasks/nightly_science.pro (copied) (copied from branches/czw_branch/20101203/ippTasks/nightly_science.pro )
-
ippTasks/nightly_stacks.pro (modified) (15 diffs)
-
ippTasks/register.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/czw_branch/20101203 (added) merged: 29907-29909,29965,29982,30014,30017-30018,30047-30048
- Property svn:mergeinfo changed
-
trunk/ippTasks/Makefile.am
r29614 r30049 36 36 minidvodb.pro \ 37 37 minidvodbcopy.pro \ 38 nightly_s tacks.pro \38 nightly_science.pro \ 39 39 burntool.pro \ 40 40 lossy_compress.pro \ … … 47 47 site.manoa.pro \ 48 48 site.mhpcc.pro \ 49 site.mhpcc_testing.pro \ 49 50 surveys.mhpcc.config \ 50 51 simtest.pro \ -
trunk/ippTasks/nightly_stacks.pro
r29656 r30049 7 7 ns.detrends.off 8 8 ns.dqstats.on 9 ns.sweetspot.on10 ns.registration.on11 ns.burntool.on12 ns.chips.on9 # ns.sweetspot.on 10 # ns.registration.on 11 # ns.burntool.on 12 # ns.chips.on 13 13 ns.stacks.on 14 ns.diffs.on 14 15 end 15 16 … … 18 19 ns.detrends.off 19 20 ns.dqstats.off 20 ns.sweetspot.off21 ns.registration.off22 ns.burntool.off23 ns.chips.off21 # ns.sweetspot.off 22 # ns.registration.off 23 # ns.burntool.off 24 # ns.chips.off 24 25 ns.stacks.off 26 ns.diffs.off 25 27 end 26 28 … … 51 53 end 52 54 53 macro ns.sweetspot.on54 task ns.sweetspot.load55 active true56 end57 end58 59 macro ns.registration.on60 task ns.registration.load61 active true62 end63 end64 65 macro ns.burntool.on66 task ns.burntool.load67 active true68 end69 task ns.burntool.run70 active true71 end72 end73 74 macro ns.chips.on75 task ns.chips.load76 active true77 end78 task ns.chips.run79 active true80 end81 end55 # macro ns.sweetspot.on 56 # task ns.sweetspot.load 57 # active true 58 # end 59 # end 60 61 # macro ns.registration.on 62 # task ns.registration.load 63 # active true 64 # end 65 # end 66 67 # macro ns.burntool.on 68 # task ns.burntool.load 69 # active true 70 # end 71 # task ns.burntool.run 72 # active true 73 # end 74 # end 75 76 # macro ns.chips.on 77 # task ns.chips.load 78 # active true 79 # end 80 # task ns.chips.run 81 # active true 82 # end 83 # end 82 84 83 85 macro ns.stacks.on … … 93 95 end 94 96 97 macro ns.diffs.on 98 task ns.diffs.load 99 active false 100 end 101 task ns.diffs.run 102 active true 103 end 104 end 105 95 106 macro ns.initday.off 96 107 task ns.initday.load … … 111 122 end 112 123 113 macro ns.sweetspot.off114 task ns.sweetspot.load115 active false116 end117 end118 119 macro ns.registration.off120 task ns.registration.load121 active false122 end123 end124 125 macro ns.burntool.off126 task ns.burntool.load127 active false128 end129 task ns.burntool.run130 active false131 end132 end133 134 macro ns.chips.off135 task ns.chips.load136 active false137 end138 task ns.chips.run139 active false140 end141 end124 # macro ns.sweetspot.off 125 # task ns.sweetspot.load 126 # active false 127 # end 128 # end 129 130 # macro ns.registration.off 131 # task ns.registration.load 132 # active false 133 # end 134 # end 135 136 # macro ns.burntool.off 137 # task ns.burntool.load 138 # active false 139 # end 140 # task ns.burntool.run 141 # active false 142 # end 143 # end 144 145 # macro ns.chips.off 146 # task ns.chips.load 147 # active false 148 # end 149 # task ns.chips.run 150 # active false 151 # end 152 # end 142 153 143 154 macro ns.stacks.off … … 150 161 end 151 162 152 $ns_regPAGE = 0 153 $ns_burnPAGE = 0 154 $ns_RburnPAGE = 0 155 $ns_RburnCELL = 0 156 $ns_chipPAGE = 0 157 $ns_RchipPAGE = 0 163 macro ns.diffs.off 164 task ns.diffs.load 165 active false 166 end 167 task ns.diffs.run 168 active false 169 end 170 end 171 172 # $ns_regPAGE = 0 173 # $ns_burnPAGE = 0 174 # $ns_RburnPAGE = 0 175 # $ns_RburnCELL = 0 176 # $ns_chipPAGE = 0 177 # $ns_RchipPAGE = 0 158 178 $ns_stackPAGE = 0 159 179 $ns_RstackPAGE = 0 160 180 $ns_CstackPAGE = 0 181 $ns_diffPAGE = 0 182 $ns_RdiffPAGE = 0 161 183 162 184 book init nsData 163 book init nsBurntool185 # book init nsBurntool 164 186 # 165 187 # Macros to control the book. … … 177 199 echo $date $state 178 200 end 179 book npages nsBurntool -var Npages201 # book npages nsBurntool -var Npages 180 202 end 181 203 … … 198 220 periods -exec $LOADEXEC 199 221 periods -timeout 30 200 trange 16:30:00 17:30:00 -nmax 1222 trange 0:00:00 1:00:00 -nmax 1 201 223 npending 1 202 224 … … 204 226 stdout $LOGDIR/ns.initday.log 205 227 stderr $LOGDIR/ns.initday.log 206 $today = `date +%Y-%m-%d`228 $today = `date -u +%Y-%m-%d` 207 229 book newpage nsData $today 208 230 book setword nsData $today nsState NEW … … 242 264 stdout $LOGDIR/ns.detrends.log 243 265 stdout $LOGDIR/ns.detrends.log 244 $today = `date +%Y-%m-%d`266 $today = `date -u +%Y-%m-%d` 245 267 246 268 command automate_stacks.pl --queue_detrends --date $today … … 278 300 stdout $LOGDIR/ns.dqstats.log 279 301 stderr $LOGDIR/ns.dqstats.log 280 $today = `date +%Y-%m-%d`302 $today = `date -u +%Y-%m-%d` 281 303 282 304 command automate_stacks.pl --queue_dqstats --date $today … … 313 335 stdout $LOGDIR/ns.sweetspot.log 314 336 stderr $LOGDIR/ns.sweetspot.log 315 $today = `date +%Y-%m-%d`337 $today = `date -u +%Y-%m-%d` 316 338 317 339 command automate_stacks.pl --queue_sweetspot --date $today … … 337 359 # Check to see if registration is complete 338 360 # 339 task ns.registration.load340 host local341 periods -poll $LOADPOLL342 periods -exec $LOADEXEC343 periods -timeout 30344 npending 1345 346 task.exec347 stdout NULL348 stderr $LOGDIR/ns.registration.log349 350 book getpage nsData $ns_regPAGE -var date351 book getword nsData $date nsState -var ns_STATE352 book npages nsData -var Npages353 354 if ($VERBOSE > 5)355 echo "ns.registration.load: " $ns_regPAGE $date $ns_STATE $Npages356 end357 358 $ns_regPAGE ++359 if ($ns_regPAGE >= $Npages) set ns_regPAGE = 0360 option $date361 362 if ("$ns_STATE" != "NEW") break363 $run = automate_stacks.pl --check_registration --date $date364 command $run365 end366 367 # success368 task.exit 0369 # convert 'stdout' to book format370 book delpage nsData $options:0371 ipptool2book stdout nsData -uniq -key date372 373 if ($VERBOSE > 2)374 book listbook nsData375 end376 end377 378 # locked list379 task.exit default380 showcommand failure381 end382 task.exit crash383 showcommand crash384 end385 #operation times out?386 task.exit timeout387 showcommand timeout388 end389 end390 391 # 392 # Check to see if the chips have been properly burntooled and are ready for queueing393 # 394 task ns.chips.load395 host local396 periods -poll $LOADPOLL397 periods -exec $LOADEXEC398 periods -timeout 300399 npending 1400 401 task.exec402 stdout NULL403 stderr $LOGDIR/ns.chips.log404 405 book getpage nsData $ns_chipPAGE -var date406 book getword nsData $date nsState -var ns_STATE407 book npages nsData -var Npages408 409 if ($VERBOSE > 5)410 echo "ns.chips.load: " $ns_chipPAGE $date $ns_STATE $Npages411 end412 413 $ns_chipPAGE ++414 if ($ns_chipPAGE >= $Npages) set ns_chipPAGE = 0415 option $date416 417 if (("$ns_STATE" != "REGISTERED")&&("$ns_STATE" != "BURNING")) break418 $run = automate_stacks.pl --check_chips --date $date419 420 if ("$ns_STATE" == "BURNING")421 $run = $run --isburning422 end423 command $run424 end425 # success426 task.exit 0427 # convert 'stdout' to book format428 book delpage nsData $options:0429 ipptool2book stdout nsData -uniq -key date430 431 # remove the burntool page if we're done with it.432 book getword nsData $options:0 nsState -var ns_STATE433 if ("$ns_STATE" == "QUEUECHIPS")434 book delpage nsBurntool $options:0435 end436 437 book getword nsData $options:0 nsNmacros -var ns_Nmacros438 if ("$ns_Nmacros" != "NULL")439 for i 0 $ns_Nmacros440 sprintf macroName "ns%dMacro" $i441 book getword nsData $options:0 $macroName -var macroCmd442 $macroCmd443 end444 end445 446 if ($VERBOSE > 2)447 book listbook nsData448 end449 end450 451 # locked list452 task.exit default453 showcommand failure454 end455 task.exit crash456 showcommand crash457 end458 #operation times out?459 task.exit timeout460 showcommand timeout461 end462 end463 464 # 465 # Check to see if the chips have been properly burntooled and are ready for queueing466 # 467 task ns.chips.run468 host local469 periods -poll $LOADPOLL470 periods -exec $LOADEXEC471 periods -timeout 120472 npending 1473 474 task.exec475 stdout NULL476 stderr $LOGDIR/ns.chips.log477 478 book getpage nsData $ns_RchipPAGE -var date479 book getword nsData $date nsState -var ns_STATE480 book npages nsData -var Npages481 482 if ($VERBOSE > 5)483 echo "ns.chips.run: " $ns_RchipPAGE $date $ns_STATE $Npages484 end361 # task ns.registration.load 362 # host local 363 # periods -poll $LOADPOLL 364 # periods -exec $LOADEXEC 365 # periods -timeout 30 366 # npending 1 367 368 # task.exec 369 # stdout NULL 370 # stderr $LOGDIR/ns.registration.log 371 372 # book getpage nsData $ns_regPAGE -var date 373 # book getword nsData $date nsState -var ns_STATE 374 # book npages nsData -var Npages 375 376 # if ($VERBOSE > 5) 377 # echo "ns.registration.load: " $ns_regPAGE $date $ns_STATE $Npages 378 # end 379 380 # $ns_regPAGE ++ 381 # if ($ns_regPAGE >= $Npages) set ns_regPAGE = 0 382 # option $date 383 384 # if ("$ns_STATE" != "NEW") break 385 # $run = automate_stacks.pl --check_registration --date $date 386 # command $run 387 # end 388 389 # # success 390 # task.exit 0 391 # # convert 'stdout' to book format 392 # book delpage nsData $options:0 393 # ipptool2book stdout nsData -uniq -key date 394 395 # if ($VERBOSE > 2) 396 # book listbook nsData 397 # end 398 # end 399 400 # # locked list 401 # task.exit default 402 # showcommand failure 403 # end 404 # task.exit crash 405 # showcommand crash 406 # end 407 # #operation times out? 408 # task.exit timeout 409 # showcommand timeout 410 # end 411 # end 412 413 # # 414 # # Check to see if the chips have been properly burntooled and are ready for queueing 415 # # 416 # task ns.chips.load 417 # host local 418 # periods -poll $LOADPOLL 419 # periods -exec $LOADEXEC 420 # periods -timeout 300 421 # npending 1 422 423 # task.exec 424 # stdout NULL 425 # stderr $LOGDIR/ns.chips.log 426 427 # book getpage nsData $ns_chipPAGE -var date 428 # book getword nsData $date nsState -var ns_STATE 429 # book npages nsData -var Npages 430 431 # if ($VERBOSE > 5) 432 # echo "ns.chips.load: " $ns_chipPAGE $date $ns_STATE $Npages 433 # end 434 435 # $ns_chipPAGE ++ 436 # if ($ns_chipPAGE >= $Npages) set ns_chipPAGE = 0 437 # option $date 438 439 # if (("$ns_STATE" != "REGISTERED")&&("$ns_STATE" != "BURNING")) break 440 # $run = automate_stacks.pl --check_chips --date $date 441 442 # if ("$ns_STATE" == "BURNING") 443 # $run = $run --isburning 444 # end 445 # command $run 446 # end 447 # # success 448 # task.exit 0 449 # # convert 'stdout' to book format 450 # book delpage nsData $options:0 451 # ipptool2book stdout nsData -uniq -key date 452 453 # # remove the burntool page if we're done with it. 454 # book getword nsData $options:0 nsState -var ns_STATE 455 # if ("$ns_STATE" == "QUEUECHIPS") 456 # book delpage nsBurntool $options:0 457 # end 458 459 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 460 # if ("$ns_Nmacros" != "NULL") 461 # for i 0 $ns_Nmacros 462 # sprintf macroName "ns%dMacro" $i 463 # book getword nsData $options:0 $macroName -var macroCmd 464 # $macroCmd 465 # end 466 # end 467 468 # if ($VERBOSE > 2) 469 # book listbook nsData 470 # end 471 # end 472 473 # # locked list 474 # task.exit default 475 # showcommand failure 476 # end 477 # task.exit crash 478 # showcommand crash 479 # end 480 # #operation times out? 481 # task.exit timeout 482 # showcommand timeout 483 # end 484 # end 485 486 # # 487 # # Check to see if the chips have been properly burntooled and are ready for queueing 488 # # 489 # task ns.chips.run 490 # host local 491 # periods -poll $LOADPOLL 492 # periods -exec $LOADEXEC 493 # periods -timeout 120 494 # npending 1 495 496 # task.exec 497 # stdout NULL 498 # stderr $LOGDIR/ns.chips.log 499 500 # book getpage nsData $ns_RchipPAGE -var date 501 # book getword nsData $date nsState -var ns_STATE 502 # book npages nsData -var Npages 503 504 # if ($VERBOSE > 5) 505 # echo "ns.chips.run: " $ns_RchipPAGE $date $ns_STATE $Npages 506 # end 485 507 486 $ns_RchipPAGE ++487 if ($ns_RchipPAGE >= $Npages) set ns_RchipPAGE = 0488 option $date489 490 if ("$ns_STATE" != "QUEUECHIPS") break491 $BURNTOOLING = 0492 $run = automate_stacks.pl --queue_chips --date $date493 command $run494 end495 # success496 task.exit 0497 # convert 'stdout' to book format498 book delpage nsData $options:0499 ipptool2book stdout nsData -uniq -key date500 501 book getword nsData $options:0 nsNmacros -var ns_Nmacros502 if ("$ns_Nmacros" != "NULL")503 for i 0 $ns_Nmacros504 sprintf macroName "ns%dMacro" $i505 book getword nsData $options:0 $macroName -var macroCmd506 $macroCmd507 end508 end509 510 if ($VERBOSE > 2)511 book listbook nsData512 end513 end514 515 # locked list516 task.exit default517 showcommand failure518 end519 task.exit crash520 showcommand crash521 end522 #operation times out?523 task.exit timeout524 showcommand timeout525 end526 end508 # $ns_RchipPAGE ++ 509 # if ($ns_RchipPAGE >= $Npages) set ns_RchipPAGE = 0 510 # option $date 511 512 # if ("$ns_STATE" != "QUEUECHIPS") break 513 # $BURNTOOLING = 0 514 # $run = automate_stacks.pl --queue_chips --date $date 515 # command $run 516 # end 517 # # success 518 # task.exit 0 519 # # convert 'stdout' to book format 520 # book delpage nsData $options:0 521 # ipptool2book stdout nsData -uniq -key date 522 523 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 524 # if ("$ns_Nmacros" != "NULL") 525 # for i 0 $ns_Nmacros 526 # sprintf macroName "ns%dMacro" $i 527 # book getword nsData $options:0 $macroName -var macroCmd 528 # $macroCmd 529 # end 530 # end 531 532 # if ($VERBOSE > 2) 533 # book listbook nsData 534 # end 535 # end 536 537 # # locked list 538 # task.exit default 539 # showcommand failure 540 # end 541 # task.exit crash 542 # showcommand crash 543 # end 544 # #operation times out? 545 # task.exit timeout 546 # showcommand timeout 547 # end 548 # end 527 549 528 550 … … 557 579 command $run 558 580 end 581 559 582 # success 560 583 task.exit 0 … … 718 741 end 719 742 720 # 721 # Generate a list of date ranges and chips that need to be processed with burntool722 # 723 task ns.burntool.load724 host local725 periods -poll $LOADPOLL726 periods -exec $LOADEXEC727 periods -timeout 30728 npending 1729 730 task.exec731 stdout NULL732 stderr $LOGDIR/ns.burntool.log733 734 book getpage nsData $ns_burnPAGE -var date735 book getword nsData $date nsState -var ns_STATE736 book npages nsData -var Npages737 738 if ($VERBOSE > 5)739 echo "ns.burntool.load: " $ns_burnPAGE $date $ns_STATE $Npages740 end741 742 $ns_burnPAGE ++743 if ($ns_burnPAGE >= $Npages) set ns_burnPAGE = 0744 option $date743 # # 744 # # Generate a list of date ranges and chips that need to be processed with burntool 745 # # 746 # task ns.burntool.load 747 # host local 748 # periods -poll $LOADPOLL 749 # periods -exec $LOADEXEC 750 # periods -timeout 30 751 # npending 1 752 753 # task.exec 754 # stdout NULL 755 # stderr $LOGDIR/ns.burntool.log 756 757 # book getpage nsData $ns_burnPAGE -var date 758 # book getword nsData $date nsState -var ns_STATE 759 # book npages nsData -var Npages 760 761 # if ($VERBOSE > 5) 762 # echo "ns.burntool.load: " $ns_burnPAGE $date $ns_STATE $Npages 763 # end 764 765 # $ns_burnPAGE ++ 766 # if ($ns_burnPAGE >= $Npages) set ns_burnPAGE = 0 767 # option $date 745 768 746 if ("$ns_STATE" != "NEEDSBURNING") break747 748 $run = automate_stacks.pl --define_burntool --date $date749 command $run750 end751 # success752 task.exit 0753 # convert 'stdout' to book format754 # book delpage nsBurntool $options:0755 ipptool2book stdout nsBurntool -uniq -key date756 book setword nsData $options:0 nsState "QUEUEBURNING"757 758 book getword nsData $options:0 nsNmacros -var ns_Nmacros759 if ("$ns_Nmacros" != "NULL")760 for i 0 $ns_Nmacros761 sprintf macroName "ns%dMacro" $i762 book getword nsData $options:0 $macroName -var macroCmd763 $macroCmd764 end765 end766 767 if ($VERBOSE > 2)768 book listbook nsData769 end770 end771 772 # locked list773 task.exit default774 showcommand failure775 end776 task.exit crash777 showcommand crash778 end779 #operation times out?780 task.exit timeout781 showcommand timeout782 end783 end784 785 # 786 # Magically run burntool on the data, based on the information stored in our book.787 # 788 task ns.burntool.run789 periods -poll $LOADPOLL790 periods -exec $LOADEXEC791 periods -timeout 10800792 npending 30793 task.exec794 stdout NULL795 stderr $LOGDIR/ns.burntool.log796 797 book getpage nsData $ns_RburnPAGE -var date798 book getword nsData $date nsState -var ns_STATE799 book npages nsData -var Npages800 801 if ($VERBOSE > 5)802 echo "ns.burntool.run: " $ns_RburnPAGE $date $ns_STATE $Npages803 end804 805 $ns_RburnPAGE ++806 if ($ns_RburnPAGE >= $Npages) set ns_RburnPAGE = 0807 if (("$ns_STATE" != "QUEUEBURNING")&&("$ns_STATE" != "BURNING")) break808 $BURNTOOLING = 1809 # Find out where in the list of jobs we are810 book getword nsBurntool $date btN -var btN811 book getword nsBurntool $date btNCounter -var btNcounter812 813 if ($VERBOSE > 5)814 echo "ns.burntool.run: Status: " $btNcounter $date815 end816 817 if ("$ns_STATE" == "QUEUEBURNING")818 $new_state = "QUEUEBURNING"819 end820 if ("$ns_STATE" == "BURNING")821 $new_state = "BURNING"822 end823 if ($btNcounter + 1 > $btN)824 $new_state = "BURNING"825 end826 if ($btNcounter > $btN)827 $btNcounter = 0828 end829 if ($VERBOSE > 5)830 echo "ns.burntool.run: Status: " $btNcounter $new_state831 end769 # if ("$ns_STATE" != "NEEDSBURNING") break 770 771 # $run = automate_stacks.pl --define_burntool --date $date 772 # command $run 773 # end 774 # # success 775 # task.exit 0 776 # # convert 'stdout' to book format 777 # # book delpage nsBurntool $options:0 778 # ipptool2book stdout nsBurntool -uniq -key date 779 # book setword nsData $options:0 nsState "QUEUEBURNING" 780 781 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 782 # if ("$ns_Nmacros" != "NULL") 783 # for i 0 $ns_Nmacros 784 # sprintf macroName "ns%dMacro" $i 785 # book getword nsData $options:0 $macroName -var macroCmd 786 # $macroCmd 787 # end 788 # end 789 790 # if ($VERBOSE > 2) 791 # book listbook nsData 792 # end 793 # end 794 795 # # locked list 796 # task.exit default 797 # showcommand failure 798 # end 799 # task.exit crash 800 # showcommand crash 801 # end 802 # #operation times out? 803 # task.exit timeout 804 # showcommand timeout 805 # end 806 # end 807 808 # # 809 # # Magically run burntool on the data, based on the information stored in our book. 810 # # 811 # task ns.burntool.run 812 # periods -poll $LOADPOLL 813 # periods -exec $LOADEXEC 814 # periods -timeout 10800 815 # npending 30 816 # task.exec 817 # stdout NULL 818 # stderr $LOGDIR/ns.burntool.log 819 820 # book getpage nsData $ns_RburnPAGE -var date 821 # book getword nsData $date nsState -var ns_STATE 822 # book npages nsData -var Npages 823 824 # if ($VERBOSE > 5) 825 # echo "ns.burntool.run: " $ns_RburnPAGE $date $ns_STATE $Npages 826 # end 827 828 # $ns_RburnPAGE ++ 829 # if ($ns_RburnPAGE >= $Npages) set ns_RburnPAGE = 0 830 # if (("$ns_STATE" != "QUEUEBURNING")&&("$ns_STATE" != "BURNING")) break 831 # $BURNTOOLING = 1 832 # # Find out where in the list of jobs we are 833 # book getword nsBurntool $date btN -var btN 834 # book getword nsBurntool $date btNCounter -var btNcounter 835 836 # if ($VERBOSE > 5) 837 # echo "ns.burntool.run: Status: " $btNcounter $date 838 # end 839 840 # if ("$ns_STATE" == "QUEUEBURNING") 841 # $new_state = "QUEUEBURNING" 842 # end 843 # if ("$ns_STATE" == "BURNING") 844 # $new_state = "BURNING" 845 # end 846 # if ($btNcounter + 1 > $btN) 847 # $new_state = "BURNING" 848 # end 849 # if ($btNcounter > $btN) 850 # $btNcounter = 0 851 # end 852 # if ($VERBOSE > 5) 853 # echo "ns.burntool.run: Status: " $btNcounter $new_state 854 # end 832 855 833 # Increment the counter in the book for the next job.834 $counter_update = $btNcounter + 1835 book setword nsBurntool $date btNCounter $counter_update836 # book setword nsData $options:0 nsState $options:1837 book setword nsData $date nsState $new_state838 839 # Get the current status of this job, and skip if it doesn't need to process.840 sprintf status_label "bt%dStatus" $btNcounter841 book getword nsBurntool $date $status_label -var status842 843 if ($VERBOSE > 5)844 echo "ns.burntool.run: Status: " $btNcounter $status $date $status_label845 end846 if (("$status" == "FINISHED")||("$status" == "RUN")) break856 # # Increment the counter in the book for the next job. 857 # $counter_update = $btNcounter + 1 858 # book setword nsBurntool $date btNCounter $counter_update 859 # # book setword nsData $options:0 nsState $options:1 860 # book setword nsData $date nsState $new_state 861 862 # # Get the current status of this job, and skip if it doesn't need to process. 863 # sprintf status_label "bt%dStatus" $btNcounter 864 # book getword nsBurntool $date $status_label -var status 865 866 # if ($VERBOSE > 5) 867 # echo "ns.burntool.run: Status: " $btNcounter $status $date $status_label 868 # end 869 # if (("$status" == "FINISHED")||("$status" == "RUN")) break 847 870 848 # Continue loading information to process this job849 sprintf start_date_label "bt%dBegin" $btNcounter850 sprintf end_date_label "bt%dEnd" $btNcounter851 sprintf class_count_label "bt%dClass" $btNcounter852 853 book getword nsBurntool $date $start_date_label -var start_date854 book getword nsBurntool $date $end_date_label -var end_date855 book getword nsBurntool $date $class_count_label -var chip_counter856 857 # Lookup class_id/host pairs858 list word -split $hostmatch:$chip_counter859 $class_id = $word:0860 $host = $word:1861 host $host862 # set.host.for.camera GPC1 $class_id863 $logfile = "/data/$host.0/burntool_logs/$class_id.$start_date.log"864 865 $run = ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $start_date --dateobs_end $end_date --dbname gpc1 --logfile $logfile871 # # Continue loading information to process this job 872 # sprintf start_date_label "bt%dBegin" $btNcounter 873 # sprintf end_date_label "bt%dEnd" $btNcounter 874 # sprintf class_count_label "bt%dClass" $btNcounter 875 876 # book getword nsBurntool $date $start_date_label -var start_date 877 # book getword nsBurntool $date $end_date_label -var end_date 878 # book getword nsBurntool $date $class_count_label -var chip_counter 879 880 # # Lookup class_id/host pairs 881 # list word -split $hostmatch:$chip_counter 882 # $class_id = $word:0 883 # $host = $word:1 884 # host $host 885 # # set.host.for.camera GPC1 $class_id 886 # $logfile = "/data/$host.0/burntool_logs/$class_id.$start_date.log" 887 888 # $run = ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $start_date --dateobs_end $end_date --dbname gpc1 --logfile $logfile 866 889 867 echo "ns.burntool.run: " $date $btN $btNcounter $start_date $end_date $chip_counter $class_id $host $logfile $run868 echo "ns.burntool.run: " $date $btN $btNcounter $chip_counter $new_state869 870 book setword nsBurntool $date $status_label RUN871 option $date $new_state $status_label872 873 command $run874 # command /bin/true875 end876 # success877 task.exit 0878 # convert 'stdout' to book format879 # Set data state based on if we're queueing or waiting880 # Set the job state for success.881 book setword nsBurntool $options:0 $options:2 FINISHED882 883 book getword nsData $options:0 nsNmacros -var ns_Nmacros884 if ("$ns_Nmacros" != "NULL")885 for i 0 $ns_Nmacros886 sprintf macroName "ns%dMacro" $i887 book getword nsData $options:0 $macroName -var macroCmd888 $macroCmd889 end890 end891 892 if ($VERBOSE > 2)893 book listbook nsData894 end895 end896 897 # locked list898 task.exit default899 book setword nsBurntool $options:0 $options:2 FAIL900 showcommand failure901 end902 task.exit crash903 book setword nsBurntool $options:0 $options:2 FAIL904 showcommand crash905 end906 #operation times out?907 task.exit timeout908 book setword nsBurntool $options:0 $options:2 FAIL909 showcommand timeout910 end911 end912 913 914 # 915 # This is all burntool related stuff.916 # 917 918 macro burntool919 if ($0 != 3)920 echo "USAGE: burntool (dateobs_begin) (dateobs_end)"921 break922 end923 924 for i 0 $hostmatch:n925 job -host $word:1 ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $1 --dateobs_end $2 --dbname gpc1 --logfile $logfile926 end927 end928 macro loadhosts929 for i 0 $allhosts:n930 controller host add $allhosts:$i931 end932 end933 934 # sorry this list is messy, it's supposed to be that way to try and keep to burntools from running on the same host at the same time.935 936 list hostmatch937 XY01 ipp014938 XY03 ipp038939 XY05 ipp023940 XY10 ipp039941 XY12 ipp024942 XY15 ipp040943 XY17 ipp020944 XY21 ipp041945 XY23 ipp042946 XY25 ipp043947 XY27 ipp028948 XY31 ipp044949 XY33 ipp029950 XY35 ipp045951 XY37 ipp030952 XY41 ipp046953 XY43 ipp031954 XY45 ipp047955 XY47 ipp032956 XY51 ipp048957 XY53 ipp033958 XY55 ipp049959 XY57 ipp034960 XY61 ipp050961 XY63 ipp035962 XY65 ipp051963 XY67 ipp036964 XY72 ipp052965 XY74 ipp015966 XY76 ipp053967 XY02 ipp014968 XY04 ipp038969 XY06 ipp023970 XY11 ipp039971 XY13 ipp024972 XY14 ipp040973 XY16 ipp020974 XY20 ipp041975 XY22 ipp042976 XY24 ipp043977 XY26 ipp028978 XY30 ipp044979 XY32 ipp029980 XY34 ipp045981 XY36 ipp030982 XY40 ipp046983 XY42 ipp031984 XY44 ipp047985 XY46 ipp032986 XY50 ipp048987 XY52 ipp033988 XY54 ipp049989 XY56 ipp034990 XY60 ipp050991 XY62 ipp035992 XY64 ipp051993 XY66 ipp036994 XY71 ipp052995 XY73 ipp015996 XY75 ipp053997 end998 999 list allhosts1000 ipp0431001 ipp0141002 ipp0151003 ipp0231004 ipp0241005 ipp0201006 ipp0281007 ipp0291008 ipp0301009 ipp0311010 ipp0321011 ipp0331012 ipp0341013 ipp0351014 ipp0361015 ipp0381016 ipp0391017 ipp0401018 ipp0411019 ipp0421020 ipp0441021 ipp0451022 ipp0461023 ipp0471024 ipp0481025 ipp0491026 ipp0501027 ipp0511028 ipp0521029 ipp0531030 end890 # echo "ns.burntool.run: " $date $btN $btNcounter $start_date $end_date $chip_counter $class_id $host $logfile $run 891 # echo "ns.burntool.run: " $date $btN $btNcounter $chip_counter $new_state 892 893 # book setword nsBurntool $date $status_label RUN 894 # option $date $new_state $status_label 895 896 # command $run 897 # # command /bin/true 898 # end 899 # # success 900 # task.exit 0 901 # # convert 'stdout' to book format 902 # # Set data state based on if we're queueing or waiting 903 # # Set the job state for success. 904 # book setword nsBurntool $options:0 $options:2 FINISHED 905 906 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 907 # if ("$ns_Nmacros" != "NULL") 908 # for i 0 $ns_Nmacros 909 # sprintf macroName "ns%dMacro" $i 910 # book getword nsData $options:0 $macroName -var macroCmd 911 # $macroCmd 912 # end 913 # end 914 915 # if ($VERBOSE > 2) 916 # book listbook nsData 917 # end 918 # end 919 920 # # locked list 921 # task.exit default 922 # book setword nsBurntool $options:0 $options:2 FAIL 923 # showcommand failure 924 # end 925 # task.exit crash 926 # book setword nsBurntool $options:0 $options:2 FAIL 927 # showcommand crash 928 # end 929 # #operation times out? 930 # task.exit timeout 931 # book setword nsBurntool $options:0 $options:2 FAIL 932 # showcommand timeout 933 # end 934 # end 935 936 937 # # 938 # # This is all burntool related stuff. 939 # # 940 941 # macro burntool 942 # if ($0 != 3) 943 # echo "USAGE: burntool (dateobs_begin) (dateobs_end)" 944 # break 945 # end 946 947 # for i 0 $hostmatch:n 948 # job -host $word:1 ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $1 --dateobs_end $2 --dbname gpc1 --logfile $logfile 949 # end 950 # end 951 # macro loadhosts 952 # for i 0 $allhosts:n 953 # controller host add $allhosts:$i 954 # end 955 # end 956 957 # # sorry this list is messy, it's supposed to be that way to try and keep to burntools from running on the same host at the same time. 958 959 # list hostmatch 960 # XY01 ipp014 961 # XY03 ipp038 962 # XY05 ipp023 963 # XY10 ipp039 964 # XY12 ipp024 965 # XY15 ipp040 966 # XY17 ipp020 967 # XY21 ipp041 968 # XY23 ipp042 969 # XY25 ipp043 970 # XY27 ipp028 971 # XY31 ipp044 972 # XY33 ipp029 973 # XY35 ipp045 974 # XY37 ipp030 975 # XY41 ipp046 976 # XY43 ipp031 977 # XY45 ipp047 978 # XY47 ipp032 979 # XY51 ipp048 980 # XY53 ipp033 981 # XY55 ipp049 982 # XY57 ipp034 983 # XY61 ipp050 984 # XY63 ipp035 985 # XY65 ipp051 986 # XY67 ipp036 987 # XY72 ipp052 988 # XY74 ipp015 989 # XY76 ipp053 990 # XY02 ipp014 991 # XY04 ipp038 992 # XY06 ipp023 993 # XY11 ipp039 994 # XY13 ipp024 995 # XY14 ipp040 996 # XY16 ipp020 997 # XY20 ipp041 998 # XY22 ipp042 999 # XY24 ipp043 1000 # XY26 ipp028 1001 # XY30 ipp044 1002 # XY32 ipp029 1003 # XY34 ipp045 1004 # XY36 ipp030 1005 # XY40 ipp046 1006 # XY42 ipp031 1007 # XY44 ipp047 1008 # XY46 ipp032 1009 # XY50 ipp048 1010 # XY52 ipp033 1011 # XY54 ipp049 1012 # XY56 ipp034 1013 # XY60 ipp050 1014 # XY62 ipp035 1015 # XY64 ipp051 1016 # XY66 ipp036 1017 # XY71 ipp052 1018 # XY73 ipp015 1019 # XY75 ipp053 1020 # end 1021 1022 # list allhosts 1023 # ipp043 1024 # ipp014 1025 # ipp015 1026 # ipp023 1027 # ipp024 1028 # ipp020 1029 # ipp028 1030 # ipp029 1031 # ipp030 1032 # ipp031 1033 # ipp032 1034 # ipp033 1035 # ipp034 1036 # ipp035 1037 # ipp036 1038 # ipp038 1039 # ipp039 1040 # ipp040 1041 # ipp041 1042 # ipp042 1043 # ipp044 1044 # ipp045 1045 # ipp046 1046 # ipp047 1047 # ipp048 1048 # ipp049 1049 # ipp050 1050 # ipp051 1051 # ipp052 1052 # ipp053 1053 # end -
trunk/ippTasks/register.pro
r25418 r30049 8 8 book init regPendingImfile 9 9 book init regPendingExp 10 book init regPendingBurntoolImfile 10 11 11 12 macro register.reset 12 13 book init regPendingImfile 13 14 book init regPendingExp 15 book init regPendingBurntoolImfile 14 16 end 15 17 … … 18 20 book listbook regPendingImfile 19 21 book listbook regPendingExp 22 book listbook regPendingBurntoolImfile 20 23 end 21 24 … … 33 36 active true 34 37 end 38 task register.burntool.load 39 active true 40 end 41 task register.burntool.run 42 active true 43 end 35 44 end 36 45 … … 48 57 active false 49 58 end 50 end 59 task register.burntool.load 60 active false 61 end 62 task register.burntool.run 63 active false 64 end 65 end 66 67 $valid_burntool_value = 14 51 68 52 69 macro replace.survey.values … … 129 146 # these variables will cycle through the known database names 130 147 $regPendingImfile_DB = 0 148 $regPendingBurntoolImfile_DB = 0 131 149 $regPendingExp_DB = 0 132 150 … … 429 447 end 430 448 449 450 # select imfiles that can now be burntooled. 451 task register.burntool.load 452 host local 453 454 periods -poll $LOADPOLL 455 periods -exec $LOADEXEC 456 periods -timeout 30 457 npending 1 458 459 # silently drop stdout 460 stdout NULL 461 stderr $LOGDIR/register.burntool.load.log 462 463 # select entried from the current DB; cycle to the next DB, if it exists 464 task.exec 465 $run = regtool -pendingburntoolimfile 466 $today = `date -u +%Y-%m-%d` 467 # debugging purposes 468 $today = "2010-12-06" 469 $run = $run -date $today -valid_burntool $valid_burntool_value 470 if ($DB:n == 0) 471 option DEFAULT 472 else 473 # save the DB name for the exit tasks 474 option $DB:$regPendingBurntoolImfile_DB 475 $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 476 $regPendingBurntoolImfile_DB ++ 477 if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 478 end 479 480 echo $run 481 add_poll_args run 482 command $run 483 end 484 485 # success 486 task.exit $EXIT_SUCCESS 487 # convert 'stdout' to book format 488 ipptool2book stdout regPendingBurntoolImfile -key exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 489 book shuffle regPendingBurntoolImfile 490 if ($VERBOSE > 2) 491 book listbook regPendingBurntoolImfile 492 end 493 494 # delete existing entries in the appropriate pantasksStates 495 process_cleanup regPendingBurntoolImfile 496 end 497 498 # locked list 499 task.exit default 500 showcommand failure 501 end 502 task.exit crash 503 showcommand crash 504 end 505 task.exit timeout 506 showcommand timeout 507 end 508 end 509 510 # run the ipp_apply_burntool_single.pl script on the pending images 511 task register.burntool.run 512 periods -poll $RUNPOLL 513 periods -exec $RUNEXEC 514 periods -timeout 30 515 516 task.exec 517 if ($NETWORK == 0) break 518 book npages regPendingBurntoolImfile -var N 519 if ($N == 0) 520 periods -exec $RUNEXEC 521 break 522 end 523 periods -exec 0.05 524 525 # look for new images to burn in regPendingBurntoolImfile 526 book getpage regPendingBurntoolImfile 0 -var pageName -key pantaskState INIT 527 if ("$pageName" == "NULL") break 528 529 book setword regPendingBurntoolImfile $pageName pantaskState RUN 530 531 book getword regPendingBurntoolImfile $pageName exp_id -var EXP_ID 532 book getword regPendingBurntoolImfile $pageName class_id -var CLASS_ID 533 book getword regPendingBurntoolImfile $pageName uri -var THIS_URI 534 book getword regPendingBurntoolImfile $pageName previous_uri -var PREVIOUS_URI 535 book getword regPendingBurntoolImfile $pageName camera -var CAMERA 536 book getword regPendingBurntoolImfile $pageName dbname -var DBNAME 537 set.host.for.camera $CAMERA $CLASS_ID 538 539 stdout $LOGDIR/register.burntool.run.log 540 stderr $LOGDIR/register.burntool.run.log 541 542 $run = ipp_apply_burntool_single.pl --exp_id $EXP_ID --class_id $CLASS_ID --this_uri $THIS_URI 543 if ("$PREVIOUS_URI" != "NULL") 544 $run = $run --previous_uri $PREVIOUS_URI 545 end 546 547 add_standard_args run 548 549 options $pageName 550 551 if ($VERBOSE > 1) 552 echo command $run 553 end 554 command $run 555 end 556 557 # default exit status 558 task.exit default 559 process_exit regPendingBurntoolImfile $options:0 $JOB_STATUS 560 end 561 562 # locked list 563 task.exit crash 564 showcommand crash 565 echo "hostname: $JOB_HOSTNAME" 566 book setword regPendingBurntoolImfile $options:0 pantaskState CRASH 567 end 568 569 # operation timed out 570 task.exit timeout 571 showcommand timeout 572 book setword regPendingBurntoolImfile $options:0 pantaskState TIMEOUT 573 end 574 end 575 576 577 578 431 579 ## XXX add a global path to output files
Note:
See TracChangeset
for help on using the changeset viewer.
