IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2011, 2:44:12 PM (15 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20110906
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110906

  • branches/eam_branches/ipp-20110906/ippTasks/Makefile.am

    r31454 r32630  
    4242        background.pro \
    4343        diffphot.pro \
    44         lap.pro
     44        lap.pro \
     45        vp.pro
    4546
    4647other_files = \
  • branches/eam_branches/ipp-20110906/ippTasks/destreak.pro

    r30855 r32630  
    206206    book getword magicToDS $pageName magicked -var MAGICKED
    207207    book getword magicToDS $pageName dbname -var DBNAME
    208 
     208    book getword magicToDS $pageName diff_tess_id -var DIFF_TESS_ID
     209    book getword magicToDS $pageName mismatched_tess -var MISMATCHED_TESS
    209210
    210211    substr $COMPONENT 0 3 COMP_HEAD
     
    224225    $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 $WORKDIR --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --magicked $MAGICKED --run-state $RUN_STATE
    225226
     227    if ($MISMATCHED_TESS)
     228        book getword magicToDS $pageName diff_tess_id -var DIFF_TESS_ID
     229        $run = $run --mismatched_tess --diff_tess_id $DIFF_TESS_ID
     230    end
    226231    add_standard_args run
    227232
  • branches/eam_branches/ipp-20110906/ippTasks/diskbalance.pro

    r32355 r32630  
    1515book init balanceControl
    1616
     17
     18book init targetPending
     19book init targetControl
     20
    1721macro balance.reset
    1822  book init balancePending
     
    4145end
    4246
     47macro target.reset
     48  book init targetPending
     49end
     50
     51macro target.status
     52  book listbook targetPending
     53end
     54
     55macro target.on
     56  task target.load
     57    active true
     58  end
     59  task target.run
     60    active true
     61  end
     62end
     63
     64macro target.off
     65  task target.load
     66    active false
     67  end
     68  task target.run
     69    active false
     70  end
     71end
     72 
    4373macro set.host.for.balance
    4474  if ($0 != 2)
     
    71101  book setword balanceControl control mDestinations $2
    72102end
     103
     104macro set.balance.range
     105  if ($0 != 3)
     106    echo "USAGE: set.balance.range (SO_ID_START) (SO_ID_RANGE)"
     107    break
     108  end
     109
     110  $BALANCE_SO_ID_START = $1
     111  $BALANCE_SO_ID_RANGE = $2
     112end
     113
    73114
    74115macro show.balance.numbers
     
    90131 end
    91132 $BALANCE_TARGET = $1
     133end
     134
     135macro set.target.range
     136  if ($0 != 3)
     137    echo "USAGE: set.target.range (SO_ID_START) (SO_ID_RANGE)"
     138    break
     139  end
     140
     141  $TARGET_SO_ID_START = $1
     142  $TARGET_SO_ID_RANGE = $2
     143end
     144
     145
     146macro show.target.numbers
     147  echo "target so_ids: $TARGET_SO_ID_START $TARGET_SO_ID_RANGE"
     148end
     149
     150macro show.targetPending
     151  book npages targetPending -var N
     152  echo "$N pages in book"
     153  book listbook targetPending
    92154end
    93155
     
    250312
    251313
    252 
    253    
    254 
     314# This value will need to be incremented periodically.  It looks like we grow by about 5e7 so_ids per month.
     315$TARGET_BIG_SO_ID   = 6e8
     316$TARGET_SO_ID_START = int($TARGET_BIG_SO_ID * rnd(0))
     317$TARGET_SO_ID_RANGE = 500000
     318$TARGET_LIMIT       = 500
     319$TARGET_OFFSET      = 0
     320$TARGET_TARGET      = "SOURCE"
     321# Select Nebulous objects which should be shuffled
     322task           target.load
     323  host         local
     324
     325  periods      -poll 60
     326  periods      -exec 60
     327  periods      -timeout 1500
     328  npending     1
     329
     330  # logs
     331  stdout NULL
     332  stderr $LOGSUBDIR/target.log
     333   
     334  task.exec
     335    book npages targetPending -var N
     336    if ($N > 2000)
     337      process_cleanup targetPending
     338      break
     339    end
     340
     341    command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingtarget --limit $TARGET_LIMIT --offset $TARGET_OFFSET --so_id_start $TARGET_SO_ID_START --so_id_range $TARGET_SO_ID_RANGE 
     342  end
     343
     344   # success : 0 -- we did not hit the limit, advance so_id counter
     345  task.exit 0
     346    # advance the so_id counter
     347    $TARGET_SO_ID_START = $TARGET_SO_ID_START + $TARGET_SO_ID_RANGE
     348    $TARGET_OFFSET = 0
     349    # convert 'stdout' to book format
     350    ipptool2book stdout targetPending -key key -uniq -setword pantaskState INIT
     351
     352    if ($VERBOSE > 2)
     353      book listbook targetPending
     354    end
     355
     356    # delete existing entries in the appropriate pantaskStates
     357    process_cleanup targetPending
     358  end
     359
     360  # success : 1 -- we DID hit the limit, do NOT advance so_id counter
     361  task.exit 1
     362    # convert 'stdout' to book format
     363    ipptool2book stdout targetPending -key key -uniq -setword pantaskState INIT
     364    $TARGET_OFFSET = $TARGET_OFFSET + $TARGET_LIMIT
     365    if ($VERBOSE > 2)
     366      book listbook targetPending
     367    end
     368
     369    # delete existing entries in the appropriate pantaskStates
     370    process_cleanup targetPending
     371  end
     372
     373  # out of so_id range, reset
     374  task.exit 10
     375    # advance the so_id counter
     376    $TARGET_SO_ID_START = 0
     377  end
     378
     379  # locked list
     380  task.exit    default
     381    showcommand failure
     382  end
     383
     384  task.exit    crash
     385    showcommand crash
     386  end
     387
     388  # operation times out?
     389  task.exit    timeout
     390    showcommand timeout
     391  end
     392end
     393
     394# task to execute shuffles
     395task            target.run
     396  periods       -poll 0.5
     397  periods       -exec 5
     398  periods       -timeout 5
     399  npending      200
     400
     401  task.exec
     402    # if we are unable to run the 'exec', use a long retry time
     403    periods -exec 5
     404
     405    book npages targetPending -var N
     406    if ($NETWORK == 0) break
     407    if ($N == 0) break
     408
     409    # look for new objects in targetPending
     410    book getpage targetPending 0 -var pageName -key pantaskState INIT
     411    if ("$pageName" == "NULL") break
     412
     413    book setword targetPending $pageName pantaskState RUN
     414
     415    book getword targetPending $pageName key              -var KEY
     416    book getword targetPending $pageName source_name      -var SOURCE
     417    book getword targetPending $pageName source_host      -var SOURCE_HOST
     418    book getword targetPending $pageName destination_name -var DESTINATION
     419    book getword targetPending $pageName destination_host -var DEST_HOST
     420    book getword targetPending $pageName destination_uri  -var DEST_URI
     421    book getword targetPending $pageName ins_id           -var INS_ID
     422
     423    # Fix this with multihost restriction when possible.
     424    if ("$TARGET_TARGET" == "DESTINATION")
     425       set.host.for.target $DEST_HOST
     426    else
     427       set.host.for.target $SOURCE_HOST
     428    end
     429   
     430
     431    stdout NULL
     432    stderr $LOGSUBDIR/target.log
     433
     434    $run = neb-insedit --key $KEY --ins_id $INS_ID --uri $DEST_URI --volume $DESTINATION
     435    $run = $run --db $NEB_DB --host $NEB_HOST --user $NEB_USER --pass $NEB_PASS
     436    $run = $run --neb_host http://ippc04/nebulous
     437   
     438    # save the pageName for future reference below
     439    options $pageName
     440
     441    # create the command line
     442    if ($VERBOSE > 1)
     443        echo command $run
     444    end
     445    periods -exec 0.05
     446    command $run
     447  end
     448
     449  # default exit status
     450  task.exit     default
     451    process_exit targetPending $options:0 $JOB_STATUS
     452  end
     453
     454  task.exit    crash
     455    showcommand crash
     456    book setword targetPending $options:0 pantaskState CRASH
     457  end
     458
     459  # operation timed out?
     460  task.exit    timeout
     461    showcommand timeout
     462    book setword targetPending $options:0 pantaskState TIMEOUT
     463  end
     464end
     465
     466
  • branches/eam_branches/ipp-20110906/ippTasks/ipphosts.mhpcc.config

    r30821 r32630  
    9595  camera STR GPC1
    9696
    97   XY01  STR  ipp005
    98   XY02  STR  ipp005
     97  XY01  STR  ipp010
     98  XY02  STR  ipp011
    9999  XY03  STR  ipp006
    100100  XY04  STR  ipp006
     
    128128  XY33  STR  ipp021
    129129  XY34  STR  ipp023
    130   XY35  STR  ipp023
     130  XY35  STR  ipp013
    131131
    132132  XY36  STR  ipp024
    133   XY37  STR  ipp024
     133  XY37  STR  ipp019
    134134  XY40  STR  ipp025
    135   XY41  STR  ipp025
    136 
    137   XY42  STR  ipp026
    138   XY43  STR  ipp026
     135  XY41  STR  ipp018
     136
     137  XY42  STR  ipp017
     138  XY43  STR  ipp015
    139139  XY44  STR  ipp027
    140140  XY45  STR  ipp028
     
    174174  camera STR gpc1
    175175
    176   ota01  STR  ipp005
    177   ota02  STR  ipp005
     176  ota01  STR  ipp010
     177  ota02  STR  ipp011
    178178  ota03  STR  ipp006
    179179  ota04  STR  ipp006
     
    207207  ota33  STR  ipp021
    208208  ota34  STR  ipp023
    209   ota35  STR  ipp023
     209  ota35  STR  ipp013
    210210                   
    211211  ota36  STR  ipp024
    212   ota37  STR  ipp024
     212  ota37  STR  ipp019
    213213  ota40  STR  ipp025
    214   ota41  STR  ipp025
    215                    
    216   ota42  STR  ipp026
    217   ota43  STR  ipp026
     214  ota41  STR  ipp018
     215                   
     216  ota42  STR  ipp017
     217  ota43  STR  ipp015
    218218  ota44  STR  ipp027
    219219  ota45  STR  ipp028
     
    285285  count S32   60
    286286
    287   XY01  STR  ipp005
    288   XY02  STR  ipp005
     287  XY01  STR  ipp010
     288  XY02  STR  ipp011
    289289  XY03  STR  ipp006
    290290  XY04  STR  ipp006
     
    318318  XY33  STR  ipp021
    319319  XY34  STR  ipp023
    320   XY35  STR  ipp023
     320  XY35  STR  ipp013
    321321                   
    322322  XY36  STR  ipp024
    323   XY37  STR  ipp024
     323  XY37  STR  ipp019
    324324  XY40  STR  ipp025
    325   XY41  STR  ipp025
    326                    
    327   XY42  STR  ipp026
    328   XY43  STR  ipp026
     325  XY41  STR  ipp018
     326                   
     327  XY42  STR  ipp017
     328  XY43  STR  ipp015
    329329  XY44  STR  ipp027
    330330  XY45  STR  ipp028
     
    441441  sky75 STR  ipp053
    442442END
     443
     444ipphosts METADATA
     445  camera STR STARE
     446
     447  ota01  STR  ipp010
     448  ota02  STR  ipp010
     449  ota03  STR  ipp010
     450  ota04  STR  ipp010
     451                   
     452  ota05  STR  ipp011
     453  ota06  STR  ipp011
     454  ota10  STR  ipp011
     455  ota11  STR  ipp011
     456                   
     457  ota12  STR  ipp012
     458  ota13  STR  ipp012
     459  ota14  STR  ipp012
     460  ota15  STR  ipp012
     461                   
     462  ota16  STR  ipp013
     463  ota17  STR  ipp013
     464  ota20  STR  ipp013
     465  ota21  STR  ipp013
     466                   
     467  ota22  STR  ipp014
     468  ota23  STR  ipp014
     469  ota24  STR  ipp014
     470  ota25  STR  ipp014
     471                   
     472  ota26  STR  ipp015
     473  ota27  STR  ipp015
     474  ota30  STR  ipp015
     475  ota31  STR  ipp015
     476                   
     477  ota32  STR  ipp016
     478  ota33  STR  ipp016
     479  ota34  STR  ipp016
     480  ota35  STR  ipp016
     481                   
     482  ota36  STR  ipp017
     483  ota37  STR  ipp017
     484  ota40  STR  ipp017
     485  ota41  STR  ipp017
     486                   
     487  ota42  STR  ipp018
     488  ota43  STR  ipp018
     489  ota44  STR  ipp018
     490  ota45  STR  ipp018
     491                   
     492  ota46  STR  ipp019
     493  ota47  STR  ipp019
     494  ota50  STR  ipp019
     495  ota51  STR  ipp019
     496                   
     497  ota52  STR  ipp020
     498  ota53  STR  ipp020
     499  ota54  STR  ipp020
     500  ota55  STR  ipp020
     501                   
     502  ota56  STR  ipp021
     503  ota57  STR  ipp021
     504  ota60  STR  ipp021
     505  ota61  STR  ipp021
     506                   
     507  ota62  STR  ipp010
     508  ota63  STR  ipp011
     509  ota64  STR  ipp012
     510  ota65  STR  ipp013
     511                   
     512  ota66  STR  ipp014
     513  ota67  STR  ipp015
     514  ota71  STR  ipp016
     515  ota72  STR  ipp017
     516                   
     517  ota73  STR  ipp018
     518  ota74  STR  ipp019
     519  ota75  STR  ipp020
     520  ota76  STR  ipp021
     521END
  • branches/eam_branches/ipp-20110906/ippTasks/lap.pro

    r31491 r32630  
    1010$lap_RunPage = 0
    1111$lap_DonePage = 0
     12
     13$LAP_QUEUE = NULL
    1214
    1315book init lapNewRuns
     
    135137 
    136138
     139macro lap.define.queue
     140  $LAP_QUEUE = $1
     141end
     142
    137143task           lap.initial.load
    138144  host         local
     
    388394    stderr $LOGDIR/lap.load.log
    389395
    390     $run = laptool -pendingrun -state done
     396    $run = laptool -pendingrun -state full
    391397
    392398    if ($lapSeq:n != 0)
     
    463469    option $LAP_ID
    464470    $run = lap_science.pl --cleanup_mode --dbname $DBNAME --lap_id $LAP_ID
     471    if ("$LAP_QUEUE" != "NULL")
     472      $run = $run --queue_list $LAP_QUEUE
     473    end
     474   
    465475
    466476    command $run
  • branches/eam_branches/ipp-20110906/ippTasks/nightly_science.pro

    r30345 r32630  
    178178  periods         -poll $LOADPOLL
    179179  periods         -exec $LOADEXEC
    180   periods         -timeout 30
     180  periods         -timeout 300
    181181  trange          0:00:00 1:00:00 -nmax 1
    182182  npending        1
     
    260260  periods         -poll 3600
    261261  periods         -exec $LOADEXEC
    262   periods         -timeout 30
     262  periods         -timeout 300
    263263  trange          22:00:00 23:59:59
    264264  trange          00:00:00 10:00:00
  • branches/eam_branches/ipp-20110906/ippTasks/summit.copy.pro

    r31854 r32630  
    442442        # this function uses workdir_template, default_host, volume_template, volume_default,
    443443        # it sets workdir and volume
    444         set.workdir.by.camera $CAMERA $CLASS_ID $workdir_template $default_host workdir_base
     444
     445        # Look to see if we have a stare type observation, and redirect it to an appropriate host
     446        substr $EXP_NAME 10 1 EXPTYPE_KEY
     447        if ("$EXPTYPE_KEY" == "a")
     448          set.workdir.by.camera STARE $CLASS_ID $workdir_template $default_host workdir_base
     449        else
     450          set.workdir.by.camera $CAMERA $CLASS_ID $workdir_template $default_host workdir_base
     451        end
    445452
    446453        # figure out filename
Note: See TracChangeset for help on using the changeset viewer.