Changeset 42404
- Timestamp:
- Mar 9, 2023, 2:32:14 PM (3 years ago)
- Location:
- trunk/tools/eam/rawfix.20230221/src
- Files:
-
- 2 added
- 6 edited
-
check.rawfix.sh (modified) (2 diffs)
-
check_md5s_dateobs.pl (added)
-
fix_chip_locations.pl (modified) (1 diff)
-
get_hosts_md5s.sh (modified) (1 diff)
-
get_md5s_instances.pl (modified) (1 diff)
-
gpc1.chips.txt (added)
-
rawfix.pt (modified) (11 diffs)
-
update.bnodes.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
r42400 r42404 3 3 if ($#argv < 1) then 4 4 echo "USAGE: check.rawfix.sh (mode) [options]" 5 echo "USAGE: check.rawfix.sh all" 6 echo "USAGE: check.rawfix.sh stats" 5 7 echo "USAGE: check.rawfix.sh night (YYYYMMDD)" 6 echo "USAGE: check.rawfix.sh new" 8 echo "USAGE: check.rawfix.sh state (state)" 9 echo " NOTE: state = raw, rsync, md5sum.new" 7 10 exit 2 8 11 endif … … 61 64 if ($mystate == "rsync") goto good_state 62 65 if ($mystate == "md5sum.new") goto good_state 66 if ($mystate == "md5sum.done") goto good_state 67 if ($mystate == "md5sum.fail") goto good_state 63 68 64 69 echo "ERROR: unknown mode $mystate" -
trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
r42399 r42404 12 12 use Getopt::Long qw( GetOptions :config auto_help auto_version ); 13 13 14 # USAGE: fix_chip_locations.pl --dateobs (night) 14 # USAGE: fix_chip_locations.pl --dateobs (night) --chiplist (file) 15 15 16 16 # we need to select targets for ITC copies of files currently only at ATRC: -
trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
r42400 r42404 14 14 15 15 # report both the dateobs and the hostnames 16 ls $dirname/*.inst.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.txt// | head16 ls $dirname/*.inst.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.txt// 17 17 exit 0 -
trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl
r42400 r42404 27 27 28 28 if ($output eq $input) { die "output file ($output) matches input file ($input)\n"; } 29 if (-e $output) { 30 # check that all instances are in the output file? 31 print "$output exists, skipping\n"; 32 exit 0; 33 } 34 29 35 open (OUTFILE, ">$output"); 30 36 -
trunk/tools/eam/rawfix.20230221/src/rawfix.pt
r42400 r42404 13 13 14 14 # use this to find the files in this local directory 15 $mypath = `pwd` 15 $mypath = /home/panstarrs/eugene/rawfix.20230221 16 17 if (not($?LOGDIR)) 18 $LOGDIR = $mypath/pantasks_logs 19 mkdir $LOGDIR 20 end 16 21 17 22 if (not($?RAWFIX_INIT)) … … 19 24 book init md5host.book 20 25 $RAWFIX_INIT = 1 21 end22 23 macro load.hosts24 # read the list of possible hosts from the file25 # for each host, create a variable $host:name = 026 # when the host is running, set this to 127 28 list allhosts -x "cat allhosts.txt"29 30 for i 0 $allhosts:n31 $name = $allhosts:$i32 $host:$name = 033 end34 26 end 35 27 … … 42 34 periods -timeout 30 43 35 36 stdout $LOGDIR/md5sum.load.stdout.log 37 stderr $LOGDIR/md5sum.load.stderr.log 38 44 39 # only run one of these tasks at a time 45 40 npending 1 … … 77 72 periods -timeout 60 78 73 npending 1 74 75 stdout $LOGDIR/md5sum.loadhosts.stdout.log 76 stderr $LOGDIR/md5sum.loadhosts.stderr.log 79 77 80 78 task.exec … … 94 92 option $pageName 95 93 # save the page so we can use it below 94 95 # write an entry point in the log for this night 96 sprintf tmpline "%s/%s/md5sum.runhosts.log" $mypath $DATEOBS 97 date -var mydate 98 exec echo "# start runhosts $mydate" >> $tmpline 96 99 97 100 command get_hosts_md5s.sh $DATEOBS … … 133 136 periods -timeout 60 134 137 138 stdout $LOGDIR/md5sum.runhosts.stdout.log 139 stderr $LOGDIR/md5sum.runhosts.stderr.log 140 135 141 task.exec 136 142 # if we are unable to run the 'exec', use a long retry time … … 152 158 # save DATEOBS so we can find the md5sum.book entry 153 159 154 # XXX test: use test host 155 $TESTHOST = ipp060 156 host -required $TESTHOST 157 if (not($?host:$TESTHOST)) 158 echo "host not defined, creating : $TESTHOST" 159 $host:$TESTHOST = 0 160 # XXX TEST: $USE_HOST = ipp060 161 162 $USE_HOST = $MD5HOST 163 host -required $USE_HOST 164 ## check if this host needs to be launched 165 if (not($?host:$USE_HOST)) 166 echo "host not defined, creating : $USE_HOST" 167 $host:$USE_HOST = 0 160 168 end 161 if (not($host:$ TESTHOST))162 control host add $ TESTHOST163 $host:$ TESTHOST = 1169 if (not($host:$USE_HOST)) 170 control host add $USE_HOST 171 $host:$USE_HOST = 1 164 172 end 165 # host -required $MD5HOST 166 167 ## check if this host needs to be launched 168 173 174 ## even when testing, use the original hostname here: 169 175 $input = $mypath/$DATEOBS/$MD5HOST.inst.txt 170 176 171 177 # need to make sure this will work on the ipp b-nodes: 172 # command $mypath/get_md5s_instances.pl --hostname $MD5HOST --input $input 173 command $mypath/get_md5s_instances.pl --hostname $TESTHOST --input $input 178 # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs 179 periods -exec 0.05 180 command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input 174 181 end 175 182 … … 203 210 periods -timeout 60 204 211 npending 1 212 213 stdout $LOGDIR/md5sum.clean.stdout.log 214 stderr $LOGDIR/md5sum.clean.stderr.log 205 215 206 216 task.exec … … 214 224 # look for completed nights in md5sum.book (pantaskState == DONE) 215 225 book getpage md5sum.book 0 -var pageName -key pantaskState DONE 216 echo "checking this page: $pageName"217 226 if ("$pageName" == "NULL") break 218 227 219 echo "cleaning this page: $pageName" 220 book listpage md5sum.book $pageName 228 # book listpage md5sum.book $pageName 221 229 222 230 # book setword md5sum.book $pageName pantaskState RUN 223 231 book getword md5sum.book $pageName dateobs -var DATEOBS 224 232 book getword md5sum.book $pageName pantasksQuality -var QUALITY 225 echo "cleaning $pageName, quality: $QUALITY"226 233 227 234 option $pageName … … 229 236 230 237 if ("$QUALITY" == "OK") 231 232 238 command update.rawfix.sh $DATEOBS md5sum.done 233 239 else … … 275 281 if ("$1" != "OK") 276 282 book setword md5sum.book $options:1 pantasksQuality $1 283 sprintf tmpline "%s/%s/md5sum.runhosts.log" $mypath $options:1 284 exec echo "failure $1 $options:0" >> $tmpline 285 else 286 exec echo "success $1 $options:0" >> $tmpline 277 287 end 278 288 if ($Ndone == $Nhosts) -
trunk/tools/eam/rawfix.20230221/src/update.bnodes.sh
r42400 r42404 6 6 endif 7 7 8 set options = "-auvn "8 set options = "-auvn --exclude=trash" 9 9 if ($2 == "commit") set options = "-auv" 10 10
Note:
See TracChangeset
for help on using the changeset viewer.
