11 |
{ |
{ |
12 |
echo |
echo |
13 |
echo "Usage: $0 [OPTIONS]" |
echo "Usage: $0 [OPTIONS]" |
14 |
echo |
echo |
15 |
echo "where possible OPTIONS are:" |
echo "where possible OPTIONS are:" |
16 |
echo " (-h|-help) print usage" |
echo " (-h|-help) print usage" |
17 |
echo " (-v|-verbose) verbose mode" |
echo " (-v|-verbose) verbose mode" |
28 |
echo " [def=\"$NBLDIFF\"]" |
echo " [def=\"$NBLDIFF\"]" |
29 |
echo " (-a |-addr )ADDRESS send summary to mail ADDRESS list" |
echo " (-a |-addr )ADDRESS send summary to mail ADDRESS list" |
30 |
echo " [def=\"$ADDRESS\"]" |
echo " [def=\"$ADDRESS\"]" |
31 |
echo |
echo |
32 |
exit 1 |
exit 1 |
33 |
} |
} |
34 |
|
|
36 |
make_resdir_list() |
make_resdir_list() |
37 |
{ |
{ |
38 |
if test $monthDir == 1 ; then |
if test $monthDir == 1 ; then |
39 |
dir_list=`grep $mname ./dir_all` |
dir_list=`grep '.._'$mname ./dir_all` |
40 |
else |
else |
41 |
dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )` |
dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/??_*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )` |
42 |
#echo "dir_list='$dir_list'" |
#echo "dir_list='$dir_list'" |
43 |
fi |
fi |
44 |
for i in $dir_list ; do |
for i in $dir_list ; do |
45 |
|
|
46 |
dir=$INDIR"/"$i |
dir=$INDIR"/"$i |
47 |
|
#--- get the opfile used to run testreport |
48 |
OPTFILE= |
OPTFILE= |
49 |
if test -r $dir/summary.txt ; then |
if test -r $dir/summary.txt ; then |
50 |
comm=`grep 'OPTFILE=' $dir/summary.txt` |
comm=`grep 'OPTFILE=' $dir/summary.txt` |
51 |
eval $comm |
eval $comm |
|
OPTFILE=${OPTFILE##*/} |
|
52 |
fi |
fi |
53 |
if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then |
if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then |
54 |
comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null` |
comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null` |
55 |
eval $comm |
eval $comm |
|
OPTFILE=${OPTFILE##*/} |
|
56 |
fi |
fi |
57 |
if test "x$OPTFILE" = x ; then |
if test "x$OPTFILE" = x ; then |
58 |
comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1` |
comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1` |
59 |
comm=${comm##*#} |
comm=${comm##*#} |
60 |
eval $comm |
eval $comm |
|
OPTFILE=${OPTFILE##*/} |
|
61 |
fi |
fi |
62 |
if test "x$OPTFILE" = x ; then |
if test "x$OPTFILE" = x ; then |
63 |
OPTFILE="not_explicitly_specified" |
OPTFILE="not_explicitly_specified" |
64 |
|
else |
65 |
|
OPTFILE=${OPTFILE##*/} |
66 |
|
fi |
67 |
|
#--- case select test run by 1 user: get user who did run testreport |
68 |
|
if test "x$sUser" != x ; then |
69 |
|
tUser= |
70 |
|
if test -f $dir/genmake_state ; then |
71 |
|
nn=`sed -n '/^# executed by:/=' $dir/genmake_state` |
72 |
|
if test "x$nn" != x ; then |
73 |
|
nn=`expr $nn + 1` |
74 |
|
tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'` |
75 |
|
fi |
76 |
|
fi |
77 |
|
if test "x$tUser" = "x" ; then |
78 |
|
mkfile=`ls $dir/*/Makefile* 2>/dev/null | head -1` |
79 |
|
if test "x$mkfile" = 'x' ; then |
80 |
|
echo "no Makefile => discard test from: $i" | tee -a $OUTPFIL |
81 |
|
continue |
82 |
|
fi |
83 |
|
nn=`sed -n '/^# executed by:/=' $mkfile` |
84 |
|
if test "x$nn" != x ; then |
85 |
|
nn=`expr $nn + 1` |
86 |
|
tUser=`sed -n "$nn s/^# *// p" $mkfile | sed 's/@.*$//'` |
87 |
|
fi |
88 |
|
fi |
89 |
|
if test "x$tUser" = x ; then |
90 |
|
echo "no User found => discard test from: $i" | tee -a $OUTPFIL |
91 |
|
continue |
92 |
|
fi |
93 |
|
if test $tUser != $sUser ; then |
94 |
|
if test $dBug = 't' ; then |
95 |
|
echo " discard test from: $i" | tee -a $OUTPFIL |
96 |
|
fi |
97 |
|
continue |
98 |
|
fi |
99 |
fi |
fi |
100 |
|
|
101 |
ADJOINT= |
ADJOINT= |
265 |
echo "INDIR='$INDIR'" >> $OUTPFIL |
echo "INDIR='$INDIR'" >> $OUTPFIL |
266 |
echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL |
echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL |
267 |
|
|
268 |
if test $dBug = 't' ; then |
if test $dBug = 't' ; then |
269 |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" |
echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" |
270 |
echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY'" |
echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY'" |
271 |
fi |
fi |
300 |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all |
301 |
|
|
302 |
if test "x$MACHINES" = "x_All_" ; then |
if test "x$MACHINES" = "x_All_" ; then |
303 |
MACHINES="faulks meander lagoon aces dickens danton beagle harbor" |
MACHINES="faulks meander lagoon aces.jmc aces.ce107 dickens danton beagle harbor" |
304 |
MACHINES="$MACHINES columbia pleiades iblade rays solssrv solasrv sx8" |
MACHINES="$MACHINES columbia pleiades iblade rays solssrv solasrv sx8" |
305 |
MACHINES="$MACHINES trane dodongo dokdo bigred" |
MACHINES="$MACHINES trane dodongo dokdo bigred" |
306 |
|
|
308 |
for madd in $MALL ; do |
for madd in $MALL ; do |
309 |
present=0 |
present=0 |
310 |
for m in $MACHINES ; do |
for m in $MACHINES ; do |
311 |
echo $madd | grep $m > /dev/null 2>&1 |
mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'` |
312 |
|
echo $madd | grep $mm > /dev/null 2>&1 |
313 |
RETVAL=$? |
RETVAL=$? |
314 |
test $RETVAL = 0 && present=1 |
test $RETVAL = 0 && present=1 |
315 |
continue |
continue |
317 |
test $present = 0 && MACHINES="$MACHINES $madd" |
test $present = 0 && MACHINES="$MACHINES $madd" |
318 |
done |
done |
319 |
fi |
fi |
320 |
|
#echo "MACHINES=$MACHINES" ; exit |
321 |
|
|
322 |
for mname in $MACHINES ; do |
for pname in $MACHINES ; do |
323 |
|
|
324 |
if test $dBug = 't' ; then echo " $mname" ; fi |
mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'` |
325 |
echo " name='$mname'" >> $OUTPFIL |
sUser= |
326 |
|
if test $mname != $pname ; then |
327 |
|
# to select results from user "sUser" |
328 |
|
sUser=`echo $pname | sed 's/\./ /g' | awk '{print $2}'` |
329 |
|
fi |
330 |
|
|
331 |
|
if test $dBug = 't' ; then echo " $pname" ; fi |
332 |
|
echo " name='$pname'" >> $OUTPFIL |
333 |
ctot=0 ; cmis=0 ; cdif=0 |
ctot=0 ; cmis=0 ; cdif=0 |
334 |
|
|
335 |
# put results from selected period in "slist", |
# put results from selected period in "slist", |
336 |
# results from previous period in "plist" |
# results from previous period in "plist" |
337 |
rm -f ./plist ./slist ; touch ./plist ./slist |
rm -f ./plist ./slist ; touch ./plist ./slist |
338 |
|
|
361 |
fi |
fi |
362 |
#- discard unsafe test: |
#- discard unsafe test: |
363 |
dd=`echo $optf | grep -c 'gfortran+mth'` |
dd=`echo $optf | grep -c 'gfortran+mth'` |
364 |
#if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi |
if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi |
365 |
#if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi |
if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi |
366 |
#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 |
367 |
#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 |
368 |
dd=`echo $optf | grep -c 'bigred.*+mth'` |
dd=`echo $optf | grep -c 'bigred.*+mth'` |
369 |
#if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi |
if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi |
370 |
if test $num -lt 0 ; then |
if test $num -lt 0 ; then |
371 |
echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL |
echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL |
372 |
cmis=`expr $cmis + 1` |
cmis=`expr $cmis + 1` |
375 |
cmis=`expr $cmis + 1` |
cmis=`expr $cmis + 1` |
376 |
else |
else |
377 |
pline=`grep "^$key " ./plist | head -1` |
pline=`grep "^$key " ./plist | head -1` |
378 |
if test $dBug = 't' ; then |
if test $dBug = 't' ; then |
379 |
echo "s='$sline'" | tee -a $OUTPFIL |
echo "s='$sline'" | tee -a $OUTPFIL |
380 |
echo "p='$pline'" | tee -a $OUTPFIL |
echo "p='$pline'" | tee -a $OUTPFIL |
381 |
fi |
fi |
433 |
echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL |
echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL |
434 |
echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL |
echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL |
435 |
cat tmpdf >> $OUTPFIL |
cat tmpdf >> $OUTPFIL |
436 |
if [ $cdif -eq 0 ] ; then |
if [ $cdif -eq 0 ] ; then |
437 |
clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
438 |
else |
else |
439 |
clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p` |
440 |
fi |
fi |
441 |
cdif=`expr $cdif + 1` |
cdif=`expr $cdif + 1` |
447 |
fi |
fi |
448 |
done |
done |
449 |
if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi |
if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi |
450 |
printf '%11s : %3i %4s %3i ' $mname $ctot $tmis $cdif >> $OUTPSUM |
printf '%11s : %3i %4s %3i ' $pname $ctot $tmis $cdif >> $OUTPSUM |
451 |
if [ $cdif -gt 0 ] ; then |
if [ $cdif -gt 0 ] ; then |
452 |
echo " $clin" >> $OUTPSUM |
echo " $clin" >> $OUTPSUM |
453 |
else echo "" >> $OUTPSUM ; fi |
else echo "" >> $OUTPSUM ; fi |
454 |
fi |
fi |
455 |
|
|