IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 3, 2011, 2:51:02 PM (15 years ago)
Author:
bills
Message:

Changes to support storing distribution bundles in nebulous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r30436 r30489  
    9595end
    9696
     97# This is now only used if we are not using a nebulous outroot
    9798macro get.host.for.component
    9899    if ($0 != 3)
     
    122123end
    123124
     125# This is now only used if we are not using a nebulous outroot
    124126macro set.dist.workdir.by.component
    125127    if ($0 != 5)
     
    139141    book getword ipphosts distribution count -var count
    140142    if ("$count" == "NULL")
    141         echo "ERROR: distributin hosts list is empty"
     143        echo "ERROR: distribution hosts list is empty"
    142144        break
    143145    end
     
    289291    end
    290292
    291 
    292     set.dist.workdir.by.component $DIST_STAGE_ID $COMPONENT $OUTDIR_TEMPLATE OUTDIR
    293     if ("$OUTDIR" == "NULL")
    294         echo ERROR failed to set workdir for $COMPONENT
    295         break
    296     end
    297 
    298293    substr $COMPONENT 0 3 COMP_HEAD
    299294    if ("$COMP_HEAD" == "sky")
    300295        set.host.for.skycell $COMPONENT
     296        set.workdir.by.skycell $COMPONENT $OUTDIR_TEMPLATE $default_host OUTDIR
    301297    else
    302         # assume component is a class_id, if not we will default to anyhost
     298        # assume component is a class_id, if  it is not we will default to
     299        # host "anyhost"
     300        # and volume "any"
    303301        set.host.for.camera $CAMERA $COMPONENT
     302        set.workdir.by.camera $CAMERA $COMPONENT $OUTDIR_TEMPLATE $default_host OUTDIR
     303    end
     304
     305    if ("$OUTDIR" == "NULL")
     306        echo ERROR failed to set workdir for $COMPONENT
     307        break
    304308    end
    305309
    306310    sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT
    307 #    stdout $logfile
    308 #    stderr $logfile
    309311
    310312    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $DIST_STAGE --stage_id $DIST_STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_ARGS --outdir $OUTDIR --logfile $logfile
     
    401403    book getpage distToAdvance 0 -var pageName -key pantaskState INIT
    402404    if ("$pageName" == "NULL") break
     405
     406    # XXX the sql for disttool -toadvance does not include the camera:
     407    # hack around this for now
     408    $CAMERA = GPC1
    403409
    404410    book setword distToAdvance $pageName pantaskState RUN
     
    414420    end
    415421
    416     host anyhost
    417 
    418     # using $DIST_ID as the "component" works fine here since we only look
    419     # at the last two digits. But make sure that there 2 digits
    420     $fake_component = $STAGE_ID + 10
    421     set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR
     422    substr $OUTDIR_TEMPLATE 0 3 SCHEME
     423    if ("$SCHEME" == "neb")
     424        # XXX This does not work if workdir is not in nebulous
     425        # and $default_host == "any" because /data/any does not exist
     426        # use "dummy" as component. Result will be 'any'
     427        # set.workdir.by.camera $CAMERA dummy $OUTDIR_TEMPLATE $default_host OUTDIR
     428        set.workdir.by.camera GPC1 dummy $OUTDIR_TEMPLATE $default_host OUTDIR
     429    else
     430        # using $DIST_ID as the "component" works fine here since we only look
     431        # at the last two digits. But make sure that there 2 digits
     432        $fake_component = $STAGE_ID + 10
     433        set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR
     434    end
     435 
    422436    if ("$OUTDIR" == "NULL")
    423437        echo ERROR failed to set workdir for $DIST_ID
    424438        break
    425439    end
     440    host anyhost
    426441
    427442    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
    428 #    stdout $logfile
    429 #    stderr $logfile
    430 
    431     $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
     443
     444    $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --camera $CAMERA --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
    432445    add_standard_args run
    433446
Note: See TracChangeset for help on using the changeset viewer.