IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19545


Ignore:
Timestamp:
Sep 12, 2008, 4:20:57 PM (18 years ago)
Author:
eugene
Message:

convert chiphost tables to ipphosts tables, add lookups for skycellID to host, add in the redirect-output option to stack and diff

Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/diff_skycell.pl

    r19464 r19545  
    2525use Pod::Usage qw( pod2usage );
    2626
    27 my ($diff_id, $dbname, $threads, $outroot, $verbose, $no_update, $no_op);
     27my ($diff_id, $dbname, $threads, $outroot, $verbose, $no_update, $no_op, $redirect);
    2828GetOptions(
    2929    'diff_id|d=s'       => \$diff_id, # Diff identifier
     
    3434    'no-update'         => \$no_update, # Don't update the database?
    3535    'no-op'             => \$no_op, # Don't do any operations?
     36    'redirect-output'   => \$redirect,
    3637) or pod2usage( 2 );
    3738
     
    4243          ) unless defined $diff_id
    4344    and defined $outroot;
     45
     46# XXX camera is not known here; cannot use filerules...
     47# my $logDest = $ipprc->filename("LOG.EXP", $outroot);
     48
     49my $logDest = "$outroot.log";
     50$ipprc->redirect_output($logDest) if $redirect;
    4451
    4552my $STATS =
     
    183190my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot);
    184191my $traceDest = $ipprc->filename("TRACE.EXP", $outroot);
    185 my $logDest = $ipprc->filename("LOG.EXP", $outroot);
    186192
    187193# Perform subtraction
  • trunk/ippScripts/scripts/stack_skycell.pl

    r19396 r19545  
    2828use Pod::Usage qw( pod2usage );
    2929
    30 my ($stack_id, $dbname, $outroot, $debug, $threads, $verbose, $no_update, $no_op, $save_temps);
     30my ($stack_id, $dbname, $outroot, $debug, $threads, $verbose, $no_update, $no_op, $redirect, $save_temps);
    3131GetOptions(
    3232    'stack_id|d=s'      => \$stack_id, # Stack identifier
     
    3838    'no-update'         => \$no_update, # Don't update the database?
    3939    'no-op'             => \$no_op, # Don't do any operations?
     40    'redirect-output'   => \$redirect,
    4041    'save-temps'        => \$save_temps, # Save temporary files?
    4142) or pod2usage( 2 );
     
    4748          ) unless defined $stack_id
    4849    and defined $outroot;
     50
     51# XXX camera is not known here; cannot use filerules...
     52# my $logDest = $ipprc->filename("LOG.EXP", $outroot);
     53
     54my $logDest = "$outroot.log";
     55$ipprc->redirect_output($logDest) if $redirect;
    4956
    5057my $STATS =
     
    97104my $camera;                     # Camera
    98105foreach my $file (@$files) {
    99     # skip warps which are speicified as 'ignored'
     106    # skip warps which are specified as 'ignored'
    100107    if ($file->{ignored}) { next; }
    101108    if (defined $tess_id) {
     
    166173my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot);
    167174my $traceDest = $ipprc->filename("TRACE.EXP", $outroot);
    168 my $logDest = $ipprc->filename("LOG.EXP", $outroot);
    169175my $configuration = $ipprc->filename("PPSTACK.CONFIG", $outroot);
    170176
  • trunk/ippTasks/Makefile.am

    r19381 r19545  
    2121
    2222other_files = \
    23         chiphosts.manoa.config \
    24         chiphosts.mhpcc.config \
     23        ipphosts.manoa.config \
     24        ipphosts.mhpcc.config \
    2525        site.manoa.pro \
    2626        site.mhpcc.pro \
  • trunk/ippTasks/diff.pro

    r19465 r19545  
    142142    book getword diffSkyfile $pageName dbname -var DBNAME
    143143
    144     ### XXX Instead of setting these by camera, need to set by skycell_id
    145     ### XXX change these to use the --redirect scheme
    146 #    set.host.for.camera $CAMERA $DIFF_ID
    147 #    set.workdir.by.camera $CAMERA $DIFF_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    148     host anyhost
    149     $WORKDIR = $WORKDIR_TEMPLATE
     144    # set the host and workdir based on the skycell hash
     145    set.host.for.skycell $SKYCELL_ID
     146    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     147
     148    # XXX old code:
     149    # host anyhost
     150    # $WORKDIR = $WORKDIR_TEMPLATE
    150151
    151152    basename $TESS_DIR -var TESS_ID
    152153    sprintf outroot "%s/%s/%s/%s.%s.dif.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_ID
    153154
    154     ## generate output log based on filerule (convert the URI to a PATH)
    155     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id $DIFF_ID --basename $outroot`
    156     if ("$logfile" == "")
    157       echo "WARNING: logfile not defined in diff.skycell.run"
    158       break
    159     end
    160 
    161     stdout $logfile
    162     stderr $logfile
    163     dirname $logfile -var outpath
    164     mkdir $outpath
    165 
    166     $run = diff_skycell.pl --threads @MAX_THREADS@ --diff_id $DIFF_ID --outroot $outroot
     155    stdout $LOGDIR/diff.skycell.log
     156    stderr $LOGDIR/diff.skycell.log
     157
     158    $run = diff_skycell.pl --threads @MAX_THREADS@ --diff_id $DIFF_ID --outroot $outroot --redirect-output
    167159    add_standard_args run
    168160
  • trunk/ippTasks/pantasks.pro

    r19465 r19545  
    350350  end
    351351
    352   # missing camera and/or chiphosts table results in host = NULL
    353   book getword chiphosts $camera $classID -var host
     352  # missing camera and/or ipphosts table results in host = NULL
     353  book getword ipphosts $camera $classID -var host
    354354
    355355  if ("$host" == "NULL")
     
    360360end
    361361
    362 macro set.volume.by.camera
    363   if ($0 != 3)
    364     echo "USAGE: set.volume.by.camera (camera) (class_id) (template) (default) (varname)"
    365     echo " uses global variable NEBULOUS to determine if nebulous is active"
    366     break
    367   end
    368 
    369   local host default template camera classID varname
    370   $camera = $1
    371   $classID = $2
    372   $template = $3
    373   $default = $4
    374   $varname = $5
    375 
    376   # missing camera and/or chiphosts table results in host = NULL
    377   book getword chiphosts $camera $classID -var host
    378 
    379   if (not($NEBULOUS))
    380     $$varname = "NULL"
    381     return
    382   end
    383 
    384   if ("$host" == "NULL")
    385     $$varname = $default
    386     return
    387   end
    388 
    389   strsub $template @HOST@ $host -var $varname
     362macro set.workdir.by.skycell
     363  if ($0 != 5)
     364    echo "USAGE: set.workdir.by.skycell (skycellID) (template) (default) (varname)"
     365    break
     366  end
     367
     368  local host default template skycellID varname count
     369  $skycellID = $1
     370  $template = $2
     371  $default = $3
     372  $varname = $4
     373
     374  if ("$template" == "NULL")
     375    $varname = $workdir_template
     376    echo "WARNING: WORKDIR template not set.  Defaulting to $workdir_template"
     377    break
     378  end
     379
     380  # get the folding count for this camera 
     381  book getword ipphosts skycell count -var count
     382  if ("$count" == "NULL")
     383    strsub $template @HOST@ $default -var $varname
     384    return
     385  end   
     386
     387  strhash $skycellID $count -var skyhash
     388  sprintf skyname "sky%02d" $skyhash
     389
     390  # missing ipphosts table results in host = NULL
     391  book getword ipphosts skycell $skyname -var host
     392
     393  if ("$host" == "NULL")
     394    strsub $template @HOST@ $default -var $varname
     395  else
     396    strsub $template @HOST@ $host -var $varname
     397  end
    390398end
    391399
     
    396404  end
    397405
     406  local host
     407
    398408  if (not($PARALLEL))
    399409    host local
     
    401411  end
    402412
    403   # missing camera and/or chiphosts table results in host = NULL
    404   book getword chiphosts $1 $2 -var host
     413  # missing camera and/or ipphosts table results in host = NULL
     414  book getword ipphosts $1 $2 -var host
    405415
    406416  if ("$host" == "NULL")
     
    411421end
    412422
     423macro set.host.for.skycell
     424  if ($0 != 2)
     425    echo "USAGE: set.host.for.skycell (skycellID)"
     426    break
     427  end
     428
     429  local skycellID varname count host skyname skyhash
     430  $skycellID = $1
     431
     432  # get the folding count for this camera 
     433  book getword ipphosts skycell count -var count
     434  if ("$count" == "NULL")
     435    host anyhost
     436    return
     437  end   
     438
     439  strhash $skycellID $count -var skyhash
     440  sprintf skyname "sky%02d" $skyhash
     441
     442  # missing ipphosts table results in host = NULL
     443  book getword ipphosts skycell $skyname -var host
     444
     445  if ("$host" == "NULL")
     446    host anyhost
     447  else
     448    host $host
     449  end
     450end
     451
    413452macro get.host.for.camera
    414453  if ($0 != 3)
     
    422461  end
    423462
    424   # missing camera and/or chiphosts table results in host = NULL
    425   book getword chiphosts $1 $2 -var host
     463  # missing camera and/or ipphosts table results in host = NULL
     464  book getword ipphosts $1 $2 -var host
    426465
    427466  if ("$host" == "NULL")
  • trunk/ippTasks/site.manoa.pro

    r16570 r19545  
    44## 1) the machines used for processing
    55## 2) the default_host and workdir_template variables
    6 ## 3) the chiphost table
     6## 3) the ipphost table
    77
    88macro init.cluster.po
     
    4848
    4949macro init.site
    50   queueload tmp -x "cat $MODULES:0/chiphosts.manoa.config"
    51   ipptool2book tmp chiphosts -key camera
     50  queueload tmp -x "cat $MODULES:0/ipphosts.manoa.config"
     51  ipptool2book tmp ipphosts -key camera
    5252end
  • trunk/ippTasks/site.mhpcc.pro

    r18947 r19545  
    44## 1) the machines used for processing
    55## 2) the default_host and workdir_template variables
    6 ## 3) the chiphost table
     6## 3) the ipphost table
    77
    88macro init.cluster.mhpcc
     
    5959  init.copy.mhpcc on
    6060
    61   queueload tmp -x "cat $MODULES:0/chiphosts.mhpcc.config"
    62   ipptool2book tmp chiphosts -key camera
     61  queueload tmp -x "cat $MODULES:0/ipphosts.mhpcc.config"
     62  ipptool2book tmp ipphosts -key camera
    6363end
    6464
     
    6666  init.copy.mhpcc on
    6767
    68   queueload tmp -x "cat $MODULES:0/chiphosts.mhpcc.config"
    69   ipptool2book tmp chiphosts -key camera
     68  queueload tmp -x "cat $MODULES:0/ipphosts.mhpcc.config"
     69  ipptool2book tmp ipphosts -key camera
    7070end
  • trunk/ippTasks/stack.pro

    r19465 r19545  
    142142    book getword stackSumSkyfile $pageName dbname -var DBNAME
    143143
    144     ### XXX Instead of setting these by camera, need to set by skycell_id
    145 #    set.host.for.camera $CAMERA $STACK_ID
    146 #    set.workdir.by.camera $CAMERA $STACK_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    147     host anyhost
    148     $WORKDIR = $WORKDIR_TEMPLATE
     144    # set the host and workdir based on the skycell hash
     145    set.host.for.skycell $SKYCELL_ID
     146    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     147
     148    # XXX old code:
     149    # host anyhost
     150    # $WORKDIR = $WORKDIR_TEMPLATE
    149151
    150152    basename $TESS_DIR -var TESS_ID
    151153    sprintf outroot "%s/%s/%s/%s.%s.stk.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $STACK_ID
    152154
    153     ## generate output log based on filerule (convert the URI to a PATH) (use STACK_ID?)
    154 #    $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id $STACK_ID --basename $outroot`
    155     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    156     if ("$logfile" == "")
    157       echo "WARNING: logfile not defined in stack.pro:135"
    158       break
    159     end
    160 
    161     stdout $logfile
    162     stderr $logfile
    163     dirname $logfile -var outpath
    164     mkdir $outpath
    165 
    166     $run = stack_skycell.pl --threads @MAX_THREADS@ --stack_id $STACK_ID --outroot $outroot
     155    stdout $LOGDIR/stack.skycell.log
     156    stderr $LOGDIR/stack.skycell.log
     157
     158    $run = stack_skycell.pl --threads @MAX_THREADS@ --stack_id $STACK_ID --outroot $outroot --redirect-output
    167159    add_standard_args run
    168160
  • trunk/ippTasks/warp.pro

    r19465 r19545  
    158158    book getword warpInputExp $pageName exp_tag -var EXP_TAG
    159159
    160     ### XXX Instead of setting these by camera, need to set by skycell_id
     160    # set the host and workdir (default)
    161161    set.host.for.camera $CAMERA $WARP_ID
    162162    set.workdir.by.camera $CAMERA $WARP_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     
    273273    book getword warpPendingSkyCell $pageName exp_tag -var EXP_TAG
    274274
    275     ### XXX Instead of setting these by camera, need to set by skycell_id
    276     set.host.for.camera $CAMERA $WARP_ID
    277     set.workdir.by.camera $CAMERA $WARP_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    278 
    279     # XXX we are supplied TESS_DIR, strip off path to generate TESS_ID
    280     # basename $TESS_DIR -var TESS_ID
    281     # sprintf outroot "%s/%s/%s/%s.%s.wrp.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $WARP_ID
     275    # set the host and workdir based on the skycell hash
     276    set.host.for.skycell $SKYCELL_ID
     277    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    282278
    283279    ## generate outroot specific to this exposure
Note: See TracChangeset for help on using the changeset viewer.