6 |
# the latest output with the previous one (from the same platform with |
# the latest output with the previous one (from the same platform with |
7 |
# same optfile) |
# same optfile) |
8 |
|
|
|
|
|
9 |
usage() |
usage() |
10 |
{ |
{ |
11 |
echo |
echo |
12 |
echo "Usage: $0 [OPTIONS]" |
echo "Usage: $0 [OPTIONS]" |
13 |
echo |
echo |
14 |
echo "where possible OPTIONS are:" |
echo "where possible OPTIONS are:" |
15 |
echo " (-h|-help) print usage" |
echo " (-h|-help) print usage" |
16 |
echo " (-v|-verbose) verbose mode" |
echo " (-v|-verbose) verbose mode" |
17 |
|
echo " (-t|-test4update) do nothing if previous output newer than" |
18 |
|
echo " emails-processing log-file '$PRC_MAILS'" |
19 |
echo " (-l |-list )MACHINES check platforms from this list" |
echo " (-l |-list )MACHINES check platforms from this list" |
20 |
echo " [def=\"$MACHINES\"]" |
echo " [def=\"$MACHINES\"]" |
21 |
echo " (-d |-day )FIRSTDAY select output from day=\"YYYYMMDD\"" |
echo " (-d |-day )FIRSTDAY select output from day=\"YYYYMMDD\"" |
23 |
echo " [def=\"$FIRSTDAY\"]" |
echo " [def=\"$FIRSTDAY\"]" |
24 |
echo " (-u |-upto )LASTDAY until last day=\"YYYYMMDD\" (=selected period)" |
echo " (-u |-upto )LASTDAY until last day=\"YYYYMMDD\" (=selected period)" |
25 |
echo " [def=\"FIRSTDAY\"]" |
echo " [def=\"FIRSTDAY\"]" |
26 |
|
echo " (-b |-before)BEFORE compare with output from before \"YYYYMMDD\"" |
27 |
|
echo " (=previous period) [def=\"FIRSTDAY\"]" |
28 |
echo " (-o |-outp )OUTPFIL output file (-1 removed when exit)" |
echo " (-o |-outp )OUTPFIL output file (-1 removed when exit)" |
29 |
echo " [def=\"$OUTPFIL\"]" |
echo " [def=\"$OUTPFIL\"]" |
30 |
echo " (-n |-nldf )NBLDIFF max number of diff lines to echo" |
echo " (-n |-nldf )NBLDIFF max number of diff lines to echo" |
31 |
echo " [def=\"$NBLDIFF\"]" |
echo " [def=\"$NBLDIFF\"]" |
32 |
echo " (-a |-addr )ADDRESS send summary to mail ADDRESS list" |
echo " (-a |-addr )ADDRESS send summary to mail ADDRESS list" |
33 |
echo " [def=\"$ADDRESS\"]" |
echo " [def=\"$ADDRESS\"]" |
34 |
echo |
echo |
35 |
exit 1 |
exit 1 |
36 |
} |
} |
37 |
|
|
38 |
|
# create list of results dir for one platform: |
39 |
|
make_resdir_list() |
40 |
|
{ |
41 |
|
if test $monthDir == 1 ; then |
42 |
|
dir_list=`grep '.._'$mname $TMP.dir_all` |
43 |
|
else |
44 |
|
dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/??_*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )` |
45 |
|
#echo "dir_list='$dir_list'" |
46 |
|
fi |
47 |
|
for i in $dir_list ; do |
48 |
|
|
49 |
|
dir=$INDIR"/"$i |
50 |
|
#--- get the opfile used to run testreport |
51 |
|
OPTFILE= |
52 |
|
if test -r $dir/summary.txt ; then |
53 |
|
comm=`grep 'OPTFILE=' $dir/summary.txt` |
54 |
|
eval $comm |
55 |
|
fi |
56 |
|
if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then |
57 |
|
comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null` |
58 |
|
eval $comm |
59 |
|
fi |
60 |
|
if test "x$OPTFILE" = x ; then |
61 |
|
comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1` |
62 |
|
comm=${comm##*#} |
63 |
|
eval $comm |
64 |
|
fi |
65 |
|
if test "x$OPTFILE" = x ; then |
66 |
|
OPTFILE="not_explicitly_specified" |
67 |
|
else |
68 |
|
OPTFILE=${OPTFILE##*/} |
69 |
|
fi |
70 |
|
#--- case select test run by 1 user: get user who did run testreport |
71 |
|
if test "x$sUser" != x ; then |
72 |
|
tUser= |
73 |
|
if test -f $dir/genmake_state ; then |
74 |
|
nn=`sed -n '/^# executed by:/=' $dir/genmake_state` |
75 |
|
if test "x$nn" != x ; then |
76 |
|
nn=`expr $nn + 1` |
77 |
|
tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'` |
78 |
|
fi |
79 |
|
fi |
80 |
|
if test "x$tUser" = "x" ; then |
81 |
|
mkfile=`ls $dir/*/Makefile* 2>/dev/null | head -1` |
82 |
|
if test "x$mkfile" = 'x' ; then |
83 |
|
echo "no Makefile => discard test from: $i" | tee -a $OUTPFIL |
84 |
|
continue |
85 |
|
fi |
86 |
|
nn=`sed -n '/^# executed by:/=' $mkfile` |
87 |
|
if test "x$nn" != x ; then |
88 |
|
nn=`expr $nn + 1` |
89 |
|
tUser=`sed -n "$nn s/^# *// p" $mkfile | sed 's/@.*$//'` |
90 |
|
fi |
91 |
|
fi |
92 |
|
if test "x$tUser" = x ; then |
93 |
|
echo "no User found => discard test from: $i" | tee -a $OUTPFIL |
94 |
|
continue |
95 |
|
fi |
96 |
|
if test $tUser != $sUser ; then |
97 |
|
if test $dBug = 't' ; then |
98 |
|
echo " discard test from: $i" | tee -a $OUTPFIL |
99 |
|
fi |
100 |
|
continue |
101 |
|
fi |
102 |
|
fi |
103 |
|
|
104 |
|
ADJOINT=0 |
105 |
|
TANGLIN=0 |
106 |
|
OPENAD=0 |
107 |
|
RESTART=0 |
108 |
|
EXTRA= |
109 |
|
FAST=0 |
110 |
|
DVLP=0 |
111 |
|
MPI=0 |
112 |
|
MTH=0 |
113 |
|
UR4=0 |
114 |
|
if test -r $dir/summary.txt ; then |
115 |
|
ADJOINT=`grep -c -i '^ADJOINT' $dir/summary.txt` |
116 |
|
if test "x$ADJOINT" = x1 ; then |
117 |
|
OPENAD=`grep -c '^Adjoint .* OpenAD' $dir/summary.txt` |
118 |
|
fi |
119 |
|
TANGLIN=`grep -c -i '^TANGLIN' $dir/summary.txt` |
120 |
|
if test "x$TANGLIN" = x1 ; then |
121 |
|
OPENAD=`grep -c '^TangLin .* OpenAD' $dir/summary.txt` |
122 |
|
fi |
123 |
|
RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` |
124 |
|
comm=`grep '^run: .*testreport.* ' $dir/summary.txt` |
125 |
|
EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"` |
126 |
|
if test "x$EXTRA" = x ; then |
127 |
|
EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"` |
128 |
|
fi |
129 |
|
if test "x$EXTRA" = x ; then EXTRA=0 ; else |
130 |
|
#echo -n "EXTRA=$EXTRA" |
131 |
|
nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w` |
132 |
|
nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"` |
133 |
|
nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"` |
134 |
|
EXTRA=1 |
135 |
|
if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi |
136 |
|
if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi |
137 |
|
#echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2" |
138 |
|
fi |
139 |
|
FAST=`echo "$comm" | grep -c " -*-fast\>"` |
140 |
|
if test "x$FAST" = x0 ; then |
141 |
|
FAST=`echo "$comm" | grep -c " '*-noieee'*"` |
142 |
|
fi |
143 |
|
DVLP=`echo "$comm" | grep -c " -*-devel\>"` |
144 |
|
MPI=`echo "$comm" | grep -c " -*-mpi\>"` |
145 |
|
if test "x$MPI" = x0 ; then |
146 |
|
MPI=`echo "$comm" | grep -c " -*-MPI\>"` |
147 |
|
fi |
148 |
|
MTH=`echo "$comm" | grep -c " -*-mth\>"` |
149 |
|
UR4=`echo "$comm" | grep -c " -*-use_r4\>"` |
150 |
|
if test "x$UR4" = x0 ; then |
151 |
|
UR4=`echo "$comm" | grep -c " -*-ur4\>"` |
152 |
|
fi |
153 |
|
fi |
154 |
|
if test "x$ADJOINT" = x1 ; then |
155 |
|
kind="adm-TAF" ; order=0 |
156 |
|
if test "x$OPENAD" = x1 ; then kind="adm-OAD" ; order=2 ; fi |
157 |
|
elif test "x$TANGLIN" = x1 ; then |
158 |
|
kind="tlm-TAF" ; order=1 |
159 |
|
if test "x$OPENAD" = x1 ; then kind="tlm-OAD" ; order=3 ; fi |
160 |
|
elif test "x$RESTART" = x0 ; then |
161 |
|
kind="forward" ; order=4 |
162 |
|
else |
163 |
|
kind="restart" ; order=5 |
164 |
|
fi |
165 |
|
order=`expr $order + 10 \* $EXTRA` |
166 |
|
order=`printf '%3.3i' $order` |
167 |
|
if test "x$UR4" = x1 ; then |
168 |
|
OPTFILE="${OPTFILE}.use_r4" |
169 |
|
fi |
170 |
|
if test "x$MPI" = x1 ; then |
171 |
|
yy=`echo $OPTFILE | grep -c '+mpi'` |
172 |
|
if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi |
173 |
|
fi |
174 |
|
if test "x$MTH" = x1 ; then |
175 |
|
yy=`echo $OPTFILE | grep -c '+mth$'` |
176 |
|
if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi |
177 |
|
fi |
178 |
|
if test "x$FAST" = x1 ; then |
179 |
|
OPTFILE="${OPTFILE}.fast" |
180 |
|
fi |
181 |
|
if test "x$DVLP" = x1 ; then |
182 |
|
OPTFILE="${OPTFILE}.dvlp" |
183 |
|
fi |
184 |
|
day=`echo $i | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` |
185 |
|
ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` |
186 |
|
day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'` |
187 |
|
|
188 |
|
if [ $day -lt $BEFORE ] ; then |
189 |
|
echo "$OPTFILE$order $day $OPTFILE $kind $i" >> $TMP.plist |
190 |
|
elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then |
191 |
|
echo "$OPTFILE$order $day $OPTFILE $kind $i" >> $TMP.slist |
192 |
|
else |
193 |
|
if test $dBug = 't' ; then |
194 |
|
echo "discard day='$day' from: $i" | tee -a $OUTPFIL |
195 |
|
fi |
196 |
|
fi |
197 |
|
|
198 |
|
done |
199 |
|
if test $dBug = 't' ; then |
200 |
|
if test $monthDir == 1 ; then |
201 |
|
echo "---- current list (n=$monthDir) :" | tee -a $OUTPFIL |
202 |
|
cat $TMP.slist | tee -a $OUTPFIL |
203 |
|
fi |
204 |
|
num1=`wc -l $TMP.slist | awk '{print $1}'` |
205 |
|
if test $num1 -gt 0 ; then |
206 |
|
echo ".... previous list (n=$monthDir):" | tee -a $OUTPFIL |
207 |
|
cat $TMP.plist | tee -a $OUTPFIL | head -20 |
208 |
|
fi |
209 |
|
echo "----" | tee -a $OUTPFIL |
210 |
|
fi |
211 |
|
} |
212 |
|
|
213 |
|
#-------------------------------------------------------------------------- |
214 |
|
# here starts the sequential part of the script: |
215 |
|
|
216 |
#CURR_PER=`date +%Y`"_"`date +%m` |
#CURR_PER=`date +%Y`"_"`date +%m` |
217 |
CURR_DAY=`date +%Y%m%d` |
CURR_DAY=`date +%Y%m%d` |
218 |
|
PRC_MAILS='prc_emails_'`date +%m%d` |
219 |
# defaults |
# defaults |
220 |
MACHINES='_All_' |
MACHINES='_All_' |
221 |
FIRSTDAY=$CURR_DAY |
FIRSTDAY=$CURR_DAY |
222 |
LASTDAY="30000000" |
LASTDAY="30000000" |
223 |
|
BEFORE="30000000" |
224 |
OUTPFIL=`basename $0`'.log' |
OUTPFIL=`basename $0`'.log' |
225 |
NBLDIFF=5 |
NBLDIFF=5 |
226 |
ADDRESS='none' |
ADDRESS='none' |
227 |
|
MAILCMD="mail" |
228 |
dBug=f |
dBug=f |
229 |
|
t4update=0 |
230 |
sTime=`date` |
sTime=`date` |
231 |
#- to get case insensitive "ls" (and order of tested experiments) |
#- to get case insensitive "ls" (and order of tested experiments) |
232 |
export LC_ALL="en_US.UTF-8" |
export LC_ALL="en_US.UTF-8" |
237 |
|
|
238 |
# If the previous option needs an argument, assign it. |
# If the previous option needs an argument, assign it. |
239 |
if test -n "$ac_prev"; then |
if test -n "$ac_prev"; then |
240 |
eval "$ac_prev=\$ac_option" |
eval "$ac_prev=\$ac_option" |
241 |
ac_prev= |
ac_prev= |
242 |
continue |
continue |
243 |
fi |
fi |
244 |
|
|
245 |
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
|
|
|
246 |
case $ac_option in |
case $ac_option in |
247 |
|
|
248 |
-help | --help | -h | --h) |
-help | --help | -h | --h) usage ;; |
249 |
usage ;; |
-verbose | --verbose | -v | --v) dBug=t ;; |
250 |
-verbose | --verbose | -v | --v) |
-test4update | --test4update | -t | --t) t4update=1 ;; |
|
dBug=t ;; |
|
251 |
|
|
252 |
-list | --list | -l | --l) |
-list | --list | -l | --l) ac_prev=MACHINES ;; |
253 |
ac_prev=MACHINES ;; |
-list=* | --list=*) MACHINES=$ac_optarg ;; |
254 |
-list=* | --list=*) |
|
255 |
MACHINES=$ac_optarg ;; |
-day | --day | -d | --d) ac_prev=FIRSTDAY ;; |
256 |
|
-day=* | --day=*) FIRSTDAY=$ac_optarg ;; |
|
-day | --day | -d | --d) |
|
|
ac_prev=FIRSTDAY ;; |
|
|
-day=* | --day=*) |
|
|
FIRSTDAY=$ac_optarg ;; |
|
|
|
|
|
-upto | --upto | -u | --u) |
|
|
ac_prev=LASTDAY ;; |
|
|
-upto=* | --upto=*) |
|
|
LASTDAY=$ac_optarg ;; |
|
|
|
|
|
-outp | --outp | -o | --o) |
|
|
ac_prev=OUTPFIL ;; |
|
|
-outp=* | --outp=*) |
|
|
OUTPFIL=$ac_optarg ;; |
|
|
|
|
|
-nldf | --nldf | -n | --n) |
|
|
ac_prev=NBLDIFF ;; |
|
|
-nldf=* | --nldf=*) |
|
|
NBLDIFF=$ac_optarg ;; |
|
|
|
|
|
-addr | --addr | -a | --a) |
|
|
ac_prev=ADDRESS ;; |
|
|
-addr=* | --addr=*) |
|
|
ADDRESS=$ac_optarg ;; |
|
|
|
|
|
*) |
|
|
echo "Error: don't understand argument \"$ac_option\"" |
|
|
usage |
|
|
;; |
|
257 |
|
|
258 |
|
-upto | --upto | -u | --u) ac_prev=LASTDAY ;; |
259 |
|
-upto=* | --upto=*) LASTDAY=$ac_optarg ;; |
260 |
|
|
261 |
|
-before | --before | -b | --b) ac_prev=BEFORE ;; |
262 |
|
-before=* | --before=*) BEFORE=$ac_optarg ;; |
263 |
|
|
264 |
|
-outp | --outp | -o | --o) ac_prev=OUTPFIL ;; |
265 |
|
-outp=* | --outp=*) OUTPFIL=$ac_optarg ;; |
266 |
|
|
267 |
|
-nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;; |
268 |
|
-nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;; |
269 |
|
|
270 |
|
-addr | --addr | -a | --a) ac_prev=ADDRESS ;; |
271 |
|
-addr=* | --addr=*) ADDRESS=$ac_optarg ;; |
272 |
|
|
273 |
|
*) echo "Error: don't understand argument \"$ac_option\"" |
274 |
|
usage ;; |
275 |
esac |
esac |
276 |
|
|
277 |
done |
done |
278 |
|
|
279 |
|
#TMP=./chkoutp_$$ |
280 |
|
#- try to put temporary files in system-local /tmp dir |
281 |
|
TMP=/tmp/chkoutp_$$ |
282 |
|
touch $TMP ; retVal=$? |
283 |
|
if [ $retVal -eq 0 ] ; then |
284 |
|
if test ! -r $TMP ; then TMP=./chkoutp_$$ ; fi |
285 |
|
else |
286 |
|
TMP=./chkoutp_$$ |
287 |
|
fi |
288 |
|
rm -f $TMP |
289 |
|
if test $dBug = 't' ; then echo "temp files: $TMP" ; fi |
290 |
|
|
291 |
#-- test FIRSTDAY content ; interpret as "date -d" arg. if not YYYYMMDD |
#-- test FIRSTDAY content ; interpret as "date -d" arg. if not YYYYMMDD |
292 |
ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'` |
ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'` |
293 |
if test "x$ttt" != 'xyz' ; then |
if test "x$ttt" != 'xyz' ; then |
299 |
exit 2 |
exit 2 |
300 |
fi |
fi |
301 |
if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi |
if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi |
302 |
|
if test $BEFORE = "30000000" ; then BEFORE=$FIRSTDAY ; fi |
303 |
CMDLINE=$0 |
CMDLINE=$0 |
304 |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
305 |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" |
306 |
else CMDLINE="$CMDLINE '$xx'" ; fi |
else CMDLINE="$CMDLINE '$xx'" ; fi |
307 |
done |
done |
308 |
|
|
309 |
PERIOD=`echo $FIRSTDAY | sed 's/[0-9][0-9]$//'` |
PERIOD=`echo $LASTDAY | sed 's/[0-9][0-9]$//'` |
310 |
PP=`expr $PERIOD - 1` |
PP=`expr $PERIOD - 1` |
311 |
PM=`echo $PP | sed 's/^[0-9][0-9][0-9][0-9]//'` |
PM=`echo $PP | sed 's/^[0-9][0-9][0-9][0-9]//'` |
312 |
PY=`echo $PP | sed 's/[0-9][0-9]$//'` |
PY=`echo $PP | sed 's/[0-9][0-9]$//'` |
316 |
|
|
317 |
#INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD" |
#INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD" |
318 |
INDIR="/u/u0/httpd/html/testing/results/$PERIOD" |
INDIR="/u/u0/httpd/html/testing/results/$PERIOD" |
319 |
#INDIR="/export/export-7/u/u2/jmc/mitgcm/test_web/results/$PERIOD" |
#INDIR="/u/u2/jmc/mitgcm/test_web/results/$PERIOD" |
320 |
|
|
321 |
|
#- a short summary of this checking : |
322 |
|
OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'` |
323 |
|
OUTPSUM=`basename $0`"$OUTPSUM.txt" |
324 |
|
|
325 |
if test $OUTPFIL = '-1' ; then |
if test $OUTPFIL = '-1' ; then |
326 |
OUTPFIL='TTT.'$$ |
OUTPFIL='TTT.'$$ |
327 |
|
fi |
328 |
|
if test $t4update = 1 ; then |
329 |
|
if test -f $PRC_MAILS -a -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then |
330 |
|
#- if update-log-file is older than previous output summary, just return |
331 |
|
if test $PRC_MAILS -ot $OUTPSUM ; then |
332 |
|
echo ' '$CMDLINE | tee -a $OUTPSUM |
333 |
|
echo " t4update: skip "`basename $0`" ( $PRC_MAILS older than $OUTPSUM )" | tee -a $OUTPSUM |
334 |
|
echo " End time: "`date` | tee -a $OUTPSUM |
335 |
|
exit 0 |
336 |
|
else |
337 |
|
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
338 |
|
echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL |
339 |
|
fi |
340 |
|
elif test -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then |
341 |
|
echo ' '$CMDLINE | tee -a $OUTPSUM |
342 |
|
echo " t4update: skip "`basename $0`" ( $PRC_MAILS missing )" | tee -a $OUTPSUM |
343 |
|
echo " End time: "`date` | tee -a $OUTPSUM |
344 |
|
exit 0 |
345 |
|
else |
346 |
|
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
347 |
|
echo " t4update ignored (not current day or $OUTPSUM missing)" | tee $OUTPFIL |
348 |
|
fi |
349 |
elif test -e $OUTPFIL ; then |
elif test -e $OUTPFIL ; then |
350 |
mv -f $OUTPFIL $OUTPFIL'_bak' |
mv -f $OUTPFIL $OUTPFIL'_bak' |
351 |
|
touch $OUTPFIL |
352 |
fi |
fi |
353 |
echo "CMDLINE='$CMDLINE'" > $OUTPFIL |
if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi |
354 |
|
echo ' '$CMDLINE > $OUTPSUM |
355 |
|
|
356 |
|
echo "CMDLINE='$CMDLINE'" >> $OUTPFIL |
357 |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL |
358 |
echo "INDIR='$INDIR'" >> $OUTPFIL |
echo "INDIR='$INDIR'" >> $OUTPFIL |
359 |
echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL |
echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL |
360 |
|
echo " versus latest from before $BEFORE" >> $OUTPFIL |
361 |
|
|
362 |
if test $dBug = 't' ; then |
if test $dBug = 't' ; then |
363 |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" |
364 |
echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY'" |
echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY' , BEFORE='$BEFORE'" |
365 |
fi |
fi |
366 |
if test -d $INDIR ; then |
if test -d $INDIR ; then |
367 |
dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"` |
dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"` |
376 |
exit 3 |
exit 3 |
377 |
fi |
fi |
378 |
|
|
|
#- a short summary of this checking : |
|
|
OUTPSUM=`echo $FIRSTDAY | sed 's/^20../_/'` |
|
|
OUTPSUM=`basename $0`"$OUTPSUM.txt" |
|
|
if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi |
|
|
echo ' '$CMDLINE > $OUTPSUM |
|
|
|
|
379 |
if test $FIRSTDAY = $LASTDAY ; then |
if test $FIRSTDAY = $LASTDAY ; then |
380 |
echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM |
echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM |
381 |
else |
else |
382 |
echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM |
echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM |
383 |
fi |
fi |
384 |
echo " versus latest prior to this period" | tee -a $OUTPSUM |
if test $FIRSTDAY = $BEFORE ; then |
385 |
|
echo " versus latest prior to this period" | tee -a $OUTPSUM |
386 |
|
else |
387 |
|
echo " versus latest from before $BEFORE" | tee -a $OUTPSUM |
388 |
|
fi |
389 |
echo " Machine Tot. Nb. no Nb with Nb diff" >> $OUTPSUM |
echo " Machine Tot. Nb. no Nb with Nb diff" >> $OUTPSUM |
390 |
echo " name checked comp Diff lines" >> $OUTPSUM |
echo " name checked comp Diff lines" >> $OUTPSUM |
391 |
|
|
392 |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all |
393 |
|
|
394 |
if test "x$MACHINES" = "x_All_" ; then |
if test "x$MACHINES" = "x_All_" ; then |
395 |
MACHINES="faulks aces eddy bay meander lagoon hugo" |
MACHINES="aces- acesgrid baudelaire engaging svante glacier uv100 ollie stan1" |
396 |
MACHINES="$MACHINES columbia edvir rays solasrv sx8 xd1" |
MACHINES="$MACHINES pleiades archer stomp octopus saramago" |
|
MACHINES="$MACHINES beagle batsi starp" |
|
397 |
|
|
398 |
MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
399 |
for madd in $MALL ; do |
for madd in $MALL ; do |
400 |
present=0 |
present=0 |
401 |
for m in $MACHINES ; do |
for m in $MACHINES ; do |
402 |
echo $madd | grep $m > /dev/null 2>&1 |
mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'` |
403 |
RETVAL=$? |
echo $madd | grep $mm > /dev/null 2>&1 |
404 |
test $RETVAL = 0 && present=1 |
RETVAL=$? |
405 |
continue |
test $RETVAL = 0 && present=1 |
406 |
|
continue |
407 |
done |
done |
408 |
test $present = 0 && MACHINES="$MACHINES $madd" |
test $present = 0 && MACHINES="$MACHINES $madd" |
409 |
done |
done |
410 |
fi |
fi |
411 |
|
#echo "MACHINES=$MACHINES" ; exit |
412 |
|
|
413 |
for mname in $MACHINES ; do |
for pname in $MACHINES ; do |
|
|
|
|
if test $dBug = 't' ; then echo " $mname" ; fi |
|
|
echo " name='$mname'" >> $OUTPFIL |
|
|
ctot=0 ; cmis=0 ; cdif=0 |
|
|
|
|
|
# put results from selected period in "slist", |
|
|
# results from previous period in "plist" |
|
|
rm -f ./plist ./slist ; touch ./plist ./slist |
|
|
|
|
|
for n in $listNum ; do |
|
|
num1=`wc -l ./slist | awk '{print $1}'` |
|
|
num0=`wc -l ./plist | awk '{print $1}'` |
|
|
if test $n == 2 ; then |
|
|
num2=`expr $num1 \* $n` |
|
|
if [ $num0 -lt $num2 ] ; then |
|
|
dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )` |
|
|
#echo "dir_list='$dir_list'" |
|
|
fi |
|
|
else |
|
|
num2=$n |
|
|
dir_list=`grep $mname ./dir_all` |
|
|
fi |
|
|
if [ $num0 -lt $num2 ] ; then |
|
|
for i in $dir_list ; do |
|
414 |
|
|
415 |
dir=$INDIR"/"$i |
sname=`echo $pname | sed 's/-$//'` |
416 |
OPTFILE= |
mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'` |
417 |
if test -r $dir/summary.txt ; then |
sUser= |
418 |
comm=`grep 'OPTFILE=' $dir/summary.txt` |
if test $mname != $pname ; then |
419 |
eval $comm |
# to select results from user "sUser" |
420 |
OPTFILE=${OPTFILE##*/} |
sUser=`echo $pname | sed 's/\./ /g' | awk '{print $2}'` |
421 |
fi |
fi |
|
if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then |
|
|
comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null` |
|
|
eval $comm |
|
|
OPTFILE=${OPTFILE##*/} |
|
|
fi |
|
|
if test "x$OPTFILE" = x ; then |
|
|
comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1` |
|
|
comm=${comm##*#} |
|
|
eval $comm |
|
|
OPTFILE=${OPTFILE##*/} |
|
|
fi |
|
|
if test "x$OPTFILE" = x ; then |
|
|
OPTFILE="not_explicitly_specified" |
|
|
fi |
|
|
|
|
|
ADJOINT= |
|
|
RESTART=0 |
|
|
NOI3E=0 |
|
|
MTH=0 |
|
|
if test -r $dir/summary.txt ; then |
|
|
comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null` |
|
|
eval $comm |
|
|
RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` |
|
|
NOI3E=`grep -c "^run: .*testreport.* '*-noieee'* " $dir/summary.txt` |
|
|
MTH=`grep -c "^run: .*testreport.* -mth " $dir/summary.txt` |
|
|
fi |
|
|
if test "x$RESTART" = x0 ; then |
|
|
kind="forward" |
|
|
test "x$ADJOINT" = xtrue && kind="adjoint" |
|
|
else |
|
|
kind="restart" |
|
|
fi |
|
|
if test "x$NOI3E" = x1 ; then |
|
|
OPTFILE="${OPTFILE}.noieee" |
|
|
fi |
|
|
if test "x$MTH" = x1 ; then |
|
|
yy=`echo $OPTFILE | grep -c 'mth$'` |
|
|
if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi |
|
|
fi |
|
|
day=`echo $i | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` |
|
|
ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` |
|
|
day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'` |
|
|
|
|
|
if [ $day -lt $FIRSTDAY ] ; then |
|
|
echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist |
|
|
elif [ $day -le $LASTDAY ] ; then |
|
|
echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist |
|
|
else |
|
|
if test $dBug = 't' ; then |
|
|
echo "discard day='$day' from: $i" | tee -a $OUTPFIL |
|
|
fi |
|
|
fi |
|
422 |
|
|
423 |
done |
if test $dBug = 't' ; then echo " $pname" ; fi |
424 |
if test $dBug = 't' ; then |
echo " name='$pname'" >> $OUTPFIL |
425 |
if test $n == 1 ; then |
ctot=0 ; cmis=0 ; cdif=0 |
|
echo "---- current list (n=$n) :" | tee -a $OUTPFIL |
|
|
cat ./slist | tee -a $OUTPFIL |
|
|
fi |
|
|
echo ".... previous list (n=$n):" | tee -a $OUTPFIL |
|
|
cat ./plist | tee -a $OUTPFIL | head -20 |
|
|
fi |
|
426 |
|
|
427 |
fi |
# put results from selected period in "TMP.slist", |
428 |
done |
# results from previous period in "TMP.plist" |
429 |
if test $dBug = 't' ; then echo "----" | tee -a $OUTPFIL ; fi |
rm -f $TMP.plist $TMP.slist ; touch $TMP.plist $TMP.slist |
430 |
|
|
431 |
|
#- create list of results (slist & plist) from current month directory |
432 |
|
monthDir=1 |
433 |
|
make_resdir_list |
434 |
|
|
435 |
# Do we have any data? If so, create the latest pointer. |
# Do we have any data? If so, create the latest pointer. |
436 |
num=`wc -l ./slist | awk '{print $1}'` |
num=`wc -l $TMP.slist | awk '{print $1}'` |
437 |
if test $num -gt 0 ; then |
if test $num -gt 0 ; then |
438 |
|
|
439 |
keys=`cat ./slist | cut -d " " -f 1 | sort | uniq` |
keys=`cat $TMP.slist | cut -d " " -f 1 | sort | uniq` |
440 |
|
|
441 |
for key in $keys ; do |
for key in $keys ; do |
442 |
ctot=`expr $ctot + 1` |
ctot=`expr $ctot + 1` |
443 |
sline=`grep "^$key " ./slist | head -1` |
sline=`grep "^$key " $TMP.slist | head -1` |
444 |
sdir=`echo $sline | cut -d " " -f 5` |
sdir=`echo $sline | cut -d " " -f 5` |
445 |
kind=`echo $sline | cut -d " " -f 4` |
type=`echo $sline | cut -d " " -f 4` |
446 |
optf=`echo $sline | cut -d " " -f 3` |
optf=`echo $sline | cut -d " " -f 3` |
447 |
num=`grep -c "^$key" ./plist` |
num=`grep -c "^$key" $TMP.plist` |
448 |
|
if test $num = 0 -a $monthDir = 1 ; then |
449 |
|
#- add results from previous month directory to "plist". |
450 |
|
monthDir=2 |
451 |
|
make_resdir_list |
452 |
|
num=`grep -c "^$key" $TMP.plist` |
453 |
|
fi |
454 |
#- discard unsafe test: |
#- discard unsafe test: |
455 |
dd=`echo $optf | grep -c 'gfortran.*mth'` |
dd=`echo $optf | grep -c 'gfortran+mth'` |
456 |
#if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi |
if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi |
457 |
#if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi |
if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi |
458 |
#if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi |
#if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi |
459 |
#if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi |
#if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi |
460 |
if test $num -gt 0 ; then |
dd=`echo $optf | grep -c 'bigred.*noieee'` |
461 |
pline=`grep "^$key " ./plist | head -1` |
#if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi |
462 |
if test $dBug = 't' ; then |
if test $num -lt 0 ; then |
463 |
|
echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL |
464 |
|
cmis=`expr $cmis + 1` |
465 |
|
elif test $num = '0' ; then |
466 |
|
echo " dir='$sdir', type='$type', of='$optf':" | tee -a $OUTPFIL |
467 |
|
echo " --> no previous test matching key='$key'" | tee -a $OUTPFIL |
468 |
|
cmis=`expr $cmis + 1` |
469 |
|
else |
470 |
|
pline=`grep "^$key " $TMP.plist | head -1` |
471 |
|
if test $dBug = 't' ; then |
472 |
echo "s='$sline'" | tee -a $OUTPFIL |
echo "s='$sline'" | tee -a $OUTPFIL |
473 |
echo "p='$pline'" | tee -a $OUTPFIL |
echo "p='$pline'" | tee -a $OUTPFIL |
474 |
fi |
fi |
475 |
pdir=`echo $pline | cut -d " " -f 5` |
pdir=`echo $pline | cut -d " " -f 5` |
476 |
outs="$INDIR/$sdir/summary.txt" |
outs="$INDIR/$sdir/summary.txt" |
477 |
sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \ |
xx=`( echo 5 ; sed -n '/^ OPTFILE=/=' $outs ) | tail -1` |
478 |
| sed 's/ OPTFILE=.*\// OPTFILE=/g' \ |
sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \ |
479 |
| grep -v '^[A-S][a-t]* time: ' > tmpfs |
| grep -v '^[A-S][a-t]* time: ' > $TMP.fs |
480 |
outp="$INDIR/$pdir/summary.txt" |
outp="$INDIR/$pdir/summary.txt" |
481 |
sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \ |
xx=`( echo 5 ; sed -n '/^ OPTFILE=/=' $outp ) | tail -1` |
482 |
| sed 's/ OPTFILE=.*\// OPTFILE=/g' \ |
sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \ |
483 |
| grep -v '^[A-S][a-t]* time: ' > tmpfp |
| grep -v '^[A-S][a-t]* time: ' > $TMP.fp |
484 |
#-- re-order list of exp (according to local "sort" order) |
#-- check if list of exp are the same (and in the same order) |
485 |
listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs \ |
sed 's/ (e=.*, w=.*)$//' $TMP.fs > $TMP.fn |
486 |
| sed 's/^[YN] .*pass //' | sed 's/^[YN] .*FAIL //' \ |
listDs=`grep '^[YN] [YN] [YN] [YN]' $TMP.fn | awk '{print $NF}'` |
487 |
| sed 's/^[YN] .*N\/O //' | sort` |
#mv -f $TMP.fn $TMP.fs |
488 |
for xx in $listD |
rm -f $TMP.fn |
489 |
do |
sed 's/ (e=.*, w=.*)$//' $TMP.fp > $TMP.fn |
490 |
sed "/ $xx\$/d" tmpfs > tmpfn |
listDp=`grep '^[YN] [YN] [YN] [YN]' $TMP.fn | awk '{print $NF}'` |
491 |
sed -n "/ $xx\$/p" tmpfs >> tmpfn |
#mv -f $TMP.fn $TMP.fp |
492 |
mv tmpfn tmpfs |
rm -f $TMP.fn |
493 |
done |
#echo "listDs='$listDs'" ; echo "listDp='$listDp'" |
494 |
listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp \ |
if test "$listDs" != "$listDp" ; then |
495 |
| sed 's/^[YN] .*pass //' | sed 's/^[YN] .*FAIL //' \ |
if test $dBug = 't' ; then echo ' -> re-order list of exp' ; fi |
496 |
| sed 's/^[YN] .*N\/O //' | sort` |
#-- re-order list of exp (according to local "sort" order) |
497 |
for xx in $listD |
listDs=`echo "$listDs" | sort` |
498 |
do |
for xx in $listDs ; do |
499 |
sed "/ $xx\$/d" tmpfp > tmpfn |
sed -e "/ $xx\$/d" -e "/ $xx /d" $TMP.fs > $TMP.fn |
500 |
sed -n "/ $xx\$/p" tmpfp >> tmpfn |
sed -n -e "/ $xx\$/p" -e "/ $xx /p" $TMP.fs >> $TMP.fn |
501 |
mv tmpfn tmpfp |
mv -f $TMP.fn $TMP.fs |
502 |
done |
done |
503 |
|
listDp=`echo "$listDp" | sort` |
504 |
|
for xx in $listDp ; do |
505 |
|
sed -e "/ $xx\$/d" -e "/ $xx /d" $TMP.fp > $TMP.fn |
506 |
|
sed -n -e "/ $xx\$/p" -e "/ $xx /p" $TMP.fp >> $TMP.fn |
507 |
|
mv -f $TMP.fn $TMP.fp |
508 |
|
done |
509 |
|
#else |
510 |
|
# echo 'same list of exp => skip re-ordering' |
511 |
|
fi |
512 |
echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL |
echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL |
513 |
diff tmpfs tmpfp > tmpdf |
diff $TMP.fs $TMP.fp > $TMP.dif |
514 |
yy=$? |
yy=$? |
515 |
if test $yy != '0' ; then |
if test $yy != '0' ; then |
516 |
echo " $kind , of='$optf'" | tee -a $OUTPFIL |
echo " $type , of='$optf'" | tee -a $OUTPFIL |
517 |
#grep '^run: ' $outp |
#grep '^run: ' $outp |
518 |
#grep '^run: ' $outs |
#grep '^run: ' $outs |
519 |
#-- score for each test: |
#-- score for each test: |
520 |
grep '^[YN] [YN] [YN] [YN]' tmpfs > tmploc 2>/dev/null |
grep '^[YN] [YN] [YN] [YN]' $TMP.fs > tmploc 2>/dev/null |
521 |
t_tot=`cat tmploc | wc -l | sed -e 's| ||g'` |
t_tot=`cat tmploc | wc -l | sed -e 's| ||g'` |
522 |
t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'` |
t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'` |
523 |
score_s=`printf '%2i' $t_pass`":$t_tot" |
score_s=`printf '%2i' $t_pass`":$t_tot" |
524 |
grep '^[YN] [YN] [YN] [YN]' tmpfp > tmploc 2>/dev/null |
grep '^[YN] [YN] [YN] [YN]' $TMP.fp > tmploc 2>/dev/null |
525 |
t_tot=`cat tmploc | wc -l | sed -e 's| ||g'` |
t_tot=`cat tmploc | wc -l | sed -e 's| ||g'` |
526 |
t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'` |
t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'` |
527 |
score_p=`printf '%2i' $t_pass`":$t_tot" |
score_p=`printf '%2i' $t_pass`":$t_tot" |
528 |
rm -f tmploc |
rm -f tmploc |
529 |
#-- count Nb of different lines |
#-- count Nb of different lines |
530 |
ndf=`wc -l tmpdf | awk '{print $1}'` |
ndf=`wc -l $TMP.dif | awk '{print $1}'` |
531 |
ndf=`expr $ndf / 2` |
ndf=`expr $ndf / 2` |
532 |
nn=`grep -c '^---' tmpdf` |
nn=`grep -c '^---' $TMP.dif` |
533 |
ndf=`expr $ndf - $nn` |
ndf=`expr $ndf - $nn` |
534 |
if [ $ndf -le $NBLDIFF ] ; then |
if [ $ndf -le $NBLDIFF ] ; then |
535 |
cat tmpdf |
cat $TMP.dif |
536 |
else |
else |
537 |
echo " $ndf lines differ ( $score_s , $score_p )" |
echo " $ndf lines differ ( $score_s , $score_p )" |
538 |
fi |
fi |
539 |
echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL |
echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL |
540 |
echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL |
echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL |
541 |
cat tmpdf >> $OUTPFIL |
cat $TMP.dif >> $OUTPFIL |
542 |
if [ $cdif -eq 0 ] ; then |
if [ $cdif -eq 0 ] ; then |
543 |
clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
544 |
else |
else |
545 |
clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
546 |
fi |
fi |
547 |
cdif=`expr $cdif + 1` |
cdif=`expr $cdif + 1` |
548 |
echo '----------------------------------------' | tee -a $OUTPFIL |
echo '----------------------------------------' | tee -a $OUTPFIL |
549 |
else |
else |
550 |
echo "" | tee -a $OUTPFIL |
echo " $type , of='$optf'" | tee -a $OUTPFIL |
551 |
fi |
fi |
552 |
rm -f tmpfs tmpfp tmpdf |
rm -f $TMP.fs $TMP.fp $TMP.dif |
553 |
elif test $num = '0' ; then |
fi |
|
echo "no previous test for:" $key | tee -a $OUTPFIL |
|
|
cmis=`expr $cmis + 1` |
|
|
else |
|
|
cmis=`expr $cmis + 1` |
|
|
fi |
|
554 |
done |
done |
555 |
if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi |
if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi |
556 |
printf '%11s : %3i %4s %3i ' $mname $ctot $tmis $cdif >> $OUTPSUM |
printf '%11s : %3i %4s %3i ' $sname $ctot $tmis $cdif >> $OUTPSUM |
557 |
if [ $cdif -gt 0 ] ; then |
if [ $cdif -gt 0 ] ; then |
558 |
echo " $clin" >> $OUTPSUM |
echo " $clin" >> $OUTPSUM |
559 |
else echo "" >> $OUTPSUM ; fi |
else echo "" >> $OUTPSUM ; fi |
560 |
fi |
fi |
561 |
|
|
562 |
done |
done |
563 |
|
|
564 |
echo "Start time: $sTime" | tee -a $OUTPFIL |
echo "Start time: $sTime" | tee -a $OUTPFIL |
565 |
echo "End time: "`date` | tee -a $OUTPFIL | tee -a $OUTPSUM |
echo "End time: "`date` | tee -a $OUTPFIL | tee -a $OUTPSUM |
566 |
|
|
567 |
rm -f ./dir_all ./slist ./plist |
rm -f $TMP.dir_all $TMP.slist $TMP.plist |
568 |
if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi |
if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi |
569 |
if test "x$ADDRESS" != 'xnone' ; then |
if test "x$ADDRESS" != 'xnone' ; then |
570 |
echo ".. send $OUTPSUM to $ADDRESS" |
#- change default sender address ("From:") using "mail -r" option |
571 |
mail -s $OUTPSUM $ADDRESS < $OUTPSUM |
# since, by default, baudelaire uses USER@localhost.localdomain |
572 |
|
#fullNam=`hostname -A | awk '{print $1}'` |
573 |
|
#MAILCMD="$MAILCMD -r ${USER}@${fullNam}" |
574 |
|
#--- |
575 |
|
echo ".. send $OUTPSUM to '$ADDRESS' using '$MAILCMD'" |
576 |
|
$MAILCMD -s 'check_outp summary' $ADDRESS < $OUTPSUM |
577 |
fi |
fi |
578 |
echo ".. cat $OUTPSUM" |
echo ".. cat $OUTPSUM" |
579 |
cat $OUTPSUM |
cat $OUTPSUM |