IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28778


Ignore:
Timestamp:
Jul 29, 2010, 2:17:30 PM (16 years ago)
Author:
bills
Message:

dist.advance.run was silently failing to set a workdir when $stage_id < 10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r28750 r28778  
    147147        # to compute an index into the host table
    148148        strlen $stage_id length
    149         $start = $length - 2
    150         substr $stage_id $start 2 index
     149        if ($length >= 2)
     150            $start = $length - 2
     151            substr $stage_id $start 2 index
     152        else
     153            # stage_id < 10 caused a very annoying couple of hours for bills to debug
     154            substr $stage_id 0 1 index
     155        end
    151156        $component_id = $index % $count
    152157        book getword ipphosts distribution $component_id -var myhost
     
    411416
    412417    # using $DIST_ID as the "component" works fine here since we only look
    413     # at the last two digits
    414     set.dist.workdir.by.component $STAGE_ID "exposure" $OUTDIR_TEMPLATE OUTDIR
     418    # at the last two digits. But make sure that there 2 digits
     419    $fake_component = $STAGE_ID + 10
     420    set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR
    415421    if ("$OUTDIR" == "NULL")
    416422        echo ERROR failed to set workdir for $DIST_ID
Note: See TracChangeset for help on using the changeset viewer.