IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37322


Ignore:
Timestamp:
Aug 27, 2014, 4:02:00 PM (12 years ago)
Author:
eugene
Message:

fix run-time errors

Location:
tags/ipp-pv3-20140717/ippScripts/scripts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_camera.pl

    r37298 r37322  
    7474my $disk_return  = $ipprc->file_resolve($uri_return,1);
    7575
    76 my (undef, $remote_config) = uri_convert($uri_config); # Needs to be done after we've created it.
     76my (undef, $remote_config) = &uri_convert($uri_config); # Needs to be done after we've created it.
    7777
    7878open(TRANSFER, ">$disk_transfer")  || &my_die("Couldn't open file? $disk_transfer",$remote_id, $cam_id, $PS_EXIT_SYS_ERROR, $fail_state);
     
    139139    my $chipProto = $metadata->[0];
    140140    my $chip_path = $chipProto->{path_base};
    141     my $remote_chip_path = uri_local_to_remote( $chip_path );
     141    my $remote_chip_path = &uri_local_to_remote( $chip_path );
    142142    my $pre_cmd_cmfs = "ls -1 ${remote_chip_path}*.cmf > ${remote_outroot}.cmflist";
    143143    my $pre_cmd_masks= "ls -1 ${remote_chip_path}*.mk.fits > ${remote_outroot}.masklist";
     
    172172    foreach my $component(@return_component_list) {
    173173        my $filename = $ipprc->filename($component,$ipp_outroot);
    174         my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename);
     174        my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_return( $filename);
    175175        my $remote_outroot_dir = dirname($ipp_disk);
    176176        print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
     
    178178    foreach my $chipInfo (@{ $metadata }) {
    179179        my $filename = $ipprc->filename("PSASTRO.OUTPUT.MASK",$ipp_outroot,$chipInfo->{class_id});
    180         my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename);
     180        my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_return( $filename);
    181181        my $remote_outroot_dir = dirname($ipp_disk);
    182182        print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_stack.pl

    r37298 r37322  
    7878my $disk_return  = $ipprc->file_resolve($uri_return,1);
    7979
    80 my (undef, $remote_config) = uri_convert($uri_config); # Needs to be done after we've created it.
     80my (undef, $remote_config) = &uri_convert($uri_config); # Needs to be done after we've created it.
    8181
    8282open(TRANSFER, ">$disk_transfer")  || &my_die("Couldn't open file? $disk_transfer",$remote_id, $stack_id, $PS_EXIT_SYS_ERROR, $fail_state);
     
    9393    my $command = "$stacktool -tosum -stack_id $stack_id";
    9494    $command .= " -dbname $dbname " if defined($dbname);
    95     ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    96         run(command => $command, verbose => 0);
     95    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     96        run(command => $command, verbose => $verbose);
    9797    unless ($success) {
    9898        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    113113}
    114114my $ipp_outroot    = "${workdir}/${tess_id}/${skycell_id}/${tess_id}.${skycell_id}.stk.${stack_id}";
    115 my $remote_outroot = uri_local_to_remote($ipp_outroot);
    116 my $remote_outdir  = uri_local_to_remote("${workdir}/${tess_id}/${skycell_id}");
     115my $remote_outroot = &uri_local_to_remote($ipp_outroot);
     116my $remote_outdir  = &uri_local_to_remote("${workdir}/${tess_id}/${skycell_id}");
    117117
    118118# STEP 2: Get the list of input warps
     
    122122    my $command = "$stacktool -inputskyfile -stack_id $stack_id ";
    123123    $command .= " -dbname $dbname " if defined($dbname);
    124     ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    125         run(command => $command, verbose => 0);
     124    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     125        run(command => $command, verbose => $verbose);
    126126    unless ($success) {
    127127        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    131131    my $MDlist = $mdcParser->parse(join "", @$stdout_buf) or
    132132        &my_die("Unable to determine stack component information.", $remote_id, $stack_id, $PS_EXIT_PROG_ERROR, $fail_state);
    133     my $warpData = parse_md_list($MDlist);
     133    $warpData = parse_md_list($MDlist);
    134134}
    135135
     
    139139    foreach my $warpEntry ( @{ $warpData } ) {
    140140        my $warp_path_base = $warpEntry->{path_base};
    141         my $remote_path_base = uri_local_to_remote($warp_path_base);
     141        my $remote_path_base = &uri_local_to_remote($warp_path_base);
    142142        $warp_path_base_string .= " $remote_path_base ";
    143143
     144        if ($verbose) { print STDERR "$warp_path_base_string\n"; }
     145
    144146        # Append file names to transfer lists so we can recover if warps are deleted.
    145         uri_to_outputs($warp_path_base . ".fits");
    146         uri_to_outputs($warp_path_base . ".wt.fits");
    147         uri_to_outputs($warp_path_base . ".mask.fits");
    148         uri_to_outputs($warp_path_base . ".cmf");
    149 #       uri_to_outputs($warp_path_base . ".psf");
     147        &uri_to_outputs($warp_path_base . ".fits");
     148        &uri_to_outputs($warp_path_base . ".wt.fits");
     149        &uri_to_outputs($warp_path_base . ".mask.fits");
     150        &uri_to_outputs($warp_path_base . ".cmf");
     151#       &uri_to_outputs($warp_path_base . ".psf");
    150152    }
    151153    my $mk_mdc_command = "mkdir -p $remote_outdir && sc_mk_stack_mdc.pl $warp_path_base_string > ${remote_outroot}.in.mdc";
     
    179181    foreach my $component(@return_component_list) {
    180182        my $filename = $ipprc->filename($component,$ipp_outroot);
    181         my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename);
     183        my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_return( $filename);
    182184        my $remote_outroot_dir = dirname($ipp_disk);
    183185        print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
     
    203205## Common SC routines
    204206
     207# KEEP
    205208sub uri_convert { # (ipp_disk,remote_disk) = uri_convert(neb_uri);
    206209    my $neb_uri = shift;
     
    219222}
    220223
     224# KEEP
    221225sub uri_convert_and_create { # (ipp_disk,remote_disk) = uri_convert_and_create(neb_uri); ipp_disk is created if it doesn't exist
    222226    my $neb_uri = shift;
     
    235239}
    236240
     241# KEEP
    237242sub uri_to_outputs { # (ipp_disk,remote_disk) = uri_to_output(neb_uri); Appends to TRANSFER and CHECK filehandles
    238243    my $neb_uri = shift;
    239244    my ($ipp_disk, $remote_disk) = uri_convert( $neb_uri );
    240245
    241     unless (exists($file_filter{$neb_uri})) {
    242         $file_filter{$neb_uri} = 1;
    243         print TRANSFER "$ipp_disk\n";
    244         print CHECK    "$remote_disk\n";
    245     }
    246     return($ipp_disk,$remote_disk);
    247 }
    248 
     246    print TRANSFER "$ipp_disk\n";
     247    print CHECK    "$remote_disk\n";
     248    return($ipp_disk,$remote_disk);
     249}
     250
     251# KEEP
    249252sub uri_to_outputs_for_return { # (ipp_disk,remote_disk) = uri_to_outputs_for_return(neb_uri); create ipp_disk, append to RETURN and GENERATE
    250253    my $neb_uri = shift;
    251254    my ($ipp_disk, $remote_disk) = uri_convert_and_create( $neb_uri );
    252     unless (exists($file_filter{$neb_uri})) {
    253         $file_filter{$neb_uri} = 1;
    254         print RETURN "$ipp_disk\n";
    255         print GENERATE "$remote_disk\n";
    256     }
    257     return($ipp_disk,$remote_disk);
    258 }
    259 
     255
     256    print RETURN "$ipp_disk\n";
     257    print GENERATE "$remote_disk\n";
     258    return($ipp_disk,$remote_disk);
     259}
     260
     261# KEEP
    260262sub uri_local_to_remote { #(remote_uri) = uri_local_to_remote(local_neb_uri);
    261263    # This needs to replace the nebulous tag with the remote root.
     
    269271}
    270272
    271 sub uri_remote_to_local { #(local_neb_uri) = uri_remote_to_local(remote_uri);
    272     # This needs to replace the remote root directory with the nebulous tag.
    273     my $remote_uri = shift;
    274     $remote_uri =~ s%${remote_root}%%;
    275     my $local_uri  = "neb:///" . $remote_uri;
    276 
    277     return($local_uri);
    278 }
    279 
    280 
    281273sub my_die { # exit with status; my_die(message,stage_id,exit_code,exit_status);
    282274    my $msg = shift;
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_warp.pl

    r37298 r37322  
    7474my $disk_return  = $ipprc->file_resolve($uri_return,1);
    7575
    76 my (undef, $remote_config) = uri_convert($uri_config); # Needs to be done after we've created it.
     76my (undef, $remote_config) = &uri_convert($uri_config); # Needs to be done after we've created it.
    7777
    7878open(TRANSFER, ">$disk_transfer")  || &my_die("Couldn't open file? $disk_transfer",$remote_id, $warp_id, $PS_EXIT_SYS_ERROR, $fail_state);
     
    9090    my $command = "$warptool -towarped -warp_id $warp_id ";
    9191    $command   .= " -dbname $dbname " if defined($dbname);
    92     ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    93         run(command => $command, verbose => 0);
     92
     93    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     94        run(command => $command, verbose => $verbose);
    9495    unless ($success) {
    9596        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    9697        &my_die("Unable to run warptool -pendingimfile ", $remote_id, $warp_id, $error_code, $fail_state);
    9798    }
     99
    98100    my $MDlist = $mdcParser->parse(join "", @$stdout_buf) or
    99101        &my_die("Unable to determine warp component information.", $remote_id, $warp_id, $PS_EXIT_PROG_ERROR, $fail_state);
     
    108110        my $skycell_id = $warpEntry->{skycell_id};
    109111        my $tess_id = $warpEntry->{tess_id};
    110         my $reduction = 'DEFAULT' unless defined $warpEntry->{reduction};
     112
     113        my $reduction = $warpEntry->{reduction};
     114        $reduction = 'DEFAULT' unless defined $warpEntry->{reduction};
     115
    111116        my $recipe_pswarp = $ipprc->reduction($reduction, 'WARP_PSWARP'); # Recipe to use
     117        if ($recipe_pswarp eq "") {
     118            &my_die("Unable to determine PSWARP recipe for $reduction", $remote_id, $warp_id, $PS_EXIT_SYS_ERROR, $fail_state);
     119        }
     120
    112121        my $ipp_outroot = "${workdir}/${exp_tag}/${exp_tag}.wrp.${warp_id}.${skycell_id}";
    113122        print "$ipp_outroot\n";
    114         my $remote_outroot = uri_local_to_remote($ipp_outroot);
     123        my $remote_outroot = &uri_local_to_remote($ipp_outroot);
    115124
    116125        my $command = "$warptool -scmap -warp_id $warp_id -skycell_id ${skycell_id}";
    117126        $command   .= " -dbname $dbname " if defined($dbname);
    118127
    119         ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    120             run(command => $command, verbose => 0);
     128        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     129            run(command => $command, verbose => $verbose);
    121130        unless ($success) {
    122131            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     
    133142        my $pre_cmd_astrom = "";
    134143
    135         foreach my $imfile (@{ $inData2 }) {
     144        foreach my $imfile (@{ $inData }) {
    136145            my $image = $ipprc->filename("PPIMAGE.CHIP", $imfile->{chip_path_base}, $imfile->{class_id});
    137146            my $mask  = $ipprc->filename("PSASTRO.OUTPUT.MASK", $imfile->{cam_path_base}, $imfile->{class_id});
     
    140149            my $astrom= $ipprc->filename("PSASTRO.OUTPUT", $imfile->{cam_path_base});
    141150
    142             my $remote_image = uri_local_to_remote($image);
    143             my $remote_mask  = uri_local_to_remote($mask);
    144             my $remote_var   = uri_local_to_remote($var);
    145             my $remote_astrom= uri_local_to_remote($astrom);
     151            my $remote_image = &uri_local_to_remote($image);
     152            my $remote_mask  = &uri_local_to_remote($mask);
     153            my $remote_var   = &uri_local_to_remote($var);
     154            my $remote_astrom= &uri_local_to_remote($astrom);
    146155
    147156            $pre_cmd_ims     .= " $remote_image ";
     
    187196        foreach my $component(@return_component_list) {
    188197            my $filename = $ipprc->filename($component,$ipp_outroot,$skycell_id);
    189             my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename);
     198            my ($ipp_disk, $remote_disk) = &uri_to_outputs_for_return( $filename);
    190199            my $remote_outroot_dir = dirname($ipp_disk);
    191200            print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
     
    248257sub uri_to_outputs { # (ipp_disk,remote_disk) = uri_to_output(neb_uri); Appends to TRANSFER and CHECK filehandles
    249258    my $neb_uri = shift;
    250     my ($ipp_disk, $remote_disk) = uri_convert( $neb_uri );
    251 
    252     unless (exists($file_filter{$neb_uri})) {
    253         $file_filter{$neb_uri} = 1;
    254         print TRANSFER "$ipp_disk\n";
    255         print CHECK    "$remote_disk\n";
    256     }
     259    my ($ipp_disk, $remote_disk) = &uri_convert( $neb_uri );
     260
     261    print TRANSFER "$ipp_disk\n";
     262    print CHECK    "$remote_disk\n";
    257263    return($ipp_disk,$remote_disk);
    258264}
     
    260266sub uri_to_outputs_for_return { # (ipp_disk,remote_disk) = uri_to_outputs_for_return(neb_uri); create ipp_disk, append to RETURN and GENERATE
    261267    my $neb_uri = shift;
    262     my ($ipp_disk, $remote_disk) = uri_convert_and_create( $neb_uri );
    263     unless (exists($file_filter{$neb_uri})) {
    264         $file_filter{$neb_uri} = 1;
    265         print RETURN "$ipp_disk\n";
    266         print GENERATE "$remote_disk\n";
    267     }
     268    my ($ipp_disk, $remote_disk) = &uri_convert_and_create( $neb_uri );
     269
     270    print RETURN "$ipp_disk\n";
     271    print GENERATE "$remote_disk\n";
    268272    return($ipp_disk,$remote_disk);
    269273}
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_remote_poll.pl

    r37298 r37322  
    3535# tools
    3636my $missing_tools;
    37 my $ssh        = can_run('ssh')        or (warn "Can't find ssh" and $missing_tools = 1);
    38 my $scp        = can_run('scp')        or (warn "Can't find scp" and $missing_tools = 1);
     37my $ssh        = can_run('ssh')        or (warn "Can't find ssh"        and $missing_tools = 1);
     38my $scp        = can_run('scp')        or (warn "Can't find scp"        and $missing_tools = 1);
    3939my $remotetool = can_run('remotetool') or (warn "Can't find remotetool" and $missing_tools = 1);
    40 my $chiptool   = can_run('chiptool')   or (warn "Can't find chiptool" and $missing_tools = 1);
     40my $chiptool   = can_run('chiptool')   or (warn "Can't find chiptool"   and $missing_tools = 1);
     41my $camtool    = can_run('camtool')    or (warn "Can't find camtool"    and $missing_tools = 1);
     42my $warptool   = can_run('warptool')   or (warn "Can't find warptool"   and $missing_tools = 1);
    4143
    4244if ($missing_tools) {
     
    167169
    168170    my ($stage_id, $class_id) = get_stage_id_from_dbinfo ($words[0]);
     171    print STDERR "stage_id : $stage_id, class_id: $class_id\n";
    169172
    170173    if ($words[1] eq "PASS") {
     
    184187
    185188# STEP 7: if dbinfo is PASS, execute it (fail ones that are not PASS?).
    186 foreach my $file (@dbinfo_files) {
    187     open(DBF,"$file") || warn "Missing file $file\n";
    188     my $cmd = <DBF>;
    189     close(DBF);
    190     chomp($cmd);
    191 
    192     $cmd =~ s/-/ -/g; # This is just a safety check for missing space.
    193 
    194     if ($cmd eq "") {
    195         print STDERR "problem: empty dbinfo file\n";
    196         exit (1);
    197         next;
    198     }
    199 
    200     print "dbinfo: $file\n";
    201 
    202     if ($retry) {
    203         # use the dbinfo filename to get stage id, check if we have already updated this entry:
    204         my ($stage_id, $class_id) = get_stage_id_from_dbinfo ($file);
    205 
    206         # we just need to check for the existence of an entry:
    207         if ($runData->{stage} eq "chip") {
    208             my $cmd1 = "$chiptool -simple -processedimfile -chip_id $stage_id -class_id $class_id";
    209             $cmd1   .= " -dbname $dbname " if defined($dbname);
    210 
    211             my ( $success1, $error_code1, $full_buf1, $stdout_buf1, $stderr_buf1 ) =
    212                 run(command => $cmd1, verbose => 0);
    213 
    214             unless ($success1) {
    215                 $error_code1 = (($error_code1 >> 8) or $PS_EXIT_PROG_ERROR);
    216                 &my_die("Unable to run chiptool to check on results", $remote_id, $error_code1);
    217             }
    218 
    219             my $Nrows = @$stdout_buf1;
    220             if ($Nrows > 0) {
    221                 print STDERR "already updated: $stage_id, $class_id\n";
    222                 next;
    223             }
    224         } else {
    225             print STDERR "do not know how to handle stage $runData->{stage}\n";
    226             exit (3);
    227         }
    228     }
    229 
    230     unless ($no_update) {
    231         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    232             run(command => $cmd, verbose => $verbose);
    233         unless ($success) {
    234             # This shouldn't fail, but we also can't suddenly abort if something does fail.
    235             # Now we're going to drop the component that owns this dbinfo, which should force a retry.
    236             $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    237             warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code");
    238             my ($stage_id, $class_id) = get_stage_id_from_dbinfo ($file);
    239             $stage_fail{$stage_id} = 1;
    240         }
    241     }
    242 }
    243 print STDERR "dbinfo files all run (or skipped)\n";
     189if (1) {
     190  foreach my $file (@dbinfo_files) {
     191      open(DBF,"$file") || warn "Missing file $file\n";
     192      my $cmd = <DBF>;
     193      close(DBF);
     194      chomp($cmd);
     195
     196      $cmd =~ s/-/ -/g; # This is just a safety check for missing space.
     197
     198      if ($cmd eq "") {
     199          print STDERR "problem: empty dbinfo file\n";
     200          exit (1);
     201          next;
     202      }
     203
     204      print "dbinfo: $file\n";
     205
     206      if ($retry) {
     207          # use the dbinfo filename to get stage id, check if we have already updated this entry:
     208          my ($stage_id, $class_id) = get_stage_id_from_dbinfo ($file);
     209
     210          # we just need to check for the existence of an entry:
     211          if ($runData->{stage} eq "chip") {
     212              my $cmd1 = "$chiptool -simple -processedimfile -chip_id $stage_id -class_id $class_id";
     213              $cmd1   .= " -dbname $dbname " if defined($dbname);
     214
     215              my ( $success1, $error_code1, $full_buf1, $stdout_buf1, $stderr_buf1 ) =
     216                  run(command => $cmd1, verbose => 0);
     217
     218              unless ($success1) {
     219                  $error_code1 = (($error_code1 >> 8) or $PS_EXIT_PROG_ERROR);
     220                  &my_die("Unable to run chiptool to check on results", $remote_id, $error_code1);
     221              }
     222
     223              my $Nrows = @$stdout_buf1;
     224              if ($Nrows > 0) {
     225                  print STDERR "already updated: $stage_id, $class_id\n";
     226                  next;
     227              }
     228          } elsif ($runData->{stage} eq "camera") {
     229              my $cmd1 = "$camtool -simple -processedexp -cam_id $stage_id";
     230              $cmd1   .= " -dbname $dbname " if defined($dbname);
     231
     232              my ( $success1, $error_code1, $full_buf1, $stdout_buf1, $stderr_buf1 ) =
     233                  run(command => $cmd1, verbose => 0);
     234
     235              unless ($success1) {
     236                  $error_code1 = (($error_code1 >> 8) or $PS_EXIT_PROG_ERROR);
     237                  &my_die("Unable to run chiptool to check on results", $remote_id, $error_code1);
     238              }
     239
     240              my $Nrows = @$stdout_buf1;
     241              if ($Nrows > 0) {
     242                  print STDERR "already updated: cam_id: $stage_id\n";
     243                  next;
     244              }
     245          } elsif ($runData->{stage} eq "warp") {
     246              my $cmd1 = "$warptool -simple -warped -warp_id $stage_id -skycell_id $class_id";
     247              $cmd1   .= " -dbname $dbname " if defined($dbname);
     248
     249              my ( $success1, $error_code1, $full_buf1, $stdout_buf1, $stderr_buf1 ) =
     250                  run(command => $cmd1, verbose => 0);
     251
     252              unless ($success1) {
     253                  $error_code1 = (($error_code1 >> 8) or $PS_EXIT_PROG_ERROR);
     254                  &my_die("Unable to run chiptool to check on results", $remote_id, $error_code1);
     255              }
     256
     257              my $Nrows = @$stdout_buf1;
     258              if ($Nrows > 0) {
     259                  print STDERR "already updated: warp_id: $stage_id, $class_id\n";
     260                  next;
     261              }
     262          } else {
     263              print STDERR "do not know how to handle stage $runData->{stage}\n";
     264              exit (3);
     265          }
     266      }
     267
     268      unless ($no_update) {
     269          my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     270              run(command => $cmd, verbose => $verbose);
     271          unless ($success) {
     272              # This shouldn't fail, but we also can't suddenly abort if something does fail.
     273              # Now we're going to drop the component that owns this dbinfo, which should force a retry.
     274              $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     275              warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code");
     276              my ($stage_id, $class_id) = get_stage_id_from_dbinfo ($file);
     277              $stage_fail{$stage_id} = 1;
     278          }
     279      }
     280  }
     281  print STDERR "dbinfo files all run (or skipped)\n";
     282}
    244283
    245284# STEP 8: unify the stage states and update the remoteComponent entries
     
    412451    }
    413452    elsif ($stage eq 'camera') {
    414         $stage_id =~ s/^.*cm\.//;
     453        ($stage_id) = $file =~ /cm\.(\d*).dbinfo/;
    415454        $class_id = 0;
    416455    }
    417456    elsif ($stage eq 'warp') {
    418         $stage_id =~ s/^.*wrp\.//;
    419         $class_id = 0;
     457        ($stage_id, $class_id) = $file =~ /wrp\.(\d*)\.(skycell.\d\d\d\d.\d\d\d).dbinfo/;
    420458    }
    421459    elsif ($stage eq 'stack') {
Note: See TracChangeset for help on using the changeset viewer.