IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2025, 11:18:50 AM (8 months ago)
Author:
eugene
Message:

working on burntool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.onechip.pt

    r42911 r42933  
    11
    22# QQQ relevant variables:
     3
     4#### NEW CONCEPT, USE THIS NOT burntool.pt ####
    35
    46# btChipHost : book with list of chiphost books.  each of those books
     
    1012# jobs wanting data from a host.
    1113
    12 # $BT_CHIPHOST_NSEQ : current (or last) chiphost examined.  this task
     14# each page of btChipHost has the name of the host (HOSTNAME), current
     15# number of running jobs (NRUN).  HOSTNAME is also the name of the
     16# associate book containing jobs for that host.
     17
     18# HOSTNAME books: each hostname is the name of a book containing the list
     19# of chips to be run.  In these books, each page contains info about the
     20# chip: filenames, exposure, class_id, etc, and pantasksState which may be
     21# INIT, RUN, DONE
     22
     23# $BT_CHIPHOST_ITER : current (or last) chiphost examined.  this task
    1324# loops over the full list of chiphost books
    1425
     
    1728if (not($?BT_SETUP))
    1829  $BT_SETUP = 1
    19   $BT_CHIPHOST_NSEQ = 0
     30  $BT_CHIPHOST_ITER = 0
    2031  $BT_CHIPHOST_NMAX = 2
    2132  book create btChipHost
     
    4253
    4354    # if we have reached the end, restart the loop over chip hosts
    44     if ($BT_CHIPHOST_NSEQ >= $Nhosts)
    45       $BT_CHIPHOST_NSEQ = 0
     55    if ($BT_CHIPHOST_ITER >= $Nhosts)
     56      $BT_CHIPHOST_ITER = 0
    4657      echo "restart loop"
    4758      break
    4859    end
    4960   
    50     book getpage btChipHost $BT_CHIPHOST_NSEQ          -var BT_CHIPHOST_PAGE
     61    book getpage btChipHost $BT_CHIPHOST_ITER          -var BT_CHIPHOST_PAGE
    5162    book getword btChipHost $BT_CHIPHOST_PAGE HOSTNAME -var BT_CHIPHOST_BOOK
    5263    book getword btChipHost $BT_CHIPHOST_PAGE NRUN     -var BT_CHIPHOST_NRUN
     
    5465    # only run NMAX jobs per chiphost
    5566    if ($BT_CHIPHOST_NRUN >= $BT_CHIPHOST_NMAX)
    56       $BT_CHIPHOST_NSEQ ++
    57       echo "try next ($BT_CHIPHOST_NSEQ) -- done loop"
     67      $BT_CHIPHOST_ITER ++
     68      echo "try next ($BT_CHIPHOST_ITER) -- done loop"
    5869      periods -exec 0.05
    5970      break
     
    6374    book npages $BT_CHIPHOST_BOOK -var BT_CHIPHOST_NCHP
    6475    if ($BT_CHIPHOST_NCHP == 0)
    65       $BT_CHIPHOST_NSEQ ++
    66       echo "try next ($BT_CHIPHOST_NSEQ) -- no chips"
     76      $BT_CHIPHOST_ITER ++
     77      echo "try next ($BT_CHIPHOST_ITER) -- no chips"
    6778      periods -exec 0.05
    6879      break
     
    7283    book getpage $BT_CHIPHOST_BOOK 0 -var pageName -key pantaskState INIT
    7384    if ("$pageName" == "NULL")
    74       $BT_CHIPHOST_NSEQ ++
    75       echo "try next ($BT_CHIPHOST_NSEQ) -- nothing ready"
     85      $BT_CHIPHOST_ITER ++
     86      echo "try next ($BT_CHIPHOST_ITER) -- nothing ready"
    7687      periods -exec 0.05
    7788      break
     
    149160
    150161  # what else needs to happen after the job is done?
     162  # XXX how do we use "quality" ??
    151163
    152164  # decrement NRUN for this host
Note: See TracChangeset for help on using the changeset viewer.