/[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.22 by jmc, Tue Mar 30 15:06:54 2010 UTC revision 1.37 by jmc, Thu Mar 7 21:57:45 2013 UTC
# Line 6  Line 6 
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
# Line 15  usage() Line 14  usage()
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\""
# Line 22  usage() Line 23  usage()
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"
# Line 68  make_resdir_list() Line 71  make_resdir_list()
71              if test "x$sUser" != x ; then              if test "x$sUser" != x ; then
72                  tUser=                  tUser=
73                  if test -f $dir/genmake_state ; then                  if test -f $dir/genmake_state ; then
74                     nn=`sed -n '/^# executed by:/=' $dir/genmake_state`                     nn=`sed -n '/^# executed by:/=' $dir/genmake_state`
75                     if test "x$nn" != x ; then                     if test "x$nn" != x ; then
76                       nn=`expr $nn + 1`                       nn=`expr $nn + 1`
77                       tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'`                       tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'`
# Line 99  make_resdir_list() Line 102  make_resdir_list()
102              fi              fi
103    
104              ADJOINT=              ADJOINT=
105                TANGLIN=
106              RESTART=0              RESTART=0
107              NOI3E=0              EXTRA=
108                FAST=0
109                DVLP=0
110                MPI=0
111              MTH=0              MTH=0
112                UR4=0
113              if test -r $dir/summary.txt ; then              if test -r $dir/summary.txt ; then
114                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
115                  eval $comm                  eval $comm
116                    comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null`
117                    eval $comm
118                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
119                  NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`                  comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
120                  MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`                  EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
121                    if test "x$EXTRA" = x ; then
122                        EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"`
123                    fi
124                    if test "x$EXTRA" = x ; then EXTRA=0 ; else
125                        #echo -n "EXTRA=$EXTRA"
126                        nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w`
127                        nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"`
128                        nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"`
129                        EXTRA=1
130                        if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi
131                        if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi
132                        #echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2"
133                    fi
134                    FAST=`echo "$comm" | grep -c " -*-fast\>"`
135                    if test "x$FAST" = x0 ; then
136                       FAST=`echo "$comm" | grep -c " '*-noieee'*"`
137                    fi
138                    DVLP=`echo "$comm" | grep -c " -*-devel\>"`
139                    MPI=`echo "$comm" | grep -c " -*-mpi\>"`
140                    if test "x$MPI" = x0 ; then
141                       MPI=`echo "$comm" | grep -c " -*-MPI\>"`
142                    fi
143                    MTH=`echo "$comm" | grep -c " -*-mth\>"`
144                    UR4=`echo "$comm" | grep -c " -*-use_r4\>"`
145                    if test "x$UR4" = x0 ; then
146                       UR4=`echo "$comm" | grep -c " -*-ur4\>"`
147                    fi
148              fi              fi
149              if test "x$RESTART" = x0 ; then              if test "x$ADJOINT" = xtrue ; then
150                  kind="forward"                  kind="adjoint" ; order=0
151                  test "x$ADJOINT" = xtrue  &&  kind="adjoint"              elif test "x$TANGLIN" = xtrue ; then
152                    kind="tanglin" ; order=1
153                elif test "x$RESTART" = x0 ; then
154                    kind="forward" ; order=2
155              else              else
156                  kind="restart"                  kind="restart" ; order=3
157                fi
158                order=`expr $order + 10 \* $EXTRA`
159                order=`printf '%3.3i' $order`
160                if test "x$UR4" = x1 ; then
161                    OPTFILE="${OPTFILE}.use_r4"
162                fi
163                if test "x$MPI" = x1 ; then
164                    yy=`echo $OPTFILE | grep -c '+mpi'`
165                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi
166              fi              fi
167              if test "x$MTH" = x1 ; then              if test "x$MTH" = x1 ; then
168                  yy=`echo $OPTFILE | grep -c '+mth$'`                  yy=`echo $OPTFILE | grep -c '+mth$'`
169                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
170              fi              fi
171              if test "x$NOI3E" = x1 ; then              if test "x$FAST" = x1 ; then
172                  OPTFILE="${OPTFILE}.noieee"                  OPTFILE="${OPTFILE}.fast"
173                fi
174                if test "x$DVLP" = x1 ; then
175                    OPTFILE="${OPTFILE}.dvlp"
176              fi              fi
177              day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`              day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
178              ttt=`echo $day | 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]$//'`
179              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
180    
181              if [ $day -lt $FIRSTDAY ] ; then              if [ $day -lt $BEFORE ] ; then
182                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./plist
183              elif [ $day -le $LASTDAY ] ; then              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
184                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./slist
185              else              else
186                  if test $dBug = 't' ; then                  if test $dBug = 't' ; then
187                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL
# Line 156  make_resdir_list() Line 208  make_resdir_list()
208    
209  #CURR_PER=`date +%Y`"_"`date +%m`  #CURR_PER=`date +%Y`"_"`date +%m`
210  CURR_DAY=`date +%Y%m%d`  CURR_DAY=`date +%Y%m%d`
211    PRC_MAILS='prc_emails_'`date +%m%d`
212  # defaults  # defaults
213  MACHINES='_All_'  MACHINES='_All_'
214  FIRSTDAY=$CURR_DAY  FIRSTDAY=$CURR_DAY
215  LASTDAY="30000000"  LASTDAY="30000000"
216    BEFORE="30000000"
217  OUTPFIL=`basename $0`'.log'  OUTPFIL=`basename $0`'.log'
218  NBLDIFF=5  NBLDIFF=5
219  ADDRESS='none'  ADDRESS='none'
220  dBug=f  dBug=f
221    t4update=0
222  sTime=`date`  sTime=`date`
223  #- to get case insensitive "ls" (and order of tested experiments)  #- to get case insensitive "ls" (and order of tested experiments)
224  export LC_ALL="en_US.UTF-8"  export LC_ALL="en_US.UTF-8"
# Line 174  for ac_option ; do Line 229  for ac_option ; do
229    
230      # If the previous option needs an argument, assign it.      # If the previous option needs an argument, assign it.
231      if test -n "$ac_prev"; then      if test -n "$ac_prev"; then
232          eval "$ac_prev=\$ac_option"          eval "$ac_prev=\$ac_option"
233          ac_prev=          ac_prev=
234          continue          continue
235      fi      fi
236    
237      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
238    
239      case $ac_option in      case $ac_option in
240                    
241          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
242              usage ;;          -verbose | --verbose | -v | --v) dBug=t ;;
243          -verbose | --verbose | -v | --v)          -test4update | --test4update | -t | --t) t4update=1 ;;
             dBug=t ;;  
244                    
245          -list  | --list  | -l | --l)          -list  | --list  | -l | --l) ac_prev=MACHINES ;;
246              ac_prev=MACHINES ;;          -list=* | --list=*) MACHINES=$ac_optarg ;;
247          -list=* | --list=*)  
248              MACHINES=$ac_optarg ;;          -day  | --day  | -d | --d) ac_prev=FIRSTDAY ;;
249            -day=* | --day=*) FIRSTDAY=$ac_optarg ;;
250          -day  | --day  | -d | --d)  
251              ac_prev=FIRSTDAY ;;          -upto | --upto | -u | --u) ac_prev=LASTDAY ;;
252          -day=* | --day=*)          -upto=* | --upto=*) LASTDAY=$ac_optarg ;;
253              FIRSTDAY=$ac_optarg ;;  
254            -before | --before | -b | --b) ac_prev=BEFORE ;;
255          -upto | --upto | -u | --u)          -before=* | --before=*) BEFORE=$ac_optarg ;;
256              ac_prev=LASTDAY ;;  
257          -upto=* | --upto=*)          -outp | --outp | -o | --o) ac_prev=OUTPFIL ;;
258              LASTDAY=$ac_optarg ;;          -outp=* | --outp=*) OUTPFIL=$ac_optarg ;;
259    
260          -outp | --outp | -o | --o)          -nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;;
261              ac_prev=OUTPFIL ;;          -nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;;
262          -outp=* | --outp=*)  
263              OUTPFIL=$ac_optarg ;;          -addr | --addr | -a | --a) ac_prev=ADDRESS ;;
264            -addr=* | --addr=*) ADDRESS=$ac_optarg ;;
265          -nldf | --nldf | -n | --n)  
266              ac_prev=NBLDIFF ;;          *) echo "Error: don't understand argument \"$ac_option\""
267          -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  
             ;;  
268    
269       esac       esac
270    
# Line 237  if test "x$ttt" != 'xyz' ; then Line 280  if test "x$ttt" != 'xyz' ; then
280    exit 2    exit 2
281  fi  fi
282  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi
283    if test  $BEFORE = "30000000" ; then  BEFORE=$FIRSTDAY ; fi
284  CMDLINE=$0  CMDLINE=$0
285  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
286    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"    if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"
287                        else CMDLINE="$CMDLINE '$xx'" ; fi                        else CMDLINE="$CMDLINE '$xx'" ; fi
288  done  done
289    
290  PERIOD=`echo $FIRSTDAY | sed 's/[0-9][0-9]$//'`  PERIOD=`echo $LASTDAY | sed 's/[0-9][0-9]$//'`
291  PP=`expr $PERIOD - 1`  PP=`expr $PERIOD - 1`
292  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]//'`
293  PY=`echo $PP | sed 's/[0-9][0-9]$//'`  PY=`echo $PP | sed 's/[0-9][0-9]$//'`
# Line 255  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9 Line 299  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9
299  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"
300  #INDIR="/export/export-7/u/u2/jmc/mitgcm/test_web/results/$PERIOD"  #INDIR="/export/export-7/u/u2/jmc/mitgcm/test_web/results/$PERIOD"
301    
302    #- a short summary of this checking :
303    OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`
304    OUTPSUM=`basename $0`"$OUTPSUM.txt"
305    
306  if test $OUTPFIL = '-1' ; then  if test $OUTPFIL = '-1' ; then
307    OUTPFIL='TTT.'$$    OUTPFIL='TTT.'$$
308    fi
309    if test $t4update = 1 ; then
310      if test -f $PRC_MAILS -a -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then
311        #- if update-log-file is older than previous output summary, just return
312        if test $PRC_MAILS -ot $OUTPSUM ; then
313          echo ' '$CMDLINE | tee -a $OUTPSUM
314          echo " t4update: skip "`basename $0`" ( $PRC_MAILS older than $OUTPSUM )" | tee -a $OUTPSUM
315          echo "End  time:   "`date` | tee -a $OUTPSUM
316          exit 0
317        else
318          if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
319          echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL
320        fi
321      else
322          if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
323          echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL
324      fi
325  elif test -e $OUTPFIL ; then  elif test -e $OUTPFIL ; then
326    mv -f $OUTPFIL $OUTPFIL'_bak'    mv -f $OUTPFIL $OUTPFIL'_bak'
327      touch $OUTPFIL
328  fi  fi
329  echo "CMDLINE='$CMDLINE'" > $OUTPFIL  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi
330    echo ' '$CMDLINE > $OUTPSUM
331    
332    echo "CMDLINE='$CMDLINE'" >> $OUTPFIL
333  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL
334  echo "INDIR='$INDIR'" >> $OUTPFIL  echo "INDIR='$INDIR'" >> $OUTPFIL
335  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL
336    echo "  versus latest from before $BEFORE" >> $OUTPFIL
337    
338  if test $dBug = 't' ; then  if test $dBug = 't' ; then
339    echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'"    echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'"
340    echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY'"    echo "FIRSTDAY='$FIRSTDAY' , LASTDAY='$LASTDAY' , BEFORE='$BEFORE'"
341  fi  fi
342  if test -d $INDIR ; then  if test -d $INDIR ; then
343    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`    dirP=`echo $INDIR | sed "s/$PERIOD/$PREV_P/"`
# Line 282  else Line 352  else
352    exit 3    exit 3
353  fi  fi
354    
 #- 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  
   
355  if test $FIRSTDAY = $LASTDAY ; then  if test $FIRSTDAY = $LASTDAY ; then
356    echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM    echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM
357  else  else
358    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM    echo -n "Checking latest output from $FIRSTDAY until $LASTDAY" | tee -a $OUTPSUM
359  fi  fi
360  echo " versus latest prior to this period" | tee -a $OUTPSUM  if test $FIRSTDAY = $BEFORE ; then
361      echo " versus latest prior to this period" | tee -a $OUTPSUM
362    else
363      echo " versus latest from before $BEFORE" | tee -a $OUTPSUM
364    fi
365  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM
366  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM
367    
368  ( 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
369    
370  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
371    MACHINES="faulks meander lagoon aces.jmc aces.ce107 dickens danton beagle harbor"    MACHINES="aces- acesgrid baudelaire dickens danton beagle"
372    MACHINES="$MACHINES columbia pleiades iblade rays solssrv solasrv sx8"    MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"
   MACHINES="$MACHINES trane dodongo dokdo bigred"  
373    
374    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`
375    for madd in $MALL ; do    for madd in $MALL ; do
376      present=0      present=0
377      for m in $MACHINES ; do      for m in $MACHINES ; do
378          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`
379          echo $madd | grep $mm > /dev/null 2>&1          echo $madd | grep $mm > /dev/null 2>&1
380          RETVAL=$?          RETVAL=$?
381          test $RETVAL = 0  &&  present=1          test $RETVAL = 0  &&  present=1
382          continue          continue
383      done      done
384      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
385    done    done
# Line 321  fi Line 388  fi
388    
389  for pname in $MACHINES ; do  for pname in $MACHINES ; do
390    
391        sname=`echo $pname | sed 's/-$//'`
392      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
393      sUser=      sUser=
394      if test $mname != $pname ; then      if test $mname != $pname ; then
# Line 349  for pname in $MACHINES ; do Line 417  for pname in $MACHINES ; do
417          for key in $keys ; do          for key in $keys ; do
418            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
419            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " ./slist | head -1`
420            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
421            type=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
422            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
423            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
424            if test $num = 0 -a $monthDir = 1 ; then            if test $num = 0 -a $monthDir = 1 ; then
425            #- add results from previous month directory to "plist".            #- add results from previous month directory to "plist".
426              monthDir=2              monthDir=2
427              make_resdir_list              make_resdir_list
428              num=`grep -c "^$key" ./plist`              num=`grep -c "^$key" ./plist`
429            fi            fi
430            #- discard unsafe test:            #- discard unsafe test:
431            dd=`echo $optf | grep -c 'gfortran+mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
432            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi
433            if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi            if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi
434            #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
435            #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
436            dd=`echo $optf | grep -c 'bigred.*+mth'`            dd=`echo $optf | grep -c 'bigred.*noieee'`
437            if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi            #if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
438            if test $num -lt 0 ; then            if test $num -lt 0 ; then
439              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
440              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
441            elif test $num = '0' ; then            elif test $num = '0' ; then
442              echo "no previous test for:" $key | tee -a $OUTPFIL              echo "no previous test for:" $key | tee -a $OUTPFIL
443              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
444            else            else
445              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
446              if test $dBug = 't' ; then              if test $dBug = 't' ; then
447                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
448                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
449              fi              fi
450              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
451              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
452              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
453                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
454                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs
455              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
456              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
457                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
458                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp
459              #-- re-order list of exp (according to local "sort" order)              #-- re-order list of exp (according to local "sort" order)
460              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`
461              for xx in $listD              for xx in $listD
# Line 407  for pname in $MACHINES ; do Line 475  for pname in $MACHINES ; do
475              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
476              yy=$?              yy=$?
477              if test $yy != '0' ; then              if test $yy != '0' ; then
478                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
479                  #grep '^run: ' $outp                  #grep '^run: ' $outp
480                  #grep '^run: ' $outs                  #grep '^run: ' $outs
481                  #-- score for each test:                  #-- score for each test:
# Line 425  for pname in $MACHINES ; do Line 493  for pname in $MACHINES ; do
493                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
494                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' tmpdf`
495                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
496                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
497                    cat tmpdf                    cat tmpdf
498                  else                  else
499                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
# Line 433  for pname in $MACHINES ; do Line 501  for pname in $MACHINES ; do
501                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
502                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
503                  cat tmpdf >> $OUTPFIL                  cat tmpdf >> $OUTPFIL
504                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
505                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
506                  else                  else
507                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
508                  fi                  fi
509                  cdif=`expr $cdif + 1`                  cdif=`expr $cdif + 1`
510                  echo '----------------------------------------' | tee -a $OUTPFIL                  echo '----------------------------------------' | tee -a $OUTPFIL
511              else              else
512                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
513              fi              fi
514              rm -f tmpfs tmpfp tmpdf              rm -f tmpfs tmpfp tmpdf
515            fi            fi
516          done          done
517          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
518          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $sname $ctot $tmis $cdif >> $OUTPSUM
519          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
520            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
521         else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi
522      fi      fi
523    
524  done  done

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.22