Changeset 38239 for trunk/ippTasks
- Timestamp:
- May 7, 2015, 12:36:11 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/nightly_science.pro (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/nightly_science.pro
r38229 r38239 5 5 macro nightly.science.on 6 6 ns.initday.on 7 ns.detrends.off7 # ns.detrends.off 8 8 ns.dqstats.on 9 9 ns.stacks.on … … 13 13 macro nightly.science.off 14 14 ns.initday.off 15 ns.detrends.off15 # ns.detrends.off 16 16 ns.dqstats.off 17 17 ns.stacks.off … … 33 33 end 34 34 35 macro ns.detrends.on36 task ns.detrends.load37 active true38 end39 end40 35 41 36 macro ns.dqstats.on … … 46 41 47 42 macro ns.stacks.on 48 task ns.stacks.load49 active false50 end51 43 task ns.stacks.run 52 44 active true 53 45 end 54 task ns.stacks.confirm55 active false56 end57 46 end 58 47 59 48 macro ns.diffs.on 60 task ns.diffs.load61 active false62 end63 49 task ns.diffs.run 64 50 active true … … 72 58 end 73 59 74 macro ns.detrends.off75 task ns.detrends.load76 active false77 end78 end79 80 60 macro ns.dqstats.off 81 61 task ns.dqstats.load … … 85 65 86 66 macro ns.stacks.off 87 task ns.stacks.load88 active false89 end90 67 task ns.stacks.run 91 68 active false 92 69 end 93 task ns.stacks.confirm94 active false95 end96 97 70 end 98 71 99 72 macro ns.diffs.off 100 task ns.diffs.load101 active false102 end103 73 task ns.diffs.run 104 active false105 end106 end107 108 macro ns.stacks.confirm.on109 task ns.stacks.confirm110 active true111 end112 end113 114 macro ns.stacks.confirm.off115 task ns.stacks.confirm116 74 active false 117 75 end … … 128 86 book init nsDiffs 129 87 book init nsStacks 88 89 # Hard coded values 90 $camera_map:gpc1 = "GPC1" 91 $camera_map:gpc2 = "GPC2" 92 93 # Macro to manage the camera maps 94 macro ns.add.camera_map 95 if ($0 != 3) 96 echo "USAGE: ns.add.camera_map (dbname) (camera)" 97 break 98 end 99 100 $camera_map:$1 = $2 101 end 102 130 103 # 131 104 # Macros to control the book. 132 105 # 133 106 macro ns.add.date 134 if ($0 != 3)135 echo "USAGE: ns.add.date (YYYY-MM-DD) (dbname) "107 if ($0 != 4) 108 echo "USAGE: ns.add.date (YYYY-MM-DD) (dbname) (camera)" 136 109 break 137 110 end 111 112 if ($?camera_map:$2) 113 if ($camera_map:$2 != "$3") 114 echo "camera $3 does not match expected camera $camera_map:$2" 115 break 116 end 117 else 118 echo "dbname $2 does not have a camera_map entry" 119 break 120 end 138 121 139 122 # build key from date and database name … … 143 126 book setword nsData $key date $1 144 127 book setword nsData $key dbname $2 128 book setword nsData $key camera $3 145 129 146 130 book newpage nsDiffs $key … … 159 143 book getword nsData $key date -var date 160 144 book getword nsData $key dbname -var dbname 145 book getword nsData $key camera -var camera 161 146 book getword nsData $key nsState -var state 162 147 book getword nsStacks $key nsStackState -var Sstate 163 148 book getword nsDiffs $key nsDiffState -var Dstate 164 149 book getword nsDiffs $key nsObservingState -var Ostate 165 echo $key $date $dbname $state $Sstate $Dstate $Ostate 150 # I've moved dbname to end as czartool reads information from here, and it may be fixed length 151 echo $key $date $state $Sstate $Dstate $Ostate $dbname $camera 152 166 153 end 167 154 end … … 184 171 periods -exec $LOADEXEC 185 172 periods -timeout 300 186 trange 0:00:00 1:00:00 -nmax 1173 trange 0:00:00 1:00:00 -nmax 2 187 174 npending 1 188 175 … … 199 186 book setword nsData $key nsState NEW 200 187 book setword nsData $key dbname $thisDB 188 book setword nsData $key camera $camera_map:$thisDB 189 201 190 book newpage nsStacks $key 202 191 book setword nsStacks $key date $today … … 207 196 208 197 #command echo $today 209 $run = nightly_science.pl --clean_old --date $today --dbname $thisDB 198 $run = nightly_science.pl --clean_old --date $today --dbname $thisDB --camera $camera_map:$thisDB 210 199 command $run 211 200 end … … 229 218 230 219 # 231 # Queue off any possible detrend verification runs232 #233 task ns.detrends.load234 host local235 periods -poll $LOADPOLL236 periods -exec $LOADEXEC237 periods -timeout 30238 trange 23:00:00 23:59:59 -nmax 1239 npending 1240 241 task.exec242 stdout $LOGDIR/ns.detrends.log243 stdout $LOGDIR/ns.detrends.log244 $today = `date -u +%Y-%m-%d`245 246 $run = nightly_science.pl --queue_detrends --date $today --dbname $DB:0247 # add_standard_args $run248 command $run249 end250 251 task.exit 0252 # nothign to do here253 end254 # locked list255 task.exit default256 showcommand failure257 end258 task.exit crash259 showcommand crash260 end261 # operation times out262 task.exit timeout263 showcommand timeout264 end265 end266 267 #268 220 # Queue dqstats runs 269 221 # 222 223 # CZW: 2015-05-05 One day we will stop making these, but that day is not today. 224 # According to Ken, we do not need to implement this for gpc2, as nothing is 225 # written on the OTIS/scheduler side to accept these products. We should 226 # continue to generate these for gpc1, as the machinery does exist to check 227 # for them, and not generating them may cause that to fail (even if nothing 228 # is done with the results). 229 270 230 task ns.dqstats.load 271 231 host local … … 305 265 306 266 # 307 # Check to see if the warps are finished308 #309 task ns.stacks.load310 active false311 host local312 periods -poll $LOADPOLL313 periods -exec $LOADEXEC314 periods -timeout 120315 npending 1316 317 task.exec318 stdout NULL319 stderr $LOGDIR/ns.stacks.log320 321 book getpage nsData $ns_stackPAGE -var key322 book getword nsStacks $key date -var date323 book getword nsStacks $key nsStackState -var ns_STATE324 book getword nsDiffs $key nsDiffState -var ns_diff_STATE325 book getword nsData $key dbname -var DBNAME326 book npages nsData -var Npages327 328 if ($VERBOSE > 5)329 echo "ns.stacks.load: " $ns_stackPAGE $date $DBNAME $ns_STATE $Npages330 end331 332 $ns_stackPAGE ++333 if ($ns_stackPAGE >= $Npages) set ns_stackPAGE = 0334 option $key335 336 if ("$ns_STATE" != "TOWARP") break337 338 $run = nightly_science.pl --check_stacks --date $date --dbname $DBNAME339 # add_standard_args $run340 command $run341 342 end343 344 # success345 task.exit 0346 # convert 'stdout' to book format347 book delpage nsStacks $options:0348 ipptool2book stdout nsStacks -uniq -key date349 350 book getword nsStacks $options:0 nsNmacros -var ns_Nmacros351 if ("$ns_Nmacros" != "NULL")352 for i 0 $ns_Nmacros353 sprintf macroName "ns%dMacro" $i354 book getword nsStacks $options:0 $macroName -var macroCmd355 $macroCmd356 end357 end358 359 if ($VERBOSE > 2)360 book listbook nsData361 end362 end363 364 # locked list365 task.exit default366 showcommand failure367 end368 task.exit crash369 showcommand crash370 end371 #operation times out?372 task.exit timeout373 showcommand timeout374 end375 end376 377 #378 267 # Check to see if the warps are finished and so we can make stacks. 379 268 # … … 395 284 book getword nsDiffs $key nsDiffState -var ns_diff_STATE 396 285 book getword nsData $key dbname -var DBNAME 286 book getword nsData $key camera -var CAMERA 397 287 book npages nsData -var Npages 398 288 … … 406 296 407 297 if (("$ns_STATE" != "STACKING")&&("$ns_STATE" != "TOWARP")&&("$ns_STATE" != "FORCETOWARP")) break 408 $run = nightly_science.pl --queue_stacks --date $date --dbname $DBNAME 298 $run = nightly_science.pl --queue_stacks --date $date --dbname $DBNAME --camera $CAMERA 409 299 # add_standard_args $run 410 300 command $run … … 444 334 end 445 335 446 #447 # Confirm that all the stacks that can be built have been built, or at least attempted.448 #449 task ns.stacks.confirm450 active false451 host local452 periods -poll $LOADPOLL453 periods -exec $LOADEXEC454 periods -timeout 120455 npending 1456 457 task.exec458 stdout NULL459 stderr $LOGDIR/ns.stacks.log460 461 book getpage nsData $ns_CstackPAGE -var key462 book getword nsStacks $key date -var date463 book getword nsStacks $key nsStackState -var ns_STATE464 book getword nsData $key dbname -var DBNAME465 book npages nsData -var Npages466 467 if ($VERBOSE > 5)468 echo "ns.stacks.confirm: " $ns_CstackPAGE $key $date $DBNAME $ns_STATE $Npages469 end470 471 $ns_CstackPAGE ++472 if ($ns_CstackPAGE >= $Npages) set ns_CstackPAGE = 0473 option $key474 475 if ("$ns_STATE" != "STACKING") break476 $run = nightly_science.pl --confirm_stacks --date $date --dbname $DBNAME477 # add_standard_args $run478 command $run479 end480 # success481 task.exit 0482 # convert 'stdout' to book format483 book delpage nsStacks $options:0484 ipptool2book stdout nsStacks -uniq -key date485 486 book getword nsStacks $options:0 nsNmacros -var ns_Nmacros487 if ("$ns_Nmacros" != "NULL")488 for i 0 $ns_Nmacros489 sprintf macroName "ns%dMacro" $i490 book getword nsStacks $options:0 $macroName -var macroCmd491 $macroCmd492 end493 end494 495 if ($VERBOSE > 2)496 book listbook nsData497 end498 end499 500 # locked list501 task.exit default502 showcommand failure503 end504 task.exit crash505 showcommand crash506 end507 #operation times out?508 task.exit timeout509 showcommand timeout510 end511 end512 513 514 #515 # Check to see if the warps are finished516 #517 task ns.diffs.load518 active false519 host local520 periods -poll $LOADPOLL521 periods -exec $LOADEXEC522 periods -timeout 120523 npending 1524 525 task.exec526 stdout NULL527 stderr $LOGDIR/ns.diffs.log528 529 book getpage nsData $ns_diffPAGE -var key530 book getword nsDiffs $key date -var date531 book getword nsDiffs $key nsDiffState -var ns_STATE532 book getword nsStacks $key nsStackState -var ns_stack_STATE533 book getword nsData $key dbname -var DBNAME534 book npages nsData -var Npages535 536 if ($VERBOSE > 5)537 echo "ns.diffs.load: " $ns_diffPAGE $key $date $DBNAME $ns_STATE $Npages538 end539 540 $ns_diffPAGE ++541 if ($ns_diffPAGE >= $Npages) set ns_diffPAGE = 0542 option $key543 544 if ("$ns_STATE" != "TOWARP") break545 $run = nightly_science.pl --check_diffs --date $date --dbname $DBNAME546 # add_standard_args $run547 command $run548 end549 550 # success551 task.exit 0552 # convert 'stdout' to book format553 book delpage nsDiffs $options:0554 ipptool2book stdout nsDiffs -uniq -key date555 556 book getword nsDiffs $options:0 nsNmacros -var ns_Nmacros557 if ("$ns_Nmacros" != "NULL")558 for i 0 $ns_Nmacros559 sprintf macroName "ns%dMacro" $i560 book getword nsDiffs $options:0 $macroName -var macroCmd561 $macroCmd562 end563 end564 565 if ($VERBOSE > 2)566 book listbook nsData567 end568 end569 570 # locked list571 task.exit default572 showcommand failure573 end574 task.exit crash575 showcommand crash576 end577 #operation times out?578 task.exit timeout579 showcommand timeout580 end581 end582 336 583 337 # … … 601 355 book getword nsStacks $key nsStackState -var ns_stack_STATE 602 356 book getword nsData $key dbname -var DBNAME 357 book getword nsData $key camera -var CAMERA 603 358 book npages nsData -var Npages 604 359 … … 612 367 613 368 if (("$ns_STATE" != "DIFFING")&&("$ns_STATE" != "QUEUEDIFFS")&&("$ns_STATE" != "TOWARP")&&("$ns_STATE" != "FORCETOWARP")) break 614 $run = nightly_science.pl --queue_diffs --date $date --dbname $DBNAME 369 $run = nightly_science.pl --queue_diffs --date $date --dbname $DBNAME --camera $CAMERA 615 370 # add_standard_args $run 616 371 command $run … … 652 407 653 408 409 # This is the graveyard of tasks that we've defined in the past, but either never use, or never let go active. 410 411 # if (0) 412 413 414 # macro ns.detrends.on 415 # task ns.detrends.load 416 # active true 417 # end 418 # end 419 420 421 # macro ns.detrends.off 422 # task ns.detrends.load 423 # active false 424 # end 425 # end 426 427 # macro ns.stacks.confirm.on 428 # task ns.stacks.confirm 429 # active true 430 # end 431 # end 432 433 # macro ns.stacks.confirm.off 434 # task ns.stacks.confirm 435 # active false 436 # end 437 # end 438 439 440 441 442 443 # # 444 # # Queue off any possible detrend verification runs 445 # # 446 # task ns.detrends.load 447 # host local 448 # periods -poll $LOADPOLL 449 # periods -exec $LOADEXEC 450 # periods -timeout 30 451 # trange 23:00:00 23:59:59 -nmax 1 452 # npending 1 453 454 # task.exec 455 # stdout $LOGDIR/ns.detrends.log 456 # stdout $LOGDIR/ns.detrends.log 457 # $today = `date -u +%Y-%m-%d` 458 459 # $run = nightly_science.pl --queue_detrends --date $today --dbname $DB:0 460 # # add_standard_args $run 461 # command $run 462 # end 463 464 # task.exit 0 465 # # nothign to do here 466 # end 467 # # locked list 468 # task.exit default 469 # showcommand failure 470 # end 471 # task.exit crash 472 # showcommand crash 473 # end 474 # # operation times out 475 # task.exit timeout 476 # showcommand timeout 477 # end 478 # end 479 480 481 # # 482 # # Check to see if the warps are finished 483 # # 484 # task ns.stacks.load 485 # active false 486 # host local 487 # periods -poll $LOADPOLL 488 # periods -exec $LOADEXEC 489 # periods -timeout 120 490 # npending 1 491 492 # task.exec 493 # stdout NULL 494 # stderr $LOGDIR/ns.stacks.log 495 496 # book getpage nsData $ns_stackPAGE -var key 497 # book getword nsStacks $key date -var date 498 # book getword nsStacks $key nsStackState -var ns_STATE 499 # book getword nsDiffs $key nsDiffState -var ns_diff_STATE 500 # book getword nsData $key dbname -var DBNAME 501 # book npages nsData -var Npages 502 503 # if ($VERBOSE > 5) 504 # echo "ns.stacks.load: " $ns_stackPAGE $date $DBNAME $ns_STATE $Npages 505 # end 506 507 # $ns_stackPAGE ++ 508 # if ($ns_stackPAGE >= $Npages) set ns_stackPAGE = 0 509 # option $key 510 511 # if ("$ns_STATE" != "TOWARP") break 512 513 # $run = nightly_science.pl --check_stacks --date $date --dbname $DBNAME 514 # # add_standard_args $run 515 # command $run 516 517 # end 518 519 # # success 520 # task.exit 0 521 # # convert 'stdout' to book format 522 # book delpage nsStacks $options:0 523 # ipptool2book stdout nsStacks -uniq -key date 524 525 # book getword nsStacks $options:0 nsNmacros -var ns_Nmacros 526 # if ("$ns_Nmacros" != "NULL") 527 # for i 0 $ns_Nmacros 528 # sprintf macroName "ns%dMacro" $i 529 # book getword nsStacks $options:0 $macroName -var macroCmd 530 # $macroCmd 531 # end 532 # end 533 534 # if ($VERBOSE > 2) 535 # book listbook nsData 536 # end 537 # end 538 539 # # locked list 540 # task.exit default 541 # showcommand failure 542 # end 543 # task.exit crash 544 # showcommand crash 545 # end 546 # #operation times out? 547 # task.exit timeout 548 # showcommand timeout 549 # end 550 # end 551 552 # # 553 # # Confirm that all the stacks that can be built have been built, or at least attempted. 554 # # 555 # task ns.stacks.confirm 556 # active false 557 # host local 558 # periods -poll $LOADPOLL 559 # periods -exec $LOADEXEC 560 # periods -timeout 120 561 # npending 1 562 563 # task.exec 564 # stdout NULL 565 # stderr $LOGDIR/ns.stacks.log 566 567 # book getpage nsData $ns_CstackPAGE -var key 568 # book getword nsStacks $key date -var date 569 # book getword nsStacks $key nsStackState -var ns_STATE 570 # book getword nsData $key dbname -var DBNAME 571 # book npages nsData -var Npages 572 573 # if ($VERBOSE > 5) 574 # echo "ns.stacks.confirm: " $ns_CstackPAGE $key $date $DBNAME $ns_STATE $Npages 575 # end 576 577 # $ns_CstackPAGE ++ 578 # if ($ns_CstackPAGE >= $Npages) set ns_CstackPAGE = 0 579 # option $key 580 581 # if ("$ns_STATE" != "STACKING") break 582 # $run = nightly_science.pl --confirm_stacks --date $date --dbname $DBNAME 583 # # add_standard_args $run 584 # command $run 585 # end 586 # # success 587 # task.exit 0 588 # # convert 'stdout' to book format 589 # book delpage nsStacks $options:0 590 # ipptool2book stdout nsStacks -uniq -key date 591 592 # book getword nsStacks $options:0 nsNmacros -var ns_Nmacros 593 # if ("$ns_Nmacros" != "NULL") 594 # for i 0 $ns_Nmacros 595 # sprintf macroName "ns%dMacro" $i 596 # book getword nsStacks $options:0 $macroName -var macroCmd 597 # $macroCmd 598 # end 599 # end 600 601 # if ($VERBOSE > 2) 602 # book listbook nsData 603 # end 604 # end 605 606 # # locked list 607 # task.exit default 608 # showcommand failure 609 # end 610 # task.exit crash 611 # showcommand crash 612 # end 613 # #operation times out? 614 # task.exit timeout 615 # showcommand timeout 616 # end 617 # end 618 619 620 621 622 # # 623 # # Check to see if the warps are finished 624 # # 625 # task ns.diffs.load 626 # active false 627 # host local 628 # periods -poll $LOADPOLL 629 # periods -exec $LOADEXEC 630 # periods -timeout 120 631 # npending 1 632 633 # task.exec 634 # stdout NULL 635 # stderr $LOGDIR/ns.diffs.log 636 637 # book getpage nsData $ns_diffPAGE -var key 638 # book getword nsDiffs $key date -var date 639 # book getword nsDiffs $key nsDiffState -var ns_STATE 640 # book getword nsStacks $key nsStackState -var ns_stack_STATE 641 # book getword nsData $key dbname -var DBNAME 642 # book npages nsData -var Npages 643 644 # if ($VERBOSE > 5) 645 # echo "ns.diffs.load: " $ns_diffPAGE $key $date $DBNAME $ns_STATE $Npages 646 # end 647 648 # $ns_diffPAGE ++ 649 # if ($ns_diffPAGE >= $Npages) set ns_diffPAGE = 0 650 # option $key 651 652 # if ("$ns_STATE" != "TOWARP") break 653 # $run = nightly_science.pl --check_diffs --date $date --dbname $DBNAME 654 # # add_standard_args $run 655 # command $run 656 # end 657 658 # # success 659 # task.exit 0 660 # # convert 'stdout' to book format 661 # book delpage nsDiffs $options:0 662 # ipptool2book stdout nsDiffs -uniq -key date 663 664 # book getword nsDiffs $options:0 nsNmacros -var ns_Nmacros 665 # if ("$ns_Nmacros" != "NULL") 666 # for i 0 $ns_Nmacros 667 # sprintf macroName "ns%dMacro" $i 668 # book getword nsDiffs $options:0 $macroName -var macroCmd 669 # $macroCmd 670 # end 671 # end 672 673 # if ($VERBOSE > 2) 674 # book listbook nsData 675 # end 676 # end 677 678 # # locked list 679 # task.exit default 680 # showcommand failure 681 # end 682 # task.exit crash 683 # showcommand crash 684 # end 685 # #operation times out? 686 # task.exit timeout 687 # showcommand timeout 688 # end 689 # end 690 691 692 # # END GRAVEYARD 693 # end 694 695 654 696 # # 655 697 # # Queue sweetspot runs
Note:
See TracChangeset
for help on using the changeset viewer.
