IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39965 for trunk


Ignore:
Timestamp:
Jan 31, 2017, 5:40:06 PM (9 years ago)
Author:
watersc1
Message:

Change to permcheck.pl to add burntool stage. Switch md5sum calculation for size calculation for small files. This is faster, and will rebalance the shuffle code in favor of data transfer over md5sums.

File:
1 edited

Legend:

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

    r39956 r39965  
    1919
    2020my $missing_tools = 0;
    21 #my $regtool  = can_run('regtool') or (warn "Can't find regtool" and $missing_tools = 1);
     21my $regtool  = can_run('regtool') or (warn "Can't find regtool" and $missing_tools = 1);
    2222my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1);
    2323my $camtool = can_run('camtool') or (warn "Can't find camtool" and $missing_tools = 1);
     
    249249        &my_die("Unable to parse metadata from stagetool", $stage_id);
    250250}
     251elsif ($stage eq 'burntool') {
     252    my $cmd = "$regtool -processedimfile -exp_id $stage_id -dbname $dbname";
     253    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     254        run(command => $cmd, verbose => 0);
     255    unless ($success) {
     256        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     257        &my_die("Unable to perform stagetool: $error_code", $stage_id);
     258    }
     259    $imfiles = $mdcParser->parse_list(join "", @$stdout_buf) or
     260        &my_die("Unable to parse metadata from stagetool", $stage_id);
     261}
    251262
    252263my $timer_start = time();
     
    258269                  'skycal' => ['PSASTRO.OUTPUT.CMF','PSPHOT.OUTPUT.CFF'],
    259270                  'ff'     => ['PSPHOT.OUT.CMF.MEF','PSPHOT.OUTPUT.CFF','PSPHOT.FULLFORCE.OUTPUT'],
    260                   'diff'   => ['PPSUB.OUTPUT.SOURCES','PPSUB.INVERSE.SOURCES','PSPHOT.PSF.SKY.SAVE','PSPHOT.BACKMDL.MEF','PPSUB.OUTPUT.KERNELS']
     271                  'diff'   => ['PPSUB.OUTPUT.SOURCES','PPSUB.INVERSE.SOURCES','PSPHOT.PSF.SKY.SAVE','PSPHOT.BACKMDL.MEF','PPSUB.OUTPUT.KERNELS'],
     272                  'burntool' => ['BURN.TABLE.DOESNT.HAVE.A.PRODUCT']
    261273    );
    262274
     
    329341                $is_done = 1;
    330342            }
    331 
    332343        }           
     344        elsif ($stage eq 'burntool') {
     345            if ($product eq 'BURN.TABLE.DOESNT.HAVE.A.PRODUCT') {
     346                my $bt_file = $imfiles->{uri};
     347                $bt_file    =~ s/fits$/burn.tbl/;
     348                push @keys, $bt_file;
     349            }
     350            $is_done = 1;
     351        }
     352
    333353        if ($is_done == 0) {
    334354            push @keys, $ipprc->filename($product,$path_base);
     
    552572    $host =~ s/\.\d//;
    553573#    print "$filename $host $volume\n";
    554     my $response = `ssh $host remote_md5sum.pl $filename`;
    555     chomp($response);
     574    my $response;
     575    my @file_stat = stat($filename);
     576    if ($file_stat[7] > 1e7) {
     577        $response = `ssh $host remote_md5sum.pl $filename`;
     578        chomp($response);
     579    }
     580    else {
     581        $response = $file_stat[7];
     582    }
    556583    my ($sum, undef) = split /\s+/, $response;
    557584    unless(defined($sum)) {
Note: See TracChangeset for help on using the changeset viewer.