IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 18, 2012, 5:57:19 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20121130/ippTasks
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121130/ippTasks

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

    r33030 r34839  
    4545        diffphot.pro \
    4646        lap.pro \
    47         vp.pro
     47        vp.pro \
     48        bg.regeneration.pro
    4849
    4950other_files = \
  • branches/eam_branches/ipp-20121130/ippTasks/addstar.pro

    r34265 r34839  
    212212  host         local
    213213  periods      -poll $LOADPOLL
    214   periods      -exec 300
     214  periods      -exec $LOADEXEC_ADD
    215215  periods      -timeout 300
    216216  npending     1
    … …  
    266266  host         local
    267267  periods      -poll $LOADPOLL
    268   periods      -exec 300
     268  periods      -exec $LOADEXEC_ADD
    269269  periods      -timeout 300
    270270  npending     1
  • branches/eam_branches/ipp-20121130/ippTasks/nightly_science.pro

    r32375 r34839  
    258258task              ns.dqstats.load
    259259  host            local
    260   periods         -poll 3600
     260  periods         -poll $LOADPOLL
    261261  periods         -exec $LOADEXEC
    262262  periods         -timeout 300
  • branches/eam_branches/ipp-20121130/ippTasks/science.cleanup.pro

    r34203 r34839  
    1313
    1414check.globals
     15
     16# if set tell cleanup script to check for files from all components regardless of the data_state
     17$CHECK_ALL_COMPONENTS = 0
     18macro set.check.all.components
     19    $CHECK_ALL_COMPONENTS = 1
     20end
     21macro clear.check.all.components
     22    $CHECK_ALL_COMPONENTS = 0
     23end
     24macro get.check.all.components
     25    echo CHECK_ALL_COMPONENTS = $CHECK_ALL_COMPONENTS
     26end
     27
    1528
    1629## chip.cleanup.pro : -*- sh -*-
    … …  
    130143    book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
    131144    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
     145    book getword chipPendingCleanup $pageName exp_tag -var EXP_TAG
     146    book getword chipPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    132147    book getword chipPendingCleanup $pageName dbname -var DBNAME
    133148
    134     # specify choice of local or remote host based on camera and chip (class_id)
     149    # specify choice of local or remote host based on camera and chip (in this case FPA)
    135150    set.host.for.camera $CAMERA FPA
     151
     152    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     153
     154    sprintf LOGFILE "%s/%s/%s.ch.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID
    136155
    137156    stdout $LOGDIR/chip.cleanup.log
    138157    stderr $LOGDIR/chip.cleanup.log
    139158
    140     # XXX is everything listed here needed?
    141     $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
     159    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     160    if ($CHECK_ALL_COMPONENTS)
     161        $run = $run --check-all
     162    end
    142163    add_standard_args run
    143164
    … …  
    282303    book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
    283304    book getword camPendingCleanup $pageName cam_id -var CAM_ID
     305    book getword camPendingCleanup $pageName exp_tag -var EXP_TAG
     306    book getword camPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    284307    book getword camPendingCleanup $pageName dbname -var DBNAME
    285308
    … …  
    287310    set.host.for.camera $CAMERA FPA
    288311
     312    # set the WORKDIR variable
     313    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     314
     315    ## generate LOGFILE specific to this exposure (& cam_id)
     316    sprintf LOGFILE "%s/%s/%s.cm.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $CAM_ID
     317
    289318    stdout $LOGDIR/camera.cleanup.log
    290319    stderr $LOGDIR/camera.cleanup.log
    291320
    292     # XXX is everything listed here needed?
    293     $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
     321    $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
    294322    add_standard_args run
    295323
    … …  
    591619    book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
    592620    book getword warpPendingCleanup $pageName warp_id -var WARP_ID
     621    book getword warpPendingCleanup $pageName exp_tag -var EXP_TAG
     622    book getword warpPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    593623    book getword warpPendingCleanup $pageName dbname -var DBNAME
    594624
    595625    # specify choice of local or remote host based on camera and warp (class_id)
    596626    set.host.for.camera $CAMERA FPA
     627    set.workdir.by.camera $CAMERA $WARP_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     628
     629    sprintf LOGFILE "%s/%s/%s.wrp.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $WARP_ID
    597630
    598631    stdout $LOGDIR/warp.cleanup.log
    599632    stderr $LOGDIR/warp.cleanup.log
    600633
    601     # XXX is everything listed here needed?
    602     $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
     634    $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     635    if ($CHECK_ALL_COMPONENTS)
     636        $run = $run --check-all
     637    end
    603638    add_standard_args run
    604639
    … …  
    748783    book getword diffCleanup $pageName state -var CLEANUP_MODE
    749784    book getword diffCleanup $pageName diff_id -var DIFF_ID
     785    book getword diffCleanup $pageName tess_id -var TESS_ID
     786    book getword diffCleanup $pageName workdir -var WORKDIR_TEMPLATE
    750787    book getword diffCleanup $pageName dbname -var DBNAME
    751788
    752789    # specify choice of local or remote host based on camera and diff (class_id)
    753790    set.host.for.camera $CAMERA FPA
     791    set.workdir.by.camera $CAMERA $DIFF_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     792    sprintf LOGFILE "%s/%s/%s.dif.%s.cleanup.log" $WORKDIR $TESS_ID $TESS_ID $DIFF_ID
     793
    754794
    755795    stdout $LOGDIR/diff.cleanup.log
    756796    stderr $LOGDIR/diff.cleanup.log
    757797
    758     # XXX is everything listed here needed?
    759     $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
     798    $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     799    if ($CHECK_ALL_COMPONENTS)
     800        $run = $run --check-all
     801    end
    760802    add_standard_args run
    761803
    … …  
    899941    book getword stackCleanup $pageName state -var CLEANUP_MODE
    900942    book getword stackCleanup $pageName stack_id -var STACK_ID
     943    book getword stackCleanup $pageName path_base -var PATH_BASE
    901944    book getword stackCleanup $pageName dbname -var DBNAME
    902945
    … …  
    907950    stderr $LOGDIR/stack.cleanup.log
    908951
    909     # XXX is everything listed here needed?
    910     $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
     952    sprintf LOGFILE "%s.cleanup.log" PATH_BASE
     953    $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
    911954    add_standard_args run
    912955
  • branches/eam_branches/ipp-20121130/ippTasks/skycal.pro

    r32983 r34839  
    88# test for required global variables
    99check.globals
     10
     11# skcal.pro should have a more restricted polling limit (to avoid stress with getstar)
     12if ($?POLL_LIMIT_SKYCAL == 0) set POLL_LIMIT_SKYCAL = 25
     13
     14macro set.skycal.poll
     15  if ($0 != 2)
     16    echo "USAGE:set.skycal.poll (value)"
     17    break
     18  end
     19 
     20  $POLL_LIMIT_SKYCAL = $1
     21end
     22
     23macro get.skycal.poll
     24  echo "skycal poll limit: $POLL_LIMIT_SKYCAL"
     25end
    1026
    1127### Initialise the books containing the tasks to do
    … …  
    7995      # save the DB name for the exit tasks
    8096      option $DB:$skycal_DB
    81       $run = $run -dbname $DB:$skycal_DB -limit 40
     97      $run = $run -dbname $DB:$skycal_DB
    8298      $skycal_DB ++
    8399      if ($skycal_DB >= $DB:n) set skycal_DB = 0
    … …  
    85101    add_poll_args run
    86102    add_poll_labels run
     103    $run = $run -limit $POLL_LIMIT_SKYCAL
    87104    command $run
    88105  end
    … …  
    123140
    124141  task.exec
     142    # if we are unable to run use "long" exectime
     143    periods -exec $RUNEXEC
    125144    book npages skycalRun -var N
    126145    if ($N == 0) break
    127146    if ($NETWORK == 0) break
    128147    if ($BURNTOOLING == 1) break
     148
    129149
    130150    # look for new entries in skycalRun (pantaskState == INIT)
    … …  
    147167
    148168    # set the host and workdir based on the skycell hash
    149     set.host.for.skycell $SKYCELL_ID
     169    # set.host.for.skycell $SKYCELL_ID
     170    host anyhost
    150171    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    151172
    … …  
    172193      echo command $run
    173194    end
     195    # since we have work to do shorten exec time
     196    periods -exec .1
    174197    command $run
    175198  end
    … …  
    197220  host         local
    198221
    199   periods      -poll 60.0
    200   periods      -exec 1800.0
     222  periods      -poll 10.0
     223  periods      -exec 1200.0
    201224  periods      -timeout 120.0
    202225  npending     1
    203   active false
     226  active true
    204227 
    205228  stdout NULL
  • branches/eam_branches/ipp-20121130/ippTasks/staticsky.pro

    r33957 r34839  
    7070
    7171  periods      -poll $LOADPOLL
    72   periods      -exec $LOADEXEC
    73   periods      -timeout 30
     72  periods      -exec 30
     73  periods      -timeout 60
    7474  npending     1
    7575
    … …  
    154154
    155155    # set the host and workdir based on the skycell hash
    156     set.host.for.skycell $SKYCELL_ID
     156    # set.host.for.skycell $SKYCELL_ID
     157    host anyhost
    157158    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    158159
  • branches/eam_branches/ipp-20121130/ippTasks/summit.copy.pro

    r33168 r34839  
    223223    periods      -exec     10
    224224    periods      -poll     1
    225     periods      -timeout  20
     225    periods      -timeout  60
    226226    npending     1
    227227
  • branches/eam_branches/ipp-20121130/ippTasks/survey.pro

    r34350 r34839  
    1717 book create SURVEY_PUBLISH
    1818 book create SURVEY_STATICSKYSINGLE
     19 book create SURVEY_SKYCAL
    1920 $haveSurveyBooks = TRUE
    2021end
    … …  
    3132$SURVEY_WARP_BG_DB = 0
    3233$SURVEY_PUBLISH_DB = 0
     34$SURVEY_SKYCAL_DB = 0
    3335$SURVEY_STATICSKYSINGLE_DB = 0
    3436$SURVEY_EXEC = 120
    … …  
    7375    active true
    7476  end 
     77  task survey.skycal
     78    active true
     79  end
    7580end
    7681
    … …  
    110115  end
    111116  task survey.staticskysingle
     117    active false
     118  end
     119  task survey.skycal
    112120    active false
    113121  end
    … …  
    464472  book delpage SURVEY_STATICSKYSINGLE $1
    465473end
     474
     475macro survey.add.skycal
     476  if ($0 != 3)
     477    echo "USAGE: survey.add.skycal (label) (dist_group)"
     478    break
     479  end
     480  book newpage SURVEY_SKYCAL $1
     481  book setword SURVEY_SKYCAL $1 LABEL $1
     482  book setword SURVEY_SKYCAL $1 DIST_GROUP $2
     483  book setword SURVEY_SKYCAL $1 STATE PENDING
     484end
     485
     486macro survey.del.skycal
     487  if ($0 != 2)
     488    echo "USAGE: survey.del.skycal (label)"
     489    break
     490  end
     491  book delpage SURVEY_SKYCAL $1
     492end
     493
     494macro survey.show.skycal
     495  if ($0 != 1)
     496    echo "USAGE: survey.show.skyacl"
     497    break
     498  end
     499  book listbook SURVEY_SKYCAL
     500end
     501
    466502
    467503task survey.diff
    … …  
    14531489end
    14541490
     1491# Survey task for Skycal stage
     1492
     1493task survey.skycal
     1494  host local
     1495 
     1496  periods      -poll $SURVEY_POLL
     1497  periods      -exec $SURVEY_EXEC
     1498  periods      -timeout $SURVEY_TIMEOUT
     1499  npending     1
     1500
     1501  stdout $LOGDIR/survey.skycal.log
     1502  stderr $LOGDIR/survey.skycal.log
     1503
     1504  task.exec
     1505    book npages SURVEY_SKYCAL -var N
     1506    if ($N == 0)
     1507#      echo "No labels for processing"
     1508      break
     1509    endif
     1510
     1511    book getpage SURVEY_SKYCAL 0 -var label -key STATE NEW
     1512    if ("$label" == "NULL")
     1513      # All labels have been done --- reset
     1514#      echo "Resetting labels"
     1515      for i 0 $N
     1516        book getpage SURVEY_SKYCAL $i -var label
     1517        book setword SURVEY_SKYCAL $label STATE NEW
     1518      end
     1519      book getpage SURVEY_SKYCAL 0 -var label -key STATE NEW
     1520
     1521      # Select different database
     1522      $SURVEY_SKYCAL_DB ++
     1523      if ($SURVEY_SKYCAL_DB >= $DB:n) set SURVEY_SKYCAL_DB = 0
     1524    end
     1525
     1526    book setword SURVEY_SKYCAL $label STATE DONE
     1527    book getword SURVEY_SKYCAL $label DIST_GROUP -var dist_group
     1528
     1529    # note: currently skycal uses the staticskyRun workdir
     1530
     1531    $run = staticskytool -defineskycalrun -select_label $label -set_dist_group $dist_group
     1532
     1533    if ($DB:n == 0)
     1534      option DEFAULT
     1535    else
     1536      $run = $run -dbname $DB:$SURVEY_SKYCAL_DB
     1537      option $DB:$SURVEY_SKYCAL_DB
     1538    end
     1539   
     1540    # echo $run
     1541    command $run
     1542  end
     1543
     1544  # success
     1545  task.exit    0
     1546#    echo "Success"
     1547  end
     1548
     1549  # locked list
     1550  task.exit    default
     1551    showcommand failure
     1552  end
     1553
     1554  task.exit    crash
     1555    showcommand crash
     1556  end
     1557
     1558  # operation times out?
     1559  task.exit    timeout
     1560    showcommand timeout
     1561  end
     1562end
Note: See TracChangeset for help on using the changeset viewer.