IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26015 for trunk/ippTasks


Ignore:
Timestamp:
Nov 3, 2009, 1:02:08 PM (17 years ago)
Author:
bills
Message:

Spread building of distribution bundles over a number of hosts (currently 5)

Location:
trunk/ippTasks
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r25462 r26015  
    7070    active false
    7171  end
     72end
     73
     74macro set.dist.workdir.by.component
     75    # component template default varname
     76    if ($0 != 5)
     77        echo "USAGE: set.workdir.by.component (componentID) (template) (default) (varname)"
     78        break
     79    end
     80    local host component default template varname length start count component_id
     81    $component = $1
     82    $template = $2
     83    $default = $3
     84    $varname = $4
     85    if ("$template" == "NULL")
     86        echo "ERROR: WORKDIR template not set."
     87        break
     88    end
     89    book getword ipphosts distribution count -var count
     90    if ("$count" == "NULL")
     91        echo "ERROR: disthosts is empty"
     92        break
     93    end
     94    # take last two letters of component id
     95    # treat it as an integer and use modulous of length of distribution hosts
     96    # to compute a host
     97    strlen $component length
     98    $start = $length - 2
     99    substr $component $start 2 index
     100    $component_id = $index % $count
     101
     102    book getword ipphosts distribution $component_id -var host
     103    if ("$host" == "NULL")
     104        echo "ERROR: failed to find host for $component"
     105        $host = $default
     106    end
     107
     108    strsub $template @HOST@ $host -var $varname
    72109end
    73110
     
    165202    book getword distToProcess $pageName no_magic -var NO_MAGIC
    166203    book getword distToProcess $pageName magicked -var MAGICKED
    167     book getword distToProcess $pageName outdir -var OUTDIR
     204    book getword distToProcess $pageName outdir -var OUTDIR_TEMPLATE
    168205    book getword distToProcess $pageName dbname -var DBNAME
    169206
     
    187224#    set.workdir.by.camera $CAMERA $MAGIC_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    188225#    host anyhost
     226
     227    set.dist.workdir.by.component $COMPONENT $OUTDIR_TEMPLATE ipp049 OUTDIR
     228    if ("$OUTDIR" == "NULL")
     229        echo ERROR failed to set workdir for $COMPONENT
     230        break
     231    end
    189232
    190233    substr $COMPONENT 0 3 COMP_HEAD
     
    294337    book getword distToAdvance $pageName stage   -var STAGE
    295338    book getword distToAdvance $pageName stage_id -var STAGE_ID
    296     book getword distToAdvance $pageName outdir -var OUTDIR
     339    book getword distToAdvance $pageName outdir -var OUTDIR_TEMPLATE
    297340    book getword distToAdvance $pageName clean -var CLEAN
    298341    book getword distToAdvance $pageName dbname -var DBNAME
     
    304347    host anyhost
    305348
     349    # using $DIST_ID as the "component" works fine here since we only look
     350    # at the last two digits
     351    set.dist.workdir.by.component $DIST_ID $OUTDIR_TEMPLATE ipp049 OUTDIR
     352    if ("$OUTDIR" == "NULL")
     353        echo ERROR failed to set workdir for $DIST_ID
     354        break
     355    end
     356
    306357    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
    307358#    stdout $logfile
  • trunk/ippTasks/ipphosts.mhpcc.config

    r25839 r26015  
    214214  ota76  STR  ipp025
    215215END
     216
     217ipphosts METADATA
     218  camera STR distribution
     219  count  S32  5
     220  0      STR ipp048
     221  1      STR ipp049
     222  2      STR ipp050
     223  3      STR ipp051
     224  4      STR ipp052
     225END
  • trunk/ippTasks/rcserver.pro

    r25849 r26015  
    139139    book getword rcPendingFS $pageName dbname -var DBNAME
    140140
    141 #    set.host.for.camera $CAMERA $MAGIC_ID
    142 #    set.workdir.by.camera $CAMERA $MAGIC_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    143141    host anyhost
    144142
Note: See TracChangeset for help on using the changeset viewer.