IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42447


Ignore:
Timestamp:
Apr 11, 2023, 11:00:58 AM (3 years ago)
Author:
eugene
Message:

fix little issues

Location:
trunk/tools/eam/rawfix.20230221/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl

    r42444 r42447  
    5959
    6060    # if these do not match, complain and move on
     61    # we are allowed to have more MD5s than instances: some instances
     62    # may have been culled during this process (but the MD5s stay behind)
    6163    my $N1 = @md5data;
    6264    my $N2 = @instdata;
    63     if ($N1 != $N2) {
    64         print STDOUT "inconsistent number of lines in $md5match : $N1 vs $N2\n";
     65    if ($N1 < $N2) {
     66        print STDOUT "not enough MD5s $md5match : $N1 vs $N2\n";
    6567        $Nfail ++;
    6668        next;
    6769    }
    6870
     71    # set up an empty hash for the instance names:
     72    my %instfound = ();
     73    foreach my $line (@instdata) {
     74        chomp $line;
     75        my @words = split (/\s+/,$line);
     76        my $inst   = $words[0];
     77        $instfound{$inst} = 0;
     78    }
     79
    6980    # check for mismatched MD5sums
     81    # we are not checking that all instances in the inst file are in the MD5 file
    7082    foreach my $line (@md5data) {
    7183
     
    8092        my $md5tru = $words[2];
    8193        my $md5obs = $words[3];
     94
     95        unless (defined $instfound{$inst}) { print "skip md5 for removed instance $inst\n"; next; }
     96        $instfound{$inst} = 1;
    8297
    8398        if ($md5tru ne $md5obs) {
     
    88103            if ($DEBUG > 2) { print STDOUT "$inst $state $md5tru = $md5obs\n"; }
    89104        }
     105    }
     106
     107    my @instfoundKEYS = keys %instfound;
     108    foreach my $inst (@instfoundKEYS) {
     109        unless ($instfound{$inst}) { die "missing MD5 for instance $inst\n"; }
    90110    }
    91111}
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl

    r42446 r42447  
    195195                my $NcullTotal = @$cull_list_r;
    196196                foreach my $instance (@$cull_list_r) {
     197                    print "state $state : checking instance $instance ... ";
    197198                    my ($volname) = $instance =~ m|file:///data/([0-9a-zA-Z]*\.[0-9])/\S*|;
     199                    print "volname $volname\n";
    198200                    unless (defined $vol_good{$volname}) { die "ERROR: invalid volume name $volname\n"; }
    199201                    # print STDERR "neb-cull $state: $ext_id $volname ($main_keep $back_keep)\n";
     
    321323        if (($xattr == 1) && ($back_keep eq "")) { $back_keep = $instance; next; }
    322324
     325        if ($xattr > 1) { print "ignore lost instance $instance\n"; next; }
     326
    323327        # if we make it here, we already have an instance at this location
    324328        push (@cull_list, $instance);
  • trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt

    r42445 r42447  
    5858  periods      -exec $REXEC
    5959  periods      -timeout 60
    60   host          anyhost
     60  host         -required $HOST_CKCHIP
    6161  npending 1
    6262
     
    8989    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
    9090
     91    # this command accesses the Nebulous and GPC databases, so it must run at ITC.
    9192    command $mypath/check_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage $ITER
    9293  end
  • trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt

    r42445 r42447  
    5757  periods      -exec $REXEC
    5858  periods      -timeout 1800
    59   host          anyhost
     59  host         -required $HOST_FIXCHIP
    6060  npending 1
    6161
  • trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt

    r42445 r42447  
    5353
    5454task nights.md5chk.run
    55   host anyhost
    5655  periods      -poll $RPOLL
    5756  periods      -exec $REXEC
    5857  periods      -timeout 60
     58  host          anyhost
    5959  npending 1
    6060
     
    8585    stderr $mypath/$DATEOBS/log.md5chk.v$ITER
    8686
     87    ## this command does NOT use Nebulous or GPC so it can run anywhere
    8788    command $mypath/check_md5s_dateobs.pl --topdir $mypath --dateobs $FULLDATE --stage $ITER
    8889  end
  • trunk/tools/eam/rawfix.20230221/src/rawfix.pt

    r42446 r42447  
    1515$mypath = /data/ippb07.0/home/eugene/rawfix.20230221
    1616
     17# I need to avoid ATRC machines for jobs which try to access Nebulous or GPC
     18# I cannot define an avoidance list for a job, so I need to specify the
     19# required host
     20
     21$HOST_CKCHIP  = ipp060
     22$HOST_FIXCHIP = ipp070
     23
    1724if (not($?LOGDIR))
    1825  $LOGDIR = $mypath/pantasks_logs
     
    2835input rawfix.md5sum.pt
    2936input rawfix.md5chk.pt
     37
     38if (not($?INIT_RAWFIX))
     39  control host add $HOST_CKCHIP
     40  control host add $HOST_FIXCHIP
     41  $INIT_RAWFIX = 1
     42end
    3043
    3144######################### UTILITIES #################################
Note: See TracChangeset for help on using the changeset viewer.