/[MITgcm]/mitgcm.org/scripts/check_outp
ViewVC logotype

Diff of /mitgcm.org/scripts/check_outp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by jmc, Thu Apr 9 18:34:18 2009 UTC revision 1.28 by jmc, Wed Jun 29 14:00:59 2011 UTC
# Line 11  usage() Line 11  usage()
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"
# Line 22  usage() Line 22  usage()
22      echo "                         [def=\"$FIRSTDAY\"]"      echo "                         [def=\"$FIRSTDAY\"]"
23      echo "  (-u |-upto )LASTDAY   until last day=\"YYYYMMDD\" (=selected period)"      echo "  (-u |-upto )LASTDAY   until last day=\"YYYYMMDD\" (=selected period)"
24      echo "                         [def=\"FIRSTDAY\"]"      echo "                         [def=\"FIRSTDAY\"]"
25        echo "  (-b |-before)BEFORE   compare with output from before \"YYYYMMDD\""
26        echo "                         (=previous period) [def=\"FIRSTDAY\"]"
27      echo "  (-o |-outp )OUTPFIL   output file (-1 removed when exit)"      echo "  (-o |-outp )OUTPFIL   output file (-1 removed when exit)"
28      echo "                         [def=\"$OUTPFIL\"]"      echo "                         [def=\"$OUTPFIL\"]"
29      echo "  (-n |-nldf )NBLDIFF   max number of diff lines to echo"      echo "  (-n |-nldf )NBLDIFF   max number of diff lines to echo"
30      echo "                         [def=\"$NBLDIFF\"]"      echo "                         [def=\"$NBLDIFF\"]"
31      echo "  (-a |-addr )ADDRESS   send summary to mail ADDRESS list"      echo "  (-a |-addr )ADDRESS   send summary to mail ADDRESS list"
32      echo "                         [def=\"$ADDRESS\"]"      echo "                         [def=\"$ADDRESS\"]"
33      echo      echo
34      exit 1      exit 1
35  }  }
36    
37    #  create list of results dir for one platform:
38    make_resdir_list()
39    {
40          if test $monthDir == 1 ; then
41            dir_list=`grep '.._'$mname ./dir_all`
42          else
43            dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/??_*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )`
44            #echo "dir_list='$dir_list'"
45          fi
46            for i in $dir_list ; do
47    
48                dir=$INDIR"/"$i
49                #--- get the opfile used to run testreport
50                OPTFILE=
51                if test -r $dir/summary.txt ; then
52                    comm=`grep 'OPTFILE=' $dir/summary.txt`
53                    eval $comm
54                fi
55                if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then
56                    comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null`
57                    eval $comm
58                fi
59                if test "x$OPTFILE" = x ; then
60                    comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1`
61                    comm=${comm##*#}
62                    eval $comm
63                fi
64                if test "x$OPTFILE" = x ; then
65                    OPTFILE="not_explicitly_specified"
66                else
67                    OPTFILE=${OPTFILE##*/}
68                fi
69                #--- case select test run by 1 user: get user who did run testreport
70                if test "x$sUser" != x ; then
71                    tUser=
72                    if test -f $dir/genmake_state ; then
73                       nn=`sed -n '/^# executed by:/=' $dir/genmake_state`
74                       if test "x$nn" != x ; then
75                         nn=`expr $nn + 1`
76                         tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'`
77                       fi
78                    fi
79                    if test "x$tUser" = "x" ; then
80                       mkfile=`ls $dir/*/Makefile* 2>/dev/null | head -1`
81                       if test "x$mkfile" = 'x' ; then
82                         echo "no Makefile => discard test from: $i" | tee -a $OUTPFIL
83                         continue
84                       fi
85                       nn=`sed -n '/^# executed by:/=' $mkfile`
86                       if test "x$nn" != x ; then
87                         nn=`expr $nn + 1`
88                         tUser=`sed -n "$nn s/^# *// p" $mkfile | sed 's/@.*$//'`
89                       fi
90                    fi
91                    if test "x$tUser" = x ; then
92                         echo "no User found => discard test from: $i" | tee -a $OUTPFIL
93                         continue
94                    fi
95                    if test $tUser != $sUser ; then
96                       if test $dBug = 't' ; then
97                            echo "  discard test from: $i" | tee -a $OUTPFIL
98                       fi
99                       continue
100                    fi
101                fi
102    
103                ADJOINT=
104                RESTART=0
105                FAST=0
106                DVLP=0
107                MTH=0
108                if test -r $dir/summary.txt ; then
109                    comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
110                    eval $comm
111                    RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
112                    FAST=`grep -c "^run: .*testreport.* '*-fast'*" $dir/summary.txt`
113                    if test "x$FAST" = x0 ; then
114                       FAST=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`
115                    fi
116                    DVLP=`grep -c "^run: .*testreport.* '*-devel'*" $dir/summary.txt`
117                    MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`
118                fi
119                if test "x$RESTART" = x0 ; then
120                    kind="forward"
121                    test "x$ADJOINT" = xtrue  &&  kind="adjoint"
122                else
123                    kind="restart"
124                fi
125                if test "x$MTH" = x1 ; then
126                    yy=`echo $OPTFILE | grep -c '+mth$'`
127                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
128                fi
129                if test "x$FAST" = x1 ; then
130                    OPTFILE="${OPTFILE}.fast"
131                fi
132                if test "x$DVLP" = x1 ; then
133                    OPTFILE="${OPTFILE}.dvlp"
134                fi
135                day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
136                ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
137                day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
138    
139                if [ $day -lt $BEFORE ] ; then
140                    echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist
141                elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
142                    echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist
143                else
144                    if test $dBug = 't' ; then
145                       echo "discard day='$day' from: $i" | tee -a $OUTPFIL
146                    fi
147                fi
148    
149            done
150            if test $dBug = 't' ; then
151              if test $monthDir == 1 ; then
152                echo "---- current list (n=$monthDir) :" | tee -a $OUTPFIL
153                    cat ./slist | tee -a $OUTPFIL
154              fi
155              num1=`wc -l ./slist | awk '{print $1}'`
156              if test $num1 -gt 0 ; then
157              echo   ".... previous list (n=$monthDir):" | tee -a $OUTPFIL
158                    cat ./plist | tee -a $OUTPFIL | head -20
159              fi
160              echo "----" | tee -a $OUTPFIL
161            fi
162    }
163    
164    #--------------------------------------------------------------------------
165    # here starts the sequential part of the script:
166    
167  #CURR_PER=`date +%Y`"_"`date +%m`  #CURR_PER=`date +%Y`"_"`date +%m`
168  CURR_DAY=`date +%Y%m%d`  CURR_DAY=`date +%Y%m%d`
169  # defaults  # defaults
170  MACHINES='_All_'  MACHINES='_All_'
171  FIRSTDAY=$CURR_DAY  FIRSTDAY=$CURR_DAY
172  LASTDAY="30000000"  LASTDAY="30000000"
173    BEFORE="30000000"
174  OUTPFIL=`basename $0`'.log'  OUTPFIL=`basename $0`'.log'
175  NBLDIFF=5  NBLDIFF=5
176  ADDRESS='none'  ADDRESS='none'
177  dBug=f  dBug=f
178  sTime=`date`  sTime=`date`
179    #- to get case insensitive "ls" (and order of tested experiments)
180    export LC_ALL="en_US.UTF-8"
181    
182  #  Parse options  #  Parse options
183  ac_prev=  ac_prev=
# Line 59  for ac_option ; do Line 194  for ac_option ; do
194    
195      case $ac_option in      case $ac_option in
196                    
197          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
198              usage ;;          -verbose | --verbose | -v | --v) dBug=t ;;
         -verbose | --verbose | -v | --v)  
             dBug=t ;;  
199                    
200          -list  | --list  | -l | --l)          -list  | --list  | -l | --l) ac_prev=MACHINES ;;
201              ac_prev=MACHINES ;;          -list=* | --list=*) MACHINES=$ac_optarg ;;
202          -list=* | --list=*)  
203              MACHINES=$ac_optarg ;;          -day  | --day  | -d | --d) ac_prev=FIRSTDAY ;;
204            -day=* | --day=*) FIRSTDAY=$ac_optarg ;;
205          -day  | --day  | -d | --d)  
206              ac_prev=FIRSTDAY ;;          -upto | --upto | -u | --u) ac_prev=LASTDAY ;;
207          -day=* | --day=*)          -upto=* | --upto=*) LASTDAY=$ac_optarg ;;
208              FIRSTDAY=$ac_optarg ;;  
209            -before | --before | -b | --b) ac_prev=BEFORE ;;
210          -upto | --upto | -u | --u)          -before=* | --before=*) BEFORE=$ac_optarg ;;
211              ac_prev=LASTDAY ;;  
212          -upto=* | --upto=*)          -outp | --outp | -o | --o) ac_prev=OUTPFIL ;;
213              LASTDAY=$ac_optarg ;;          -outp=* | --outp=*) OUTPFIL=$ac_optarg ;;
214    
215          -outp | --outp | -o | --o)          -nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;;
216              ac_prev=OUTPFIL ;;          -nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;;
217          -outp=* | --outp=*)  
218              OUTPFIL=$ac_optarg ;;          -addr | --addr | -a | --a) ac_prev=ADDRESS ;;
219            -addr=* | --addr=*) ADDRESS=$ac_optarg ;;
220          -nldf | --nldf | -n | --n)  
221              ac_prev=NBLDIFF ;;          *) echo "Error: don't understand argument \"$ac_option\""
222          -nldf=* | --nldf=*)             usage ;;
             NBLDIFF=$ac_optarg ;;  
   
         -addr | --addr | -a | --a)  
             ac_prev=ADDRESS ;;  
         -addr=* | --addr=*)  
             ADDRESS=$ac_optarg ;;  
   
         *)  
             echo "Error: don't understand argument \"$ac_option\""  
             usage  
             ;;  
223    
224       esac       esac
225    
# Line 113  if test "x$ttt" != 'xyz' ; then Line 235  if test "x$ttt" != 'xyz' ; then
235    exit 2    exit 2
236  fi  fi
237  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi
238    if test  $BEFORE = "30000000" ; then  BEFORE=$FIRSTDAY ; fi
239  CMDLINE=$0  CMDLINE=$0
240  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
241    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"
242                        else CMDLINE="$CMDLINE '$xx'" ; fi                        else CMDLINE="$CMDLINE '$xx'" ; fi
243  done  done
244    
245  PERIOD=`echo $FIRSTDAY | sed 's/[0-9][0-9]$//'`  PERIOD=`echo $LASTDAY | sed 's/[0-9][0-9]$//'`
246  PP=`expr $PERIOD - 1`  PP=`expr $PERIOD - 1`
247  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]//'`
248  PY=`echo $PP | sed 's/[0-9][0-9]$//'`  PY=`echo $PP | sed 's/[0-9][0-9]$//'`
# Line 140  echo "CMDLINE='$CMDLINE'" > $OUTPFIL Line 263  echo "CMDLINE='$CMDLINE'" > $OUTPFIL
263  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL
264  echo "INDIR='$INDIR'" >> $OUTPFIL  echo "INDIR='$INDIR'" >> $OUTPFIL
265  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL
266    echo "  versus latest from before $BEFORE" >> $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' , BEFORE='$BEFORE'"
271  fi  fi
272  if test -d $INDIR ; then  if test -d $INDIR ; then
273    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`
# Line 159  else Line 283  else
283  fi  fi
284    
285  #- a short summary of this checking :  #- a short summary of this checking :
286  OUTPSUM=`echo $FIRSTDAY | sed 's/^20../_/'`  OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`
287  OUTPSUM=`basename $0`"$OUTPSUM.txt"  OUTPSUM=`basename $0`"$OUTPSUM.txt"
288  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi
289  echo ' '$CMDLINE > $OUTPSUM  echo ' '$CMDLINE > $OUTPSUM
# Line 169  if test $FIRSTDAY = $LASTDAY ; then Line 293  if test $FIRSTDAY = $LASTDAY ; then
293  else  else
294    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM
295  fi  fi
296  echo " versus latest prior to this period" | tee -a $OUTPSUM  if test $FIRSTDAY = $BEFORE ; then
297      echo " versus latest prior to this period" | tee -a $OUTPSUM
298    else
299      echo " versus latest from before $BEFORE" | tee -a $OUTPSUM
300    fi
301  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM
302  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM
303    
304  ( 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
305    
306  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
307    MACHINES="faulks aces eddy bay meander lagoon hugo"    MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor"
308    MACHINES="$MACHINES columbia edvir rays solasrv sx8 xd1"    MACHINES="$MACHINES pleiades iblade rays solasrv sx8"
309    MACHINES="$MACHINES beagle batsi starp"    MACHINES="$MACHINES trane dodongo dokdo stomp bigred"
310    
311    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
312    for madd in $MALL ; do    for madd in $MALL ; do
313      present=0      present=0
314      for m in $MACHINES ; do      for m in $MACHINES ; do
315          echo $madd | grep $m > /dev/null 2>&1          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`
316          RETVAL=$?          echo $madd | grep $mm > /dev/null 2>&1
317          test $RETVAL = 0  &&  present=1          RETVAL=$?
318          continue          test $RETVAL = 0  &&  present=1
319            continue
320      done      done
321      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
322    done    done
323  fi  fi
324    #echo "MACHINES=$MACHINES" ; exit
325    
326  for mname in $MACHINES ; do  for pname in $MACHINES ; do
327    
328      if test $dBug = 't' ; then echo "  $mname" ; fi      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
329      echo " name='$mname'" >> $OUTPFIL      sUser=
330        if test $mname != $pname ; then
331          # to select results from user "sUser"
332          sUser=`echo $pname | sed 's/\./ /g' | awk '{print $2}'`
333        fi
334    
335        if test $dBug = 't' ; then echo "  $pname" ; fi
336        echo " name='$pname'" >> $OUTPFIL
337      ctot=0 ; cmis=0 ; cdif=0      ctot=0 ; cmis=0 ; cdif=0
338    
339      # put results from selected period in "slist",      # put results from selected period in "slist",
340      #     results from previous period in "plist"      #     results from previous period in "plist"
341      rm -f ./plist ./slist ; touch ./plist ./slist      rm -f ./plist ./slist ; touch ./plist ./slist
342    
343      for n in $listNum ; do      #- create list of results (slist & plist) from current month directory
344        num1=`wc -l ./slist | awk '{print $1}'`      monthDir=1
345        num0=`wc -l ./plist | awk '{print $1}'`      make_resdir_list
       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  
   
             dir=$INDIR"/"$i  
             OPTFILE=  
             if test -r $dir/summary.txt ; then  
                 comm=`grep 'OPTFILE=' $dir/summary.txt`  
                 eval $comm  
                 OPTFILE=${OPTFILE##*/}  
             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  
             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`  
             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  
             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  
   
         done  
         if test $dBug = 't' ; then  
           if test $n == 1 ; then  
             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  
         fi  
   
       fi  
     done  
     if test $dBug = 't' ; then echo "----" | tee -a $OUTPFIL ; fi  
346    
347      #  Do we have any data?  If so, create the latest pointer.      #  Do we have any data?  If so, create the latest pointer.
348      num=`wc -l ./slist | awk '{print $1}'`      num=`wc -l ./slist | awk '{print $1}'`
# Line 296  for mname in $MACHINES ; do Line 353  for mname in $MACHINES ; do
353          for key in $keys ; do          for key in $keys ; do
354            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
355            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " ./slist | head -1`
356            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
357            kind=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
358            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
359            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
360              if test $num = 0 -a $monthDir = 1 ; then
361              #- add results from previous month directory to "plist".
362                monthDir=2
363                make_resdir_list
364                num=`grep -c "^$key" ./plist`
365              fi
366            #- discard unsafe test:            #- discard unsafe test:
367            dd=`echo $optf | grep -c 'gfortran.*mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
368            if test $dd = 1 -a $mname = lagoon ; then num=-1 ; fi            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi
369            if test $num -gt 0 ; then            if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi
370              #if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi
371              #if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi
372              dd=`echo $optf | grep -c 'bigred.*noieee'`
373              if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
374              if test $num -lt 0 ; then
375                echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
376                cmis=`expr $cmis + 1`
377              elif test $num = '0' ; then
378                echo "no previous test for:" $key | tee -a $OUTPFIL
379                cmis=`expr $cmis + 1`
380              else
381              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
382              if test $dBug = 't' ; then              if test $dBug = 't' ; then
383                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
384                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
385              fi              fi
386              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
387              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
388              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
389                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
390                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs
391              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
392              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
393                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
394                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp
395                #-- re-order list of exp (according to local "sort" order)
396                listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`
397                for xx in $listD
398                do
399                    sed "/ $xx\$/d" tmpfs > tmpfn
400                    sed -n "/ $xx\$/p" tmpfs >> tmpfn
401                    mv tmpfn tmpfs
402                done
403                listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp | awk '{print $NF}' | sort`
404                for xx in $listD
405                do
406                    sed "/ $xx\$/d" tmpfp > tmpfn
407                    sed -n "/ $xx\$/p" tmpfp >> tmpfn
408                    mv tmpfn tmpfp
409                done
410              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL
411              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
412              yy=$?              yy=$?
413              if test $yy != '0' ; then              if test $yy != '0' ; then
414                  echo " $kind , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
415                  #grep '^run: ' $outp                  #grep '^run: ' $outp
416                  #grep '^run: ' $outs                  #grep '^run: ' $outs
417                  #-- score for each test:                  #-- score for each test:
# Line 340  for mname in $MACHINES ; do Line 429  for mname in $MACHINES ; do
429                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
430                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' tmpdf`
431                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
432                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
433                    cat tmpdf                    cat tmpdf
434                  else                  else
435                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
# Line 348  for mname in $MACHINES ; do Line 437  for mname in $MACHINES ; do
437                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
438                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
439                  cat tmpdf >> $OUTPFIL                  cat tmpdf >> $OUTPFIL
440                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
441                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
442                  else                  else
443                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
444                  fi                  fi
445                  cdif=`expr $cdif + 1`                  cdif=`expr $cdif + 1`
446                  echo '----------------------------------------' | tee -a $OUTPFIL                  echo '----------------------------------------' | tee -a $OUTPFIL
447              else              else
448                  echo "" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
449              fi              fi
450              rm -f tmpfs tmpfp tmpdf              rm -f tmpfs tmpfp tmpdf
451            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  
452          done          done
453          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
454          printf '%11s :  %3i      %4s   %3i  ' $mname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM
455          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
456            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
457         else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi
458      fi      fi
459    
460  done  done

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.22