Changeset 42404 for trunk/tools/eam/rawfix.20230221/src/rawfix.pt
- Timestamp:
- Mar 9, 2023, 2:32:14 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/tools/eam/rawfix.20230221/src/rawfix.pt (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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)
Note:
See TracChangeset
for help on using the changeset viewer.
