Changeset 42445
- Timestamp:
- Apr 7, 2023, 4:50:38 PM (3 years ago)
- Location:
- trunk/tools/eam/rawfix.20230221/src
- Files:
-
- 12 edited
-
check.rawfix.sh (modified) (3 diffs)
-
check_chip_locations.pl (modified) (18 diffs)
-
check_night_status.pl (modified) (1 diff)
-
create.rawfix.sh (modified) (1 diff)
-
fix_chip_failures.pl (modified) (3 diffs)
-
fix_chip_locations.pl (modified) (11 diffs)
-
get_hosts_md5s.sh (modified) (1 diff)
-
rawfix.ckchip.pt (modified) (3 diffs)
-
rawfix.fixchip.pt (modified) (2 diffs)
-
rawfix.md5chk.pt (modified) (2 diffs)
-
rawfix.md5sum.pt (modified) (5 diffs)
-
rawfix.pt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
r42430 r42445 49 49 50 50 set mynight = $2 51 mysql $DBOPTS -e "select dateobs, statefrom nights where (dateobs = '$mynight')"51 mysql $DBOPTS -e "select * from nights where (dateobs = '$mynight')" 52 52 exit 0 53 53 endif … … 74 74 if ($mystate == "md5chk.fail") goto good_state 75 75 76 # stage 2:77 if ($mystate == "fixchip_s2.new") goto good_state78 if ($mystate == "fixchip_s2.done") goto good_state79 if ($mystate == "fixchip_s2.fail") goto good_state80 if ($mystate == "md5sum_s2.new") goto good_state81 if ($mystate == "md5sum_s2.done") goto good_state82 if ($mystate == "md5sum_s2.fail") goto good_state83 if ($mystate == "md5chk_s2.new") goto good_state84 if ($mystate == "md5chk_s2.done") goto good_state85 if ($mystate == "md5chk_s2.fail") goto good_state86 87 # stage 3:88 if ($mystate == "fixchip_s3.new") goto good_state89 if ($mystate == "fixchip_s3.done") goto good_state90 if ($mystate == "fixchip_s3.fail") goto good_state91 if ($mystate == "ckchip_s3.new") goto good_state92 if ($mystate == "ckchip_s3.done") goto good_state93 if ($mystate == "ckchip_s3.fail") goto good_state94 95 # disable the rsyncs stages: run in directory from b-node96 # if ($mystate == "rsync_s1.new") goto good_state97 # if ($mystate == "rsync_s1.done") goto good_state98 # if ($mystate == "rsync_s1.fail") goto good_state99 # if ($mystate == "rsync_s2.new") goto good_state100 # if ($mystate == "rsync_s2.done") goto good_state101 # if ($mystate == "rsync_s2.fail") goto good_state102 103 76 echo "ERROR: unknown mode $mystate" 104 77 exit 2 … … 106 79 good_state: 107 80 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}' 109 82 exit 0 110 83 endif -
trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl
r42444 r42445 17 17 18 18 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts; 19 my ($neb_dbh, $gpc_dbh ) = &parse_db_config ("$topdir/nebulous.config");19 my ($neb_dbh, $gpc_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config"); 20 20 21 21 # read the list of chip_ids: … … 32 32 # instance lists by host: YYYYMMDD/HOSTNAME.inst.STAGE.txt 33 33 # chip states by chip: YYYYMMDD/CHIPNAME.uris.STAGE.txt 34 35 my $Nchip = 0; 36 37 my $Ngood = 0; 38 my $Ndead = 0; 39 my $Ngone = 0; 40 my $Nsing = 0; 41 my $Ndups = 0; 42 my $Nsbck = 0; 43 my $Nxbck = 0; 44 45 my $Ncul1 = 0; 46 my $Ncul2 = 0; 47 my $Ncul3 = 0; 34 48 35 49 foreach my $chip_id (@chip_ids) { … … 90 104 } 91 105 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 106 print "Nchip: $Nchip\n"; 107 print "Ngood: $Ngood\n"; 108 print "Ngone: $Ngone\n"; 109 print "Ndead: $Ndead\n"; 110 print "Nsing: $Nsing\n"; 111 print "Ndups: $Ndups\n"; 112 print "Nsbck: $Nsbck\n"; 113 print "Nxbck: $Nxbck\n"; 114 print "Ncul1: $Ncul1\n"; 115 print "Ncul2: $Ncul2\n"; 116 print "Ncul3: $Ncul3\n"; 117 118 my $Ntotal = $Ngood + $Ngone + $Ndead + $Nsing + $Ndups + $Nsbck + $Nxbck + $Ncul1 + $Ncul2 + $Ncul3; 119 if ($Ntotal != $Nchip) { die "ERROR: inconsistent count of chips\n"; } 120 121 # update the stats in the database 122 my $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 136 my $query = $raw_dbh->prepare($sql_update_stats); 137 $query->execute () or die "invalid response from RAW database\n"; 103 138 104 139 exit 0; … … 256 291 257 292 my $outinfo = "$extID $data_st $md5_sum"; 293 $Nchip ++; 258 294 259 295 # GOOD : already fixed 260 296 if (($Nmain == 1) && ($Nback == 1)) { 261 297 print $outfh "GOOD: $outinfo\n"; 298 $Ngood ++; 262 299 return; 263 300 } … … 267 304 if (($Nmain == 1) && ($Nback == 0)) { 268 305 print $outfh "SING: $outinfo\n"; 306 $Nsing ++; 269 307 return; 270 308 } … … 274 312 if (($Nmain == 0) && ($Nback == 1)) { 275 313 print $outfh "SBCK: $outinfo\n"; 314 $Nsbck ++; 276 315 return; 277 316 } … … 281 320 if (($Nmain > 1) && ($Nback == 0)) { 282 321 print $outfh "DUPS: $outinfo\n"; 322 $Ndups ++; 283 323 return; 284 324 } … … 288 328 if (($Nmain == 0) && ($Nback > 1)) { 289 329 print $outfh "XBCK: $outinfo\n"; 330 $Nxbck ++; 290 331 return; 291 332 } … … 294 335 if (($Nmain == 0) && ($Nback == 0) && $Ndead) { 295 336 print $outfh "DEAD: $outinfo\n"; 337 $Ndead ++; 296 338 return; 297 339 } … … 299 341 if (($Nmain == 0) && ($Nback == 0) && ($Ndead == 0)) { 300 342 print $outfh "GONE: $outinfo\n"; 343 $Ngone ++; 301 344 return; 302 345 } … … 306 349 if (($Nmain > 1) && ($Nback == 1)) { 307 350 print $outfh "CUL1: $outinfo\n"; 351 $Ncul1 ++; 308 352 return; 309 353 } … … 313 357 if (($Nback > 1) && ($Nmain == 1)) { 314 358 print $outfh "CUL2: $outinfo\n"; 359 $Ncul2 ++; 315 360 return; 316 361 } … … 320 365 if (($Nback > 1) && ($Nmain > 1)) { 321 366 print $outfh "CUL3: $outinfo\n"; 367 $Ncul3 ++; 322 368 return; 323 369 } … … 335 381 pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs; 336 382 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; 338 384 pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir; 339 385 … … 363 409 my ( $nebdb_name, $nebdb_host, $nebdb_port, $nebdb_pass, $nebdb_user ); 364 410 my ( $gpcdb_name, $gpcdb_host, $gpcdb_port, $gpcdb_pass, $gpcdb_user ); 411 my ( $rawdb_name, $rawdb_host, $rawdb_port, $rawdb_pass, $rawdb_user ); 365 412 366 413 if (-e $conffile) { … … 380 427 if ($_ =~ /GPC1_PASS /) { $gpcdb_pass = (split /\s+/,$_)[2]; } 381 428 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]; } 382 435 } 383 436 close(IN); 384 437 print STDERR "nebulous config: $nebdb_name $nebdb_host $nebdb_port $nebdb_user $nebdb_pass\n"; 385 438 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"; 386 440 } 387 441 … … 398 452 pod2usage( -msg => "Cannot configure gpc1 database (dbpass)", -exitval => 2) unless defined $gpcdb_pass; 399 453 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 400 460 my $nebdb_dsn = "DBI:mysql:database=$nebdb_name:host=$nebdb_host"; 401 461 if ($nebdb_port ne "NONE") { $nebdb_dsn .= ":port=$nebdb_port"; } … … 406 466 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"; 407 467 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); 409 473 } 410 474 -
trunk/tools/eam/rawfix.20230221/src/check_night_status.pl
r42444 r42445 37 37 38 38 my $urifile = "$dateword/$chip_id.uris.$stage.txt"; 39 unless (-e $urifile) { die "missing chip URI list $urifile\n"; } 40 39 41 open (FILE, "$urifile"); 40 42 my @lines = <FILE>; -
trunk/tools/eam/rawfix.20230221/src/create.rawfix.sh
r42440 r42445 4 4 set DBNAME = "rawfix" 5 5 set DBUSER = "dvo" 6 7 # add in the iteration and the state summary 8 9 mysql -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; 14 EOF 15 16 exit 0 6 17 7 18 mysql -h localhost -u root <<EOF -
trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl
r42442 r42445 1 1 #! /usr/bin/env perl 2 3 XXX: not yet ready 2 4 3 5 # NOTE: in this script, we are using database connections to both NEBULOUS and GPC1 databases … … 13 15 use Getopt::Long qw( GetOptions :config auto_help auto_version ); 14 16 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 v017 # 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 17 19 18 20 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts; … … 53 55 pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs; 54 56 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; 56 58 pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir; 57 59 -
trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
r42444 r42445 19 19 20 20 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts; 21 my ($neb_dbh ) = &parse_db_config ("$topdir/nebulous.config");21 my ($neb_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config"); 22 22 23 23 # read the list of chip_ids: … … 68 68 } 69 69 70 my $Nchip = 0; 71 70 72 foreach my $chip_id (@chip_ids) { 71 73 … … 96 98 if ($failchips{$ext_id}) { $haveMD5 = 1; } 97 99 100 $Nchip ++; 98 101 99 102 # nothing to be done, or need be done for these: … … 143 146 close (OUTFILE); 144 147 } 145 $Ndups++;148 if ($goodMD5) { $Ndups++; } else { $Nfail ++; } 146 149 next; 147 150 } … … 160 163 close (OUTFILE); 161 164 } 162 $Nxbck++;165 if ($goodMD5) { $Nxbck++; } else { $Nfail ++; } 163 166 next; 164 167 } … … 191 194 192 195 # 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 ++; } 196 201 } 197 202 } … … 199 204 } 200 205 206 print "Nchip: $Nchip\n"; 201 207 print "Ngood: $Ngood\n"; 202 208 print "Ngone: $Ngone\n"; … … 209 215 print "Ncul2: $Ncul2\n"; 210 216 print "Ncul3: $Ncul3\n"; 217 print "Nfail: $Nfail\n"; 218 219 my $Ntotal = $Ngood + $Ngone + $Ndead + $Nsing + $Ndups + $Nsbck + $Nxbck + $Ncul1 + $Ncul2 + $Ncul3 + $Nfail; 220 if ($Ntotal != $Nchip) { die "ERROR: inconsistent count of chips\n"; } 221 222 # update the stats in the database 223 my $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 238 my $query = $raw_dbh->prepare($sql_update_stats); 239 $query->execute () or die "invalid response from RAW database\n"; 211 240 212 241 exit 0; … … 398 427 399 428 my ( $nebdb_name, $nebdb_host, $nebdb_port, $nebdb_pass, $nebdb_user ); 429 my ( $rawdb_name, $rawdb_host, $rawdb_port, $rawdb_pass, $rawdb_user ); 400 430 401 431 if (-e $conffile) { … … 409 439 if ($_ =~ /NEB_PASS /) { $nebdb_pass = (split /\s+/,$_)[2]; } 410 440 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]; } 411 447 } 412 448 close(IN); 413 449 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"; 414 451 } 415 452 … … 420 457 pod2usage( -msg => "Cannot configure nebulous database (dbpass)", -exitval => 2) unless defined $nebdb_pass; 421 458 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 422 465 my $nebdb_dsn = "DBI:mysql:database=$nebdb_name:host=$nebdb_host"; 423 466 if ($nebdb_port ne "NONE") { $nebdb_dsn .= ":port=$nebdb_port"; } 424 467 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"; 425 468 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); 427 474 } 428 475 -
trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
r42441 r42445 21 21 22 22 # 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//23 ls $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// 24 24 exit 0 -
trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt
r42441 r42445 75 75 book setword ckchip.book $pageName pantaskState RUN 76 76 book getword ckchip.book $pageName dateobs -var DATEOBS 77 book getword ckchip.book $pageName iter -var ITER 77 78 option $pageName 78 79 79 80 # this is the first place in the proces that this location is known 80 81 mkdir $mypath/$DATEOBS 81 stdout $mypath/$DATEOBS/log.ckchip.runhosts.v 082 stderr $mypath/$DATEOBS/log.ckchip.runhosts.v 082 stdout $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER 83 stderr $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER 83 84 84 85 substr $DATEOBS 0 4 YEAR … … 88 89 sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY 89 90 90 command $mypath/check_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v091 command $mypath/check_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage $ITER 91 92 end 92 93 … … 120 121 # option for writing stdout / stderr to a file 121 122 # queuepush stdout "------- end of stdout ---------" 122 # queuesave stdout $options:0/log.ckchip.v 0123 # queuesave stdout $options:0/log.ckchip.v$ITER 123 124 # queuepush stderr "------- end of stderr ---------" 124 # queuesave stderr $options:0/log.ckchip.v 0125 # queuesave stderr $options:0/log.ckchip.v$ITER -
trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt
r42441 r42445 74 74 book setword fixchip.book $pageName pantaskState RUN 75 75 book getword fixchip.book $pageName dateobs -var DATEOBS 76 book getword fixchip.book $pageName iter -var ITER 76 77 option $pageName 77 78 78 stdout $pageName/log.fixchip.v 079 stderr $pageName/log.fixchip.v 079 stdout $pageName/log.fixchip.v$ITER 80 stderr $pageName/log.fixchip.v$ITER 80 81 81 82 substr $DATEOBS 0 4 YEAR … … 84 85 sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY 85 86 86 command $mypath/fix_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v087 command $mypath/fix_chip_locations.pl --topdir $mypath --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage $ITER 87 88 end 88 89 -
trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt
r42441 r42445 73 73 book setword md5chk.book $pageName pantaskState RUN 74 74 book getword md5chk.book $pageName dateobs -var DATEOBS 75 book getword md5chk.book $pageName iter -var ITER 75 76 option $pageName 76 77 … … 81 82 82 83 # does the output go here? 83 stdout $mypath/$DATEOBS/log.md5chk.v 084 stderr $mypath/$DATEOBS/log.md5chk.v 084 stdout $mypath/$DATEOBS/log.md5chk.v$ITER 85 stderr $mypath/$DATEOBS/log.md5chk.v$ITER 85 86 86 command $mypath/check_md5s_dateobs.pl --topdir $mypath --dateobs $FULLDATE --stage v087 command $mypath/check_md5s_dateobs.pl --topdir $mypath --dateobs $FULLDATE --stage $ITER 87 88 end 88 89 -
trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt
r42441 r42445 80 80 book setword md5sum.book $pageName pantaskState RUN 81 81 book getword md5sum.book $pageName dateobs -var DATEOBS 82 book getword md5sum.book $pageName iter -var ITER 82 83 option $pageName 83 84 # save the page so we can use it below 84 85 85 86 # write an entry point in the log for this night 86 sprintf tmpline "%s/%s/log.md5sum.runhosts.v 0" $mypath $DATEOBS87 sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $DATEOBS $ITER 87 88 date -var mydate 88 89 exec echo "# start runhosts $mydate" >> $tmpline 89 90 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 91 94 end 92 95 … … 142 145 if ("$pageName" == "NULL") break 143 146 147 # XXX NOTE: the output field is called 'stage' 144 148 book setword md5host.book $pageName pantaskState RUN 145 149 book getword md5host.book $pageName dateobs -var DATEOBS 150 book getword md5host.book $pageName stage -var ITER 146 151 book getword md5host.book $pageName md5host -var MD5HOST 147 152 … … 150 155 151 156 # does the output go here? 152 stdout $mypath/$DATEOBS/log.md5sum.runhosts.v 0153 stderr $mypath/$DATEOBS/log.md5sum.runhosts.v 0157 stdout $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 158 stderr $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 154 159 155 160 # XXX TEST: $USE_HOST = ipp060 … … 167 172 168 173 ## even when testing, use the original hostname here: 169 $input = $mypath/$DATEOBS/$MD5HOST.inst. v0.txt174 $input = $mypath/$DATEOBS/$MD5HOST.inst.$ITER.txt 170 175 171 176 # need to make sure this will work on the ipp b-nodes: 172 177 # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs 173 178 periods -exec 0.05 174 command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input --stage v0179 command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input --stage $ITER 175 180 end 176 181 … … 271 276 book getword md5sum.book $options:1 NHOST -var Nhosts 272 277 book getword md5sum.book $options:1 NDONE -var Ndone 278 book getword md5sum.book $options:1 stage -var ITER 273 279 $Ndone ++ 274 280 book setword md5sum.book $options:1 NDONE $Ndone 275 281 if ("$1" != "OK") 276 282 book setword md5sum.book $options:1 pantasksQuality $1 277 sprintf tmpline "%s/%s/log.md5sum.runhosts.v 0" $mypath $options:1283 sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $options:1 $ITER 278 284 exec echo "failure $1 $options:0" >> $tmpline 279 285 else -
trunk/tools/eam/rawfix.20230221/src/rawfix.pt
r42441 r42445 23 23 # order is this file is not determinative, only the 24 24 # change of state from STAGE1.new -> STAGE1.done -> STAGE2.new 25 input rawfix.advance.pt25 # input rawfix.advance.pt 26 26 input rawfix.ckchip.pt 27 27 input rawfix.fixchip.pt 28 28 input rawfix.md5sum.pt 29 29 input rawfix.md5chk.pt 30 input rawfix.fixchip_s2.pt31 input rawfix.md5sum_s2.pt32 input rawfix.md5chk_s2.pt33 input rawfix.fixchip_s3.pt34 input rawfix.ckchip_s3.pt35 36 # no need to run rsync if we use the b-node working directory:37 # input rawfix.rsync_s1.pt38 # input rawfix.rsync_s2.pt39 30 40 31 ######################### UTILITIES #################################
Note:
See TracChangeset
for help on using the changeset viewer.
