/[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.10 by jmc, Thu May 21 15:42:46 2009 UTC revision 1.27 by jmc, Fri Jan 21 19:45:01 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                NOI3E=0
106                MTH=0
107                if test -r $dir/summary.txt ; then
108                    comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
109                    eval $comm
110                    RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
111                    NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`
112                    MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`
113                fi
114                if test "x$RESTART" = x0 ; then
115                    kind="forward"
116                    test "x$ADJOINT" = xtrue  &&  kind="adjoint"
117                else
118                    kind="restart"
119                fi
120                if test "x$MTH" = x1 ; then
121                    yy=`echo $OPTFILE | grep -c '+mth$'`
122                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
123                fi
124                if test "x$NOI3E" = x1 ; then
125                    OPTFILE="${OPTFILE}.noieee"
126                fi
127                day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
128                ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
129                day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
130    
131                if [ $day -lt $BEFORE ] ; then
132                    echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist
133                elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
134                    echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist
135                else
136                    if test $dBug = 't' ; then
137                       echo "discard day='$day' from: $i" | tee -a $OUTPFIL
138                    fi
139                fi
140    
141            done
142            if test $dBug = 't' ; then
143              if test $monthDir == 1 ; then
144                echo "---- current list (n=$monthDir) :" | tee -a $OUTPFIL
145                    cat ./slist | tee -a $OUTPFIL
146              fi
147              num1=`wc -l ./slist | awk '{print $1}'`
148              if test $num1 -gt 0 ; then
149              echo   ".... previous list (n=$monthDir):" | tee -a $OUTPFIL
150                    cat ./plist | tee -a $OUTPFIL | head -20
151              fi
152              echo "----" | tee -a $OUTPFIL
153            fi
154    }
155    
156    #--------------------------------------------------------------------------
157    # here starts the sequential part of the script:
158    
159  #CURR_PER=`date +%Y`"_"`date +%m`  #CURR_PER=`date +%Y`"_"`date +%m`
160  CURR_DAY=`date +%Y%m%d`  CURR_DAY=`date +%Y%m%d`
161  # defaults  # defaults
162  MACHINES='_All_'  MACHINES='_All_'
163  FIRSTDAY=$CURR_DAY  FIRSTDAY=$CURR_DAY
164  LASTDAY="30000000"  LASTDAY="30000000"
165    BEFORE="30000000"
166  OUTPFIL=`basename $0`'.log'  OUTPFIL=`basename $0`'.log'
167  NBLDIFF=5  NBLDIFF=5
168  ADDRESS='none'  ADDRESS='none'
169  dBug=f  dBug=f
170  sTime=`date`  sTime=`date`
171    #- to get case insensitive "ls" (and order of tested experiments)
172    export LC_ALL="en_US.UTF-8"
173    
174  #  Parse options  #  Parse options
175  ac_prev=  ac_prev=
# Line 59  for ac_option ; do Line 186  for ac_option ; do
186    
187      case $ac_option in      case $ac_option in
188                    
189          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
190              usage ;;          -verbose | --verbose | -v | --v) dBug=t ;;
         -verbose | --verbose | -v | --v)  
             dBug=t ;;  
191                    
192          -list  | --list  | -l | --l)          -list  | --list  | -l | --l) ac_prev=MACHINES ;;
193              ac_prev=MACHINES ;;          -list=* | --list=*) MACHINES=$ac_optarg ;;
194          -list=* | --list=*)  
195              MACHINES=$ac_optarg ;;          -day  | --day  | -d | --d) ac_prev=FIRSTDAY ;;
196            -day=* | --day=*) FIRSTDAY=$ac_optarg ;;
197          -day  | --day  | -d | --d)  
198              ac_prev=FIRSTDAY ;;          -upto | --upto | -u | --u) ac_prev=LASTDAY ;;
199          -day=* | --day=*)          -upto=* | --upto=*) LASTDAY=$ac_optarg ;;
200              FIRSTDAY=$ac_optarg ;;  
201            -before | --before | -b | --b) ac_prev=BEFORE ;;
202          -upto | --upto | -u | --u)          -before=* | --before=*) BEFORE=$ac_optarg ;;
203              ac_prev=LASTDAY ;;  
204          -upto=* | --upto=*)          -outp | --outp | -o | --o) ac_prev=OUTPFIL ;;
205              LASTDAY=$ac_optarg ;;          -outp=* | --outp=*) OUTPFIL=$ac_optarg ;;
206    
207          -outp | --outp | -o | --o)          -nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;;
208              ac_prev=OUTPFIL ;;          -nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;;
209          -outp=* | --outp=*)  
210              OUTPFIL=$ac_optarg ;;          -addr | --addr | -a | --a) ac_prev=ADDRESS ;;
211            -addr=* | --addr=*) ADDRESS=$ac_optarg ;;
212          -nldf | --nldf | -n | --n)  
213              ac_prev=NBLDIFF ;;          *) echo "Error: don't understand argument \"$ac_option\""
214          -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  
             ;;  
215    
216       esac       esac
217    
# Line 113  if test "x$ttt" != 'xyz' ; then Line 227  if test "x$ttt" != 'xyz' ; then
227    exit 2    exit 2
228  fi  fi
229  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi
230    if test  $BEFORE = "30000000" ; then  BEFORE=$FIRSTDAY ; fi
231  CMDLINE=$0  CMDLINE=$0
232  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
233    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"
234                        else CMDLINE="$CMDLINE '$xx'" ; fi                        else CMDLINE="$CMDLINE '$xx'" ; fi
235  done  done
236    
237  PERIOD=`echo $FIRSTDAY | sed 's/[0-9][0-9]$//'`  PERIOD=`echo $LASTDAY | sed 's/[0-9][0-9]$//'`
238  PP=`expr $PERIOD - 1`  PP=`expr $PERIOD - 1`
239  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]//'`
240  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 255  echo "CMDLINE='$CMDLINE'" > $OUTPFIL
255  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL
256  echo "INDIR='$INDIR'" >> $OUTPFIL  echo "INDIR='$INDIR'" >> $OUTPFIL
257  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL
258    echo "  versus latest from before $BEFORE" >> $OUTPFIL
259    
260  if test $dBug = 't' ; then  if test $dBug = 't' ; then
261    echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'"    echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'"
262    echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY'"    echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY' , BEFORE='$BEFORE'"
263  fi  fi
264  if test -d $INDIR ; then  if test -d $INDIR ; then
265    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`
# Line 159  else Line 275  else
275  fi  fi
276    
277  #- a short summary of this checking :  #- a short summary of this checking :
278  OUTPSUM=`echo $FIRSTDAY | sed 's/^20../_/'`  OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`
279  OUTPSUM=`basename $0`"$OUTPSUM.txt"  OUTPSUM=`basename $0`"$OUTPSUM.txt"
280  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi
281  echo ' '$CMDLINE > $OUTPSUM  echo ' '$CMDLINE > $OUTPSUM
# Line 169  if test $FIRSTDAY = $LASTDAY ; then Line 285  if test $FIRSTDAY = $LASTDAY ; then
285  else  else
286    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM
287  fi  fi
288  echo " versus latest prior to this period" | tee -a $OUTPSUM  if test $FIRSTDAY = $BEFORE ; then
289      echo " versus latest prior to this period" | tee -a $OUTPSUM
290    else
291      echo " versus latest from before $BEFORE" | tee -a $OUTPSUM
292    fi
293  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM
294  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM
295    
296  ( 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
297    
298  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
299    MACHINES="faulks aces eddy bay meander lagoon hugo"    MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor"
300    MACHINES="$MACHINES columbia edvir rays solasrv sx8 xd1"    MACHINES="$MACHINES pleiades iblade rays solasrv sx8"
301    MACHINES="$MACHINES beagle batsi starp"    MACHINES="$MACHINES trane dodongo dokdo stomp bigred"
302    
303    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`
304    for madd in $MALL ; do    for madd in $MALL ; do
305      present=0      present=0
306      for m in $MACHINES ; do      for m in $MACHINES ; do
307          echo $madd | grep $m > /dev/null 2>&1          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`
308          RETVAL=$?          echo $madd | grep $mm > /dev/null 2>&1
309          test $RETVAL = 0  &&  present=1          RETVAL=$?
310          continue          test $RETVAL = 0  &&  present=1
311            continue
312      done      done
313      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
314    done    done
315  fi  fi
316    #echo "MACHINES=$MACHINES" ; exit
317    
318    for pname in $MACHINES ; do
319    
320  for mname in $MACHINES ; do      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
321        sUser=
322        if test $mname != $pname ; then
323          # to select results from user "sUser"
324          sUser=`echo $pname | sed 's/\./ /g' | awk '{print $2}'`
325        fi
326    
327      if test $dBug = 't' ; then echo "  $mname" ; fi      if test $dBug = 't' ; then echo "  $pname" ; fi
328      echo " name='$mname'" >> $OUTPFIL      echo " name='$pname'" >> $OUTPFIL
329      ctot=0 ; cmis=0 ; cdif=0      ctot=0 ; cmis=0 ; cdif=0
330    
331      # put results from selected period in "slist",      # put results from selected period in "slist",
332      #     results from previous period in "plist"      #     results from previous period in "plist"
333      rm -f ./plist ./slist ; touch ./plist ./slist      rm -f ./plist ./slist ; touch ./plist ./slist
334    
335      for n in $listNum ; do      #- create list of results (slist & plist) from current month directory
336        num1=`wc -l ./slist | awk '{print $1}'`      monthDir=1
337        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  
             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  
   
         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 | head -20  
         fi  
   
       fi  
     done  
     if test $dBug = 't' ; then echo "----" | tee -a $OUTPFIL ; fi  
338    
339      #  Do we have any data?  If so, create the latest pointer.      #  Do we have any data?  If so, create the latest pointer.
340      num=`wc -l ./slist | awk '{print $1}'`      num=`wc -l ./slist | awk '{print $1}'`
# Line 302  for mname in $MACHINES ; do Line 345  for mname in $MACHINES ; do
345          for key in $keys ; do          for key in $keys ; do
346            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
347            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " ./slist | head -1`
348            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
349            kind=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
350            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
351            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
352              if test $num = 0 -a $monthDir = 1 ; then
353              #- add results from previous month directory to "plist".
354                monthDir=2
355                make_resdir_list
356                num=`grep -c "^$key" ./plist`
357              fi
358            #- discard unsafe test:            #- discard unsafe test:
359            dd=`echo $optf | grep -c 'gfortran.*mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
360            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi
361            if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi            if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi
362            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
363            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
364            if test $num -gt 0 ; then            dd=`echo $optf | grep -c 'bigred.*noieee'`
365              if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
366              if test $num -lt 0 ; then
367                echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
368                cmis=`expr $cmis + 1`
369              elif test $num = '0' ; then
370                echo "no previous test for:" $key | tee -a $OUTPFIL
371                cmis=`expr $cmis + 1`
372              else
373              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
374              if test $dBug = 't' ; then              if test $dBug = 't' ; then
375                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
376                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
377              fi              fi
378              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
379              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
380              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
381                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
382                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs
383              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
384              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
385                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
386                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp
387                #-- re-order list of exp (according to local "sort" order)
388                listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`
389                for xx in $listD
390                do
391                    sed "/ $xx\$/d" tmpfs > tmpfn
392                    sed -n "/ $xx\$/p" tmpfs >> tmpfn
393                    mv tmpfn tmpfs
394                done
395                listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp | awk '{print $NF}' | sort`
396                for xx in $listD
397                do
398                    sed "/ $xx\$/d" tmpfp > tmpfn
399                    sed -n "/ $xx\$/p" tmpfp >> tmpfn
400                    mv tmpfn tmpfp
401                done
402              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL
403              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
404              yy=$?              yy=$?
405              if test $yy != '0' ; then              if test $yy != '0' ; then
406                  echo " $kind , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
407                  #grep '^run: ' $outp                  #grep '^run: ' $outp
408                  #grep '^run: ' $outs                  #grep '^run: ' $outs
409                  #-- score for each test:                  #-- score for each test:
# Line 349  for mname in $MACHINES ; do Line 421  for mname in $MACHINES ; do
421                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
422                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' tmpdf`
423                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
424                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
425                    cat tmpdf                    cat tmpdf
426                  else                  else
427                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
# Line 357  for mname in $MACHINES ; do Line 429  for mname in $MACHINES ; do
429                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
430                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
431                  cat tmpdf >> $OUTPFIL                  cat tmpdf >> $OUTPFIL
432                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
433                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
434                  else                  else
435                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
436                  fi                  fi
437                  cdif=`expr $cdif + 1`                  cdif=`expr $cdif + 1`
438                  echo '----------------------------------------' | tee -a $OUTPFIL                  echo '----------------------------------------' | tee -a $OUTPFIL
439              else              else
440                  echo "" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
441              fi              fi
442              rm -f tmpfs tmpfp tmpdf              rm -f tmpfs tmpfp tmpdf
443            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  
444          done          done
445          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
446          printf '%11s :  %3i      %4s   %3i  ' $mname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM
447          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
448            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
449         else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi
450      fi      fi
451    
452  done  done

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.22