IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42445


Ignore:
Timestamp:
Apr 7, 2023, 4:50:38 PM (3 years ago)
Author:
eugene
Message:

rework to use a stage/iteration tracked by the rawfix database

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

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh

    r42430 r42445  
    4949
    5050  set mynight = $2
    51   mysql $DBOPTS -e "select dateobs, state from nights where (dateobs = '$mynight')"
     51  mysql $DBOPTS -e "select * from nights where (dateobs = '$mynight')"
    5252  exit 0
    5353endif
     
    7474  if ($mystate == "md5chk.fail")   goto good_state
    7575
    76   # stage 2:
    77   if ($mystate == "fixchip_s2.new")   goto good_state
    78   if ($mystate == "fixchip_s2.done")  goto good_state
    79   if ($mystate == "fixchip_s2.fail")  goto good_state
    80   if ($mystate == "md5sum_s2.new")    goto good_state
    81   if ($mystate == "md5sum_s2.done")   goto good_state
    82   if ($mystate == "md5sum_s2.fail")   goto good_state
    83   if ($mystate == "md5chk_s2.new")    goto good_state
    84   if ($mystate == "md5chk_s2.done")   goto good_state
    85   if ($mystate == "md5chk_s2.fail")   goto good_state
    86 
    87   # stage 3:
    88   if ($mystate == "fixchip_s3.new")   goto good_state
    89   if ($mystate == "fixchip_s3.done")  goto good_state
    90   if ($mystate == "fixchip_s3.fail")  goto good_state
    91   if ($mystate == "ckchip_s3.new")    goto good_state
    92   if ($mystate == "ckchip_s3.done")   goto good_state
    93   if ($mystate == "ckchip_s3.fail")   goto good_state
    94 
    95 # disable the rsyncs stages: run in directory from b-node
    96 #  if ($mystate == "rsync_s1.new")  goto good_state
    97 #  if ($mystate == "rsync_s1.done") goto good_state
    98 #  if ($mystate == "rsync_s1.fail") goto good_state
    99 #  if ($mystate == "rsync_s2.new")  goto good_state
    100 #  if ($mystate == "rsync_s2.done") goto good_state
    101 #  if ($mystate == "rsync_s2.fail") goto good_state
    102 
    10376  echo "ERROR: unknown mode $mystate"
    10477  exit 2
     
    10679  good_state:
    10780  set t = `date +%T..%N`
    108   mysql $DBOPTS -e "select dateobs, curtime() as timestamp from nights where (state = '$mystate')" | awk -v T=$t '(NR == 1){print $0}(NR > 1){print $1, T}'
     81  mysql $DBOPTS -e "select dateobs, iter from nights where (state = '$mystate')" | awk -v T=$t '(NR == 1){print $0, "timestamp"}(NR > 1){print $1, $2, T}'
    10982  exit 0
    11083endif
  • trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl

    r42444 r42445  
    1717
    1818my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
    19 my ($neb_dbh, $gpc_dbh) = &parse_db_config ("$topdir/nebulous.config");
     19my ($neb_dbh, $gpc_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
    2020
    2121# read the list of chip_ids:
     
    3232# instance lists by host: YYYYMMDD/HOSTNAME.inst.STAGE.txt
    3333# chip states by chip: YYYYMMDD/CHIPNAME.uris.STAGE.txt
     34
     35my $Nchip = 0;
     36
     37my $Ngood = 0;
     38my $Ndead = 0;
     39my $Ngone = 0;
     40my $Nsing = 0;
     41my $Ndups = 0;
     42my $Nsbck = 0;
     43my $Nxbck = 0;
     44
     45my $Ncul1 = 0;
     46my $Ncul2 = 0;
     47my $Ncul3 = 0;
    3448
    3549foreach my $chip_id (@chip_ids) {
     
    90104}
    91105
    92 # run neb-replicate for SING entries?
    93 # run neb-replicate for SBCK entries?  (does this put a second copy at ATRC or ITC?)
    94 # save the list of instances on each host
    95 ## run md5sum on the instances for each host
    96 ## only note inconsistent md5sums?  (need to save the gpc1 md5sum values)
    97 # rerun to generate a list of the host with max instances per chip?
    98 
    99 ### when to cull entries?
    100 ## neb-replicate puts the new entry at ATRC by default
    101 ## neb-replicate --volume VOL puts the new entry at the specified location
    102 ### in order to use this, I need to choose the target volume
     106print "Nchip: $Nchip\n";
     107print "Ngood: $Ngood\n";
     108print "Ngone: $Ngone\n";
     109print "Ndead: $Ndead\n";
     110print "Nsing: $Nsing\n";
     111print "Ndups: $Ndups\n";
     112print "Nsbck: $Nsbck\n";
     113print "Nxbck: $Nxbck\n";
     114print "Ncul1: $Ncul1\n";
     115print "Ncul2: $Ncul2\n";
     116print "Ncul3: $Ncul3\n";
     117
     118my $Ntotal = $Ngood + $Ngone + $Ndead + $Nsing + $Ndups + $Nsbck + $Nxbck + $Ncul1 + $Ncul2 + $Ncul3;
     119if ($Ntotal != $Nchip) { die "ERROR: inconsistent count of chips\n"; }
     120
     121# update the stats in the database
     122my $sql_update_stats = "UPDATE nights set";
     123$sql_update_stats .= "  Nchip = $Nchip";
     124$sql_update_stats .= ", Ngood = $Ngood";
     125$sql_update_stats .= ", Ndead = $Ndead";
     126$sql_update_stats .= ", Ngone = $Ngone";
     127$sql_update_stats .= ", Nsing = $Nsing";
     128$sql_update_stats .= ", Ndups = $Ndups";
     129$sql_update_stats .= ", Nsbck = $Nsbck";
     130$sql_update_stats .= ", Nxbck = $Nxbck";
     131$sql_update_stats .= ", Ncul1 = $Ncul1";
     132$sql_update_stats .= ", Ncul2 = $Ncul2";
     133$sql_update_stats .= ", Ncul3 = $Ncul3";
     134$sql_update_stats .= " WHERE dateobs = $dateword";
     135
     136my $query = $raw_dbh->prepare($sql_update_stats);
     137$query->execute () or die "invalid response from RAW database\n";
    103138
    104139exit 0;
     
    256291
    257292    my $outinfo = "$extID $data_st $md5_sum";
     293    $Nchip ++;
    258294
    259295    # GOOD : already fixed
    260296    if (($Nmain == 1) && ($Nback == 1)) {
    261297        print $outfh "GOOD: $outinfo\n";
     298        $Ngood ++;
    262299        return;
    263300    }
     
    267304    if (($Nmain == 1) && ($Nback == 0)) {
    268305        print $outfh "SING: $outinfo\n";
     306        $Nsing ++;
    269307        return;
    270308    }
     
    274312    if (($Nmain == 0) && ($Nback == 1)) {
    275313        print $outfh "SBCK: $outinfo\n";
     314        $Nsbck ++;
    276315        return;
    277316    }
     
    281320    if (($Nmain > 1) && ($Nback == 0)) {
    282321        print $outfh "DUPS: $outinfo\n";
     322        $Ndups ++;
    283323        return;
    284324    }
     
    288328    if (($Nmain == 0) &&  ($Nback > 1)) {
    289329        print $outfh "XBCK: $outinfo\n";
     330        $Nxbck ++;
    290331        return;
    291332    }
     
    294335    if (($Nmain == 0) && ($Nback == 0) && $Ndead) {
    295336        print $outfh "DEAD: $outinfo\n";
     337        $Ndead ++;
    296338        return;
    297339    }
     
    299341    if (($Nmain == 0) && ($Nback == 0) && ($Ndead == 0)) {
    300342        print $outfh "GONE: $outinfo\n";
     343        $Ngone ++;
    301344        return;
    302345    }
     
    306349    if (($Nmain > 1) && ($Nback == 1)) {
    307350        print $outfh "CUL1: $outinfo\n";
     351        $Ncul1 ++;
    308352        return;
    309353    }
     
    313357    if (($Nback > 1) && ($Nmain == 1)) {
    314358        print $outfh "CUL2: $outinfo\n";
     359        $Ncul2 ++;
    315360        return;
    316361    }
     
    320365    if (($Nback > 1) && ($Nmain > 1)) {
    321366        print $outfh "CUL3: $outinfo\n";
     367        $Ncul3 ++;
    322368        return;
    323369    }
     
    335381    pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs;
    336382    pod2usage( -msg => "Provide a list of chips with --chiplist", -exitval => 2) unless defined $chiplist;
    337     pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     383    pod2usage( -msg => "Define the stage (0, 1, etc) with --stage", -exitval => 2) unless defined $stage;
    338384    pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir;
    339385   
     
    363409    my ( $nebdb_name, $nebdb_host, $nebdb_port, $nebdb_pass, $nebdb_user );
    364410    my ( $gpcdb_name, $gpcdb_host, $gpcdb_port, $gpcdb_pass, $gpcdb_user );
     411    my ( $rawdb_name, $rawdb_host, $rawdb_port, $rawdb_pass, $rawdb_user );
    365412
    366413    if (-e $conffile) {
     
    380427            if ($_ =~ /GPC1_PASS /) { $gpcdb_pass = (split /\s+/,$_)[2]; }
    381428            if ($_ =~ /GPC1_PORT /) { $gpcdb_port = (split /\s+/,$_)[2]; }
     429
     430            if ($_ =~ /RAW_NAME /)  { $rawdb_name = (split /\s+/,$_)[2]; }
     431            if ($_ =~ /RAW_HOST /)  { $rawdb_host = (split /\s+/,$_)[2]; }
     432            if ($_ =~ /RAW_USER /)  { $rawdb_user = (split /\s+/,$_)[2]; }
     433            if ($_ =~ /RAW_PASS /)  { $rawdb_pass = (split /\s+/,$_)[2]; }
     434            if ($_ =~ /RAW_PORT /)  { $rawdb_port = (split /\s+/,$_)[2]; }
    382435        }
    383436        close(IN);
    384437        print STDERR  "nebulous config: $nebdb_name $nebdb_host $nebdb_port $nebdb_user $nebdb_pass\n";
    385438        print STDERR  "gpc1 dbh config: $gpcdb_name $gpcdb_host $gpcdb_port $gpcdb_user $gpcdb_pass\n";
     439        print STDERR  "raw  dbh config: $rawdb_name $rawdb_host $rawdb_port $rawdb_user $rawdb_pass\n";
    386440    }
    387441
     
    398452    pod2usage( -msg => "Cannot configure gpc1 database (dbpass)", -exitval => 2) unless defined $gpcdb_pass;
    399453
     454    pod2usage( -msg => "Cannot configure raw database (dbname)", -exitval => 2) unless defined $rawdb_name;
     455    pod2usage( -msg => "Cannot configure raw database (dbhost)", -exitval => 2) unless defined $rawdb_host;
     456    pod2usage( -msg => "Cannot configure raw database (dbuser)", -exitval => 2) unless defined $rawdb_user;
     457    pod2usage( -msg => "Cannot configure raw database (dbport)", -exitval => 2) unless defined $rawdb_port;
     458    pod2usage( -msg => "Cannot configure raw database (dbpass)", -exitval => 2) unless defined $rawdb_pass;
     459
    400460    my $nebdb_dsn = "DBI:mysql:database=$nebdb_name:host=$nebdb_host";
    401461    if ($nebdb_port ne "NONE") { $nebdb_dsn .= ":port=$nebdb_port"; }
     
    406466    my $gpc_dbh = DBI->connect($gpcdb_dsn, $gpcdb_user, $gpcdb_pass, { RaiseError => 1, AutoCommit => 1} ) or die "Unable to connect to database $DBI::errstr\n";
    407467
    408     return ($neb_dbh, $gpc_dbh);
     468    my $rawdb_dsn = "DBI:mysql:database=$rawdb_name:host=$rawdb_host";
     469    if ($rawdb_port ne "NONE") { $rawdb_dsn .= ":port=$rawdb_port"; }
     470    my $raw_dbh = DBI->connect($rawdb_dsn, $rawdb_user, $rawdb_pass, { RaiseError => 1, AutoCommit => 1} ) or die "Unable to connect to database $DBI::errstr\n";
     471
     472    return ($neb_dbh, $gpc_dbh, $raw_dbh);
    409473}
    410474
  • trunk/tools/eam/rawfix.20230221/src/check_night_status.pl

    r42444 r42445  
    3737
    3838    my $urifile = "$dateword/$chip_id.uris.$stage.txt";
     39    unless (-e $urifile) { die "missing chip URI list $urifile\n"; }
     40
    3941    open (FILE, "$urifile");
    4042    my @lines = <FILE>;
  • trunk/tools/eam/rawfix.20230221/src/create.rawfix.sh

    r42440 r42445  
    44set DBNAME = "rawfix"
    55set DBUSER = "dvo"
     6
     7# add in the iteration and the state summary
     8
     9mysql -h localhost -u root <<EOF
     10  use $DBNAME;
     11  ALTER TABLE nights ADD COLUMN iter SMALLINT, ADD COLUMN Ngood SMALLINT, ADD COLUMN Ndead SMALLINT, ADD COLUMN Ngone SMALLINT;
     12  ALTER TABLE nights ADD COLUMN Nsing SMALLINT, ADD COLUMN Ndups SMALLINT, ADD COLUMN Nsbck SMALLINT, ADD COLUMN Nxbck SMALLINT;
     13  ALTER TABLE nights ADD COLUMN Ncul1 SMALLINT, ADD COLUMN Ncul2 SMALLINT, ADD COLUMN Ncul3 SMALLINT;
     14EOF
     15
     16exit 0
    617
    718mysql -h localhost -u root <<EOF
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl

    r42442 r42445  
    11#! /usr/bin/env perl
     2
     3XXX: not yet ready
    24
    35# NOTE: in this script, we are using database connections to both NEBULOUS and GPC1 databases
     
    1315use Getopt::Long qw( GetOptions :config auto_help auto_version );
    1416
    15 # USAGE: fix_chip_failures.pl --dateobs (night) --chiplist (file) --stage (v0,v1,etc)
    16 # USAGE: fix_chip_failures.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage v0
     17# USAGE: fix_chip_failures.pl --dateobs (night) --chiplist (file) --stage (0,1,etc)
     18# USAGE: fix_chip_failures.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage 0
    1719
    1820my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
     
    5355    pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs;
    5456    pod2usage( -msg => "Provide a list of chips with --chiplist", -exitval => 2) unless defined $chiplist;
    55     pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     57    pod2usage( -msg => "Define the stage (0, 1, etc) with --stage", -exitval => 2) unless defined $stage;
    5658    pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir;
    5759   
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl

    r42444 r42445  
    1919
    2020my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
    21 my ($neb_dbh) = &parse_db_config ("$topdir/nebulous.config");
     21my ($neb_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
    2222
    2323# read the list of chip_ids:
     
    6868}
    6969
     70my $Nchip = 0;
     71
    7072foreach my $chip_id (@chip_ids) {
    7173
     
    9698        if ($failchips{$ext_id}) { $haveMD5 = 1; }
    9799
     100        $Nchip ++;
    98101
    99102        # nothing to be done, or need be done for these:
     
    143146                close (OUTFILE);
    144147            }
    145             $Ndups++;
     148            if ($goodMD5) { $Ndups++; } else { $Nfail ++; }
    146149            next;
    147150        }
     
    160163                close (OUTFILE);
    161164            }
    162             $Nxbck++;
     165            if ($goodMD5) { $Nxbck++; } else { $Nfail ++; }
    163166            next;
    164167        }
     
    191194
    192195            # these are done in stage 3:
    193             if ($state eq "CUL1:") { $Ncul1++; next; }
    194             if ($state eq "CUL2:") { $Ncul2++; next; }
    195             if ($state eq "CUL3:") { $Ncul3++; next; }
     196            if ($goodMD5) {
     197                if ($state eq "CUL1:") { $Ncul1++; next; }
     198                if ($state eq "CUL2:") { $Ncul2++; next; }
     199                if ($state eq "CUL3:") { $Ncul3++; next; }
     200            } else { $Nfail ++; }
    196201        }
    197202    }
     
    199204}
    200205
     206print "Nchip: $Nchip\n";
    201207print "Ngood: $Ngood\n";
    202208print "Ngone: $Ngone\n";
     
    209215print "Ncul2: $Ncul2\n";
    210216print "Ncul3: $Ncul3\n";
     217print "Nfail: $Nfail\n";
     218
     219my $Ntotal = $Ngood + $Ngone + $Ndead + $Nsing + $Ndups + $Nsbck + $Nxbck + $Ncul1 + $Ncul2 + $Ncul3 + $Nfail;
     220if ($Ntotal != $Nchip) { die "ERROR: inconsistent count of chips\n"; }
     221
     222# update the stats in the database
     223my $sql_update_stats = "UPDATE nights set";
     224$sql_update_stats .= "  Nchip = $Nchip";
     225$sql_update_stats .= ", Ngood = $Ngood";
     226$sql_update_stats .= ", Ndead = $Ndead";
     227$sql_update_stats .= ", Ngone = $Ngone";
     228$sql_update_stats .= ", Nsing = $Nsing";
     229$sql_update_stats .= ", Ndups = $Ndups";
     230$sql_update_stats .= ", Nsbck = $Nsbck";
     231$sql_update_stats .= ", Nxbck = $Nxbck";
     232$sql_update_stats .= ", Ncul1 = $Ncul1";
     233$sql_update_stats .= ", Ncul2 = $Ncul2";
     234$sql_update_stats .= ", Ncul3 = $Ncul3";
     235$sql_update_stats .= ", Nfail = $Nfail";
     236$sql_update_stats .= " WHERE dateobs = $dateword";
     237
     238my $query = $raw_dbh->prepare($sql_update_stats);
     239$query->execute () or die "invalid response from RAW database\n";
    211240
    212241exit 0;
     
    398427
    399428    my ( $nebdb_name, $nebdb_host, $nebdb_port, $nebdb_pass, $nebdb_user );
     429    my ( $rawdb_name, $rawdb_host, $rawdb_port, $rawdb_pass, $rawdb_user );
    400430
    401431    if (-e $conffile) {
     
    409439            if ($_ =~ /NEB_PASS /)  { $nebdb_pass = (split /\s+/,$_)[2]; }
    410440            if ($_ =~ /NEB_PORT /)  { $nebdb_port = (split /\s+/,$_)[2]; }
     441
     442            if ($_ =~ /RAW_NAME /)  { $rawdb_name = (split /\s+/,$_)[2]; }
     443            if ($_ =~ /RAW_HOST /)  { $rawdb_host = (split /\s+/,$_)[2]; }
     444            if ($_ =~ /RAW_USER /)  { $rawdb_user = (split /\s+/,$_)[2]; }
     445            if ($_ =~ /RAW_PASS /)  { $rawdb_pass = (split /\s+/,$_)[2]; }
     446            if ($_ =~ /RAW_PORT /)  { $rawdb_port = (split /\s+/,$_)[2]; }
    411447        }
    412448        close(IN);
    413449        print STDERR  "nebulous config: $nebdb_name $nebdb_host $nebdb_port $nebdb_user $nebdb_pass\n";
     450        print STDERR  "raw  dbh config: $rawdb_name $rawdb_host $rawdb_port $rawdb_user $rawdb_pass\n";
    414451    }
    415452
     
    420457    pod2usage( -msg => "Cannot configure nebulous database (dbpass)", -exitval => 2) unless defined $nebdb_pass;
    421458
     459    pod2usage( -msg => "Cannot configure raw database (dbname)", -exitval => 2) unless defined $rawdb_name;
     460    pod2usage( -msg => "Cannot configure raw database (dbhost)", -exitval => 2) unless defined $rawdb_host;
     461    pod2usage( -msg => "Cannot configure raw database (dbuser)", -exitval => 2) unless defined $rawdb_user;
     462    pod2usage( -msg => "Cannot configure raw database (dbport)", -exitval => 2) unless defined $rawdb_port;
     463    pod2usage( -msg => "Cannot configure raw database (dbpass)", -exitval => 2) unless defined $rawdb_pass;
     464
    422465    my $nebdb_dsn = "DBI:mysql:database=$nebdb_name:host=$nebdb_host";
    423466    if ($nebdb_port ne "NONE") { $nebdb_dsn .= ":port=$nebdb_port"; }
    424467    my $neb_dbh = DBI->connect($nebdb_dsn, $nebdb_user, $nebdb_pass, { RaiseError => 1, AutoCommit => 1} ) or die "Unable to connect to database $DBI::errstr\n";
    425468
    426     return ($neb_dbh);
     469    my $rawdb_dsn = "DBI:mysql:database=$rawdb_name:host=$rawdb_host";
     470    if ($rawdb_port ne "NONE") { $rawdb_dsn .= ":port=$rawdb_port"; }
     471    my $raw_dbh = DBI->connect($rawdb_dsn, $rawdb_user, $rawdb_pass, { RaiseError => 1, AutoCommit => 1} ) or die "Unable to connect to database $DBI::errstr\n";
     472
     473    return ($neb_dbh, $raw_dbh);
    427474}
    428475
  • trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh

    r42441 r42445  
    2121
    2222# report both the dateobs and the hostnames
    23 ls $topdir/$dateobs/*.inst.$stage.txt | awk -v dateobs=$dateobs -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $NF}' | sed s/.inst.$stage.txt//
     23ls $topdir/$dateobs/*.inst.$stage.txt | awk -v dateobs=$dateobs -v stage=$stage -F/ '(NR == 1){print "dateobs stage md5host"}{print dateobs, stage, $NF}' | sed s/.inst.$stage.txt//
    2424exit 0
  • trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt

    r42441 r42445  
    7575    book setword ckchip.book $pageName pantaskState RUN
    7676    book getword ckchip.book $pageName dateobs -var DATEOBS
     77    book getword ckchip.book $pageName iter    -var ITER
    7778    option $pageName
    7879
    7980    # this is the first place in the proces that this location is known
    8081    mkdir  $mypath/$DATEOBS
    81     stdout $mypath/$DATEOBS/log.ckchip.runhosts.v
    82     stderr $mypath/$DATEOBS/log.ckchip.runhosts.v0 
     82    stdout $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER
     83    stderr $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER 
    8384
    8485    substr $DATEOBS 0 4 YEAR
     
    8889    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
    8990
    90     command $mypath/check_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v0
     91    command $mypath/check_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage $ITER
    9192  end
    9293
     
    120121# option for writing stdout / stderr to a file
    121122# queuepush stdout "------- end of stdout ---------"
    122 # queuesave stdout $options:0/log.ckchip.v0
     123# queuesave stdout $options:0/log.ckchip.v$ITER
    123124# queuepush stderr "------- end of stderr ---------"
    124 # queuesave stderr $options:0/log.ckchip.v0
     125# queuesave stderr $options:0/log.ckchip.v$ITER
  • trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt

    r42441 r42445  
    7474    book setword fixchip.book $pageName pantaskState RUN
    7575    book getword fixchip.book $pageName dateobs -var DATEOBS
     76    book getword fixchip.book $pageName iter    -var ITER
    7677    option $pageName
    7778
    78     stdout $pageName/log.fixchip.v
    79     stderr $pageName/log.fixchip.v0
     79    stdout $pageName/log.fixchip.v$ITER
     80    stderr $pageName/log.fixchip.v$ITER
    8081
    8182    substr $DATEOBS 0 4 YEAR
     
    8485    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
    8586
    86     command $mypath/fix_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v0
     87    command $mypath/fix_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage $ITER
    8788  end
    8889
  • trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt

    r42441 r42445  
    7373    book setword md5chk.book $pageName pantaskState RUN
    7474    book getword md5chk.book $pageName dateobs -var DATEOBS
     75    book getword md5chk.book $pageName iter    -var ITER
    7576    option $pageName
    7677
     
    8182
    8283    # does the output go here?
    83     stdout $mypath/$DATEOBS/log.md5chk.v
    84     stderr $mypath/$DATEOBS/log.md5chk.v
     84    stdout $mypath/$DATEOBS/log.md5chk.v$ITER
     85    stderr $mypath/$DATEOBS/log.md5chk.v$ITER
    8586
    86     command $mypath/check_md5s_dateobs.pl --topdir $mypath --dateobs $FULLDATE --stage v0
     87    command $mypath/check_md5s_dateobs.pl --topdir $mypath --dateobs $FULLDATE --stage $ITER
    8788  end
    8889
  • trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt

    r42441 r42445  
    8080    book setword md5sum.book $pageName pantaskState RUN
    8181    book getword md5sum.book $pageName dateobs -var DATEOBS
     82    book getword md5sum.book $pageName iter    -var ITER
    8283    option $pageName
    8384    # save the page so we can use it below
    8485
    8586    # write an entry point in the log for this night
    86     sprintf tmpline "%s/%s/log.md5sum.runhosts.v0" $mypath $DATEOBS
     87    sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $DATEOBS $ITER
    8788    date -var mydate
    8889    exec echo "# start runhosts $mydate" >> $tmpline
    8990
    90     command $mypath/get_hosts_md5s.sh $mypath $DATEOBS v0
     91    # the command returns these fields: dateobs stage md5host
     92    # NOTE: stage == ITER
     93    command $mypath/get_hosts_md5s.sh $mypath $DATEOBS $ITER
    9194  end
    9295
     
    142145    if ("$pageName" == "NULL") break
    143146
     147    # XXX NOTE: the output field is called 'stage'
    144148    book setword md5host.book $pageName pantaskState RUN
    145149    book getword md5host.book $pageName dateobs -var DATEOBS
     150    book getword md5host.book $pageName stage   -var ITER
    146151    book getword md5host.book $pageName md5host -var MD5HOST
    147152
     
    150155
    151156    # does the output go here?
    152     stdout $mypath/$DATEOBS/log.md5sum.runhosts.v0 
    153     stderr $mypath/$DATEOBS/log.md5sum.runhosts.v0 
     157    stdout $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 
     158    stderr $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 
    154159
    155160    # XXX TEST: $USE_HOST = ipp060
     
    167172
    168173    ## even when testing, use the original hostname here:
    169     $input = $mypath/$DATEOBS/$MD5HOST.inst.v0.txt
     174    $input = $mypath/$DATEOBS/$MD5HOST.inst.$ITER.txt
    170175
    171176    # need to make sure this will work on the ipp b-nodes:
    172177    # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs
    173178    periods -exec 0.05
    174     command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input --stage v0
     179    command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input --stage $ITER
    175180  end
    176181
     
    271276  book getword md5sum.book $options:1 NHOST -var Nhosts
    272277  book getword md5sum.book $options:1 NDONE -var Ndone
     278  book getword md5sum.book $options:1 stage -var ITER
    273279  $Ndone ++
    274280  book setword md5sum.book $options:1 NDONE $Ndone
    275281  if ("$1" != "OK")
    276282    book setword md5sum.book $options:1 pantasksQuality $1
    277     sprintf tmpline "%s/%s/log.md5sum.runhosts.v0" $mypath $options:1
     283    sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $options:1 $ITER
    278284    exec echo "failure $1 $options:0" >> $tmpline
    279285  else
  • trunk/tools/eam/rawfix.20230221/src/rawfix.pt

    r42441 r42445  
    2323# order is this file is not determinative, only the
    2424# change of state from STAGE1.new -> STAGE1.done -> STAGE2.new
    25 input rawfix.advance.pt
     25# input rawfix.advance.pt
    2626input rawfix.ckchip.pt
    2727input rawfix.fixchip.pt
    2828input rawfix.md5sum.pt
    2929input rawfix.md5chk.pt
    30 input rawfix.fixchip_s2.pt
    31 input rawfix.md5sum_s2.pt
    32 input rawfix.md5chk_s2.pt
    33 input rawfix.fixchip_s3.pt
    34 input rawfix.ckchip_s3.pt
    35 
    36 # no need to run rsync if we use the b-node working directory:
    37 # input rawfix.rsync_s1.pt
    38 # input rawfix.rsync_s2.pt
    3930
    4031######################### UTILITIES #################################
Note: See TracChangeset for help on using the changeset viewer.