/[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.26 by jmc, Wed Nov 24 16:22:08 2010 UTC revision 1.39 by jmc, Wed Jul 10 16:32:53 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 70  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 100  make_resdir_list() Line 101  make_resdir_list()
101                  fi                  fi
102              fi              fi
103    
104              ADJOINT=              ADJOINT=0
105                TANGLIN=0
106                OPENAD=0
107              RESTART=0              RESTART=0
108              NOI3E=0              EXTRA=
109                FAST=0
110                DVLP=0
111                MPI=0
112              MTH=0              MTH=0
113                UR4=0
114              if test -r $dir/summary.txt ; then              if test -r $dir/summary.txt ; then
115                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`                  ADJOINT=`grep -c -i '^ADJOINT' $dir/summary.txt`
116                  eval $comm                  if test "x$ADJOINT" = x1 ; then
117                      OPENAD=`grep -c '^Adjoint .* OpenAD' $dir/summary.txt`
118                    fi
119                    TANGLIN=`grep -c -i '^TANGLIN' $dir/summary.txt`
120                    if test "x$TANGLIN" = x1 ; then
121                      OPENAD=`grep -c '^TangLin .* OpenAD' $dir/summary.txt`
122                    fi
123                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
124                  NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`                  comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
125                  MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`                  EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
126                    if test "x$EXTRA" = x ; then
127                        EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"`
128                    fi
129                    if test "x$EXTRA" = x ; then EXTRA=0 ; else
130                        #echo -n "EXTRA=$EXTRA"
131                        nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w`
132                        nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"`
133                        nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"`
134                        EXTRA=1
135                        if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi
136                        if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi
137                        #echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2"
138                    fi
139                    FAST=`echo "$comm" | grep -c " -*-fast\>"`
140                    if test "x$FAST" = x0 ; then
141                       FAST=`echo "$comm" | grep -c " '*-noieee'*"`
142                    fi
143                    DVLP=`echo "$comm" | grep -c " -*-devel\>"`
144                    MPI=`echo "$comm" | grep -c " -*-mpi\>"`
145                    if test "x$MPI" = x0 ; then
146                       MPI=`echo "$comm" | grep -c " -*-MPI\>"`
147                    fi
148                    MTH=`echo "$comm" | grep -c " -*-mth\>"`
149                    UR4=`echo "$comm" | grep -c " -*-use_r4\>"`
150                    if test "x$UR4" = x0 ; then
151                       UR4=`echo "$comm" | grep -c " -*-ur4\>"`
152                    fi
153              fi              fi
154              if test "x$RESTART" = x0 ; then              if test "x$ADJOINT" = x1 ; then
155                  kind="forward"                  kind="adm-TAF" ; order=0
156                  test "x$ADJOINT" = xtrue  &&  kind="adjoint"                  if test "x$OPENAD" = x1 ; then kind="adm-OAD" ; order=2 ; fi
157                elif test "x$TANGLIN" = x1 ; then
158                    kind="tlm-TAF" ; order=1
159                    if test "x$OPENAD" = x1 ; then kind="tlm-OAD" ; order=3 ; fi
160                elif test "x$RESTART" = x0 ; then
161                    kind="forward" ; order=4
162              else              else
163                  kind="restart"                  kind="restart" ; order=5
164                fi
165                order=`expr $order + 10 \* $EXTRA`
166                order=`printf '%3.3i' $order`
167                if test "x$UR4" = x1 ; then
168                    OPTFILE="${OPTFILE}.use_r4"
169                fi
170                if test "x$MPI" = x1 ; then
171                    yy=`echo $OPTFILE | grep -c '+mpi'`
172                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi
173              fi              fi
174              if test "x$MTH" = x1 ; then              if test "x$MTH" = x1 ; then
175                  yy=`echo $OPTFILE | grep -c '+mth$'`                  yy=`echo $OPTFILE | grep -c '+mth$'`
176                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
177              fi              fi
178              if test "x$NOI3E" = x1 ; then              if test "x$FAST" = x1 ; then
179                  OPTFILE="${OPTFILE}.noieee"                  OPTFILE="${OPTFILE}.fast"
180              fi              fi
181              day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`              if test "x$DVLP" = x1 ; then
182              ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`                  OPTFILE="${OPTFILE}.dvlp"
183              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`              fi
184                day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
185              if [ $day -lt $BEFORE ] ; then              ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
186                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
187              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then  
188                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist              if [ $day -lt $BEFORE ] ; then
189                    echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./plist
190                elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
191                    echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./slist
192              else              else
193                  if test $dBug = 't' ; then                  if test $dBug = 't' ; then
194                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL
# Line 158  make_resdir_list() Line 215  make_resdir_list()
215    
216  #CURR_PER=`date +%Y`"_"`date +%m`  #CURR_PER=`date +%Y`"_"`date +%m`
217  CURR_DAY=`date +%Y%m%d`  CURR_DAY=`date +%Y%m%d`
218    PRC_MAILS='prc_emails_'`date +%m%d`
219  # defaults  # defaults
220  MACHINES='_All_'  MACHINES='_All_'
221  FIRSTDAY=$CURR_DAY  FIRSTDAY=$CURR_DAY
# Line 167  OUTPFIL=`basename $0`'.log' Line 225  OUTPFIL=`basename $0`'.log'
225  NBLDIFF=5  NBLDIFF=5
226  ADDRESS='none'  ADDRESS='none'
227  dBug=f  dBug=f
228    t4update=0
229  sTime=`date`  sTime=`date`
230  #- to get case insensitive "ls" (and order of tested experiments)  #- to get case insensitive "ls" (and order of tested experiments)
231  export LC_ALL="en_US.UTF-8"  export LC_ALL="en_US.UTF-8"
# Line 177  for ac_option ; do Line 236  for ac_option ; do
236    
237      # If the previous option needs an argument, assign it.      # If the previous option needs an argument, assign it.
238      if test -n "$ac_prev"; then      if test -n "$ac_prev"; then
239          eval "$ac_prev=\$ac_option"          eval "$ac_prev=\$ac_option"
240          ac_prev=          ac_prev=
241          continue          continue
242      fi      fi
243    
244      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
245    
246      case $ac_option in      case $ac_option in
247                    
248          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
249              usage ;;          -verbose | --verbose | -v | --v) dBug=t ;;
250          -verbose | --verbose | -v | --v)          -test4update | --test4update | -t | --t) t4update=1 ;;
             dBug=t ;;  
251                    
252          -list  | --list  | -l | --l)          -list  | --list  | -l | --l) ac_prev=MACHINES ;;
253              ac_prev=MACHINES ;;          -list=* | --list=*) MACHINES=$ac_optarg ;;
254          -list=* | --list=*)  
255              MACHINES=$ac_optarg ;;          -day  | --day  | -d | --d) ac_prev=FIRSTDAY ;;
256            -day=* | --day=*) FIRSTDAY=$ac_optarg ;;
257          -day  | --day  | -d | --d)  
258              ac_prev=FIRSTDAY ;;          -upto | --upto | -u | --u) ac_prev=LASTDAY ;;
259          -day=* | --day=*)          -upto=* | --upto=*) LASTDAY=$ac_optarg ;;
260              FIRSTDAY=$ac_optarg ;;  
261            -before | --before | -b | --b) ac_prev=BEFORE ;;
262          -upto | --upto | -u | --u)          -before=* | --before=*) BEFORE=$ac_optarg ;;
263              ac_prev=LASTDAY ;;  
264          -upto=* | --upto=*)          -outp | --outp | -o | --o) ac_prev=OUTPFIL ;;
265              LASTDAY=$ac_optarg ;;          -outp=* | --outp=*) OUTPFIL=$ac_optarg ;;
266    
267          -before | --before | -b | --b)          -nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;;
268              ac_prev=BEFORE ;;          -nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;;
269          -before=* | --before=*)  
270              BEFORE=$ac_optarg ;;          -addr | --addr | -a | --a) ac_prev=ADDRESS ;;
271            -addr=* | --addr=*) ADDRESS=$ac_optarg ;;
272          -outp | --outp | -o | --o)  
273              ac_prev=OUTPFIL ;;          *) echo "Error: don't understand argument \"$ac_option\""
274          -outp=* | --outp=*)             usage ;;
             OUTPFIL=$ac_optarg ;;  
   
         -nldf | --nldf | -n | --n)  
             ac_prev=NBLDIFF ;;  
         -nldf=* | --nldf=*)  
             NBLDIFF=$ac_optarg ;;  
   
         -addr | --addr | -a | --a)  
             ac_prev=ADDRESS ;;  
         -addr=* | --addr=*)  
             ADDRESS=$ac_optarg ;;  
   
         *)  
             echo "Error: don't understand argument \"$ac_option\""  
             usage  
             ;;  
275    
276       esac       esac
277    
# Line 262  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9 Line 304  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9
304    
305  #INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD"  #INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD"
306  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"
307  #INDIR="/export/export-7/u/u2/jmc/mitgcm/test_web/results/$PERIOD"  #INDIR="/u/u2/jmc/mitgcm/test_web/results/$PERIOD"
308    
309    #- a short summary of this checking :
310    OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`
311    OUTPSUM=`basename $0`"$OUTPSUM.txt"
312    
313  if test $OUTPFIL = '-1' ; then  if test $OUTPFIL = '-1' ; then
314    OUTPFIL='TTT.'$$    OUTPFIL='TTT.'$$
315    fi
316    if test $t4update = 1 ; then
317      if test -f $PRC_MAILS -a -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then
318        #- if update-log-file is older than previous output summary, just return
319        if test $PRC_MAILS -ot $OUTPSUM ; then
320          echo ' '$CMDLINE | tee -a $OUTPSUM
321          echo " t4update: skip "`basename $0`" ( $PRC_MAILS older than $OUTPSUM )" | tee -a $OUTPSUM
322          echo "End  time:   "`date` | tee -a $OUTPSUM
323          exit 0
324        else
325          if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
326          echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL
327        fi
328      else
329          if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
330          echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL
331      fi
332  elif test -e $OUTPFIL ; then  elif test -e $OUTPFIL ; then
333    mv -f $OUTPFIL $OUTPFIL'_bak'    mv -f $OUTPFIL $OUTPFIL'_bak'
334      touch $OUTPFIL
335  fi  fi
336  echo "CMDLINE='$CMDLINE'" > $OUTPFIL  if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi
337    echo ' '$CMDLINE > $OUTPSUM
338    
339    echo "CMDLINE='$CMDLINE'" >> $OUTPFIL
340  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL  echo "PERIOD='$PERIOD' , PREV_P='$PREV_P'" >> $OUTPFIL
341  echo "INDIR='$INDIR'" >> $OUTPFIL  echo "INDIR='$INDIR'" >> $OUTPFIL
342  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL  echo "Checking latest output from $FIRSTDAY until $LASTDAY" >> $OUTPFIL
# Line 292  else Line 359  else
359    exit 3    exit 3
360  fi  fi
361    
 #- a short summary of this checking :  
 OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`  
 OUTPSUM=`basename $0`"$OUTPSUM.txt"  
 if test -e $OUTPSUM ; then mv -f $OUTPSUM $OUTPSUM'_bak' ; fi  
 echo ' '$CMDLINE > $OUTPSUM  
   
362  if test $FIRSTDAY = $LASTDAY ; then  if test $FIRSTDAY = $LASTDAY ; then
363    echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM    echo -n "Checking latest output from $FIRSTDAY" | tee -a $OUTPSUM
364  else  else
# Line 314  echo "     name     checked   comp    Di Line 375  echo "     name     checked   comp    Di
375  ( 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
376    
377  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
378    MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor"    MACHINES="aces- acesgrid baudelaire dickens danton beagle"
379    MACHINES="$MACHINES pleiades iblade rays solasrv sx8"    MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"
   MACHINES="$MACHINES trane dodongo dokdo stomp bigred"  
380    
381    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`
382    for madd in $MALL ; do    for madd in $MALL ; do
383      present=0      present=0
384      for m in $MACHINES ; do      for m in $MACHINES ; do
385          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`
386          echo $madd | grep $mm > /dev/null 2>&1          echo $madd | grep $mm > /dev/null 2>&1
387          RETVAL=$?          RETVAL=$?
388          test $RETVAL = 0  &&  present=1          test $RETVAL = 0  &&  present=1
389          continue          continue
390      done      done
391      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
392    done    done
# Line 335  fi Line 395  fi
395    
396  for pname in $MACHINES ; do  for pname in $MACHINES ; do
397    
398        sname=`echo $pname | sed 's/-$//'`
399      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
400      sUser=      sUser=
401      if test $mname != $pname ; then      if test $mname != $pname ; then
# Line 361  for pname in $MACHINES ; do Line 422  for pname in $MACHINES ; do
422          keys=`cat ./slist | cut -d " " -f 1 | sort | uniq`          keys=`cat ./slist | cut -d " " -f 1 | sort | uniq`
423    
424          for key in $keys ; do          for key in $keys ; do
425            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
426            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " ./slist | head -1`
427            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
428            type=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
429            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
430            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
431            if test $num = 0 -a $monthDir = 1 ; then            if test $num = 0 -a $monthDir = 1 ; then
432            #- add results from previous month directory to "plist".            #- add results from previous month directory to "plist".
433              monthDir=2              monthDir=2
434              make_resdir_list              make_resdir_list
435              num=`grep -c "^$key" ./plist`              num=`grep -c "^$key" ./plist`
436            fi            fi
437            #- discard unsafe test:            #- discard unsafe test:
438            dd=`echo $optf | grep -c 'gfortran+mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
439            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi            if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi
# Line 380  for pname in $MACHINES ; do Line 441  for pname in $MACHINES ; do
441            #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
442            #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
443            dd=`echo $optf | grep -c 'bigred.*noieee'`            dd=`echo $optf | grep -c 'bigred.*noieee'`
444            if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi            #if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
445            if test $num -lt 0 ; then            if test $num -lt 0 ; then
446              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
447              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
448            elif test $num = '0' ; then            elif test $num = '0' ; then
449              echo "no previous test for:" $key | tee -a $OUTPFIL              echo "no previous test for:" $key | tee -a $OUTPFIL
450              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
451            else            else
452              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
453              if test $dBug = 't' ; then              if test $dBug = 't' ; then
454                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
455                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
456              fi              fi
457              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
458              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
459              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
460                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
461                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs
462              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
463              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
464                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
465                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp
466              #-- re-order list of exp (according to local "sort" order)              #-- check if list of exp are the same (and in the same order)
467              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`              sed 's/  (e=.*, w=.*)$//' tmpfs > tmpfn
468              for xx in $listD              listDs=`grep '^[YN] [YN] [YN] [YN]' tmpfn | awk '{print $NF}'`
469              do              #mv -f tmpfn tmpfs
470                  sed "/ $xx\$/d" tmpfs > tmpfn              rm -f tmpfn
471                  sed -n "/ $xx\$/p" tmpfs >> tmpfn              sed 's/  (e=.*, w=.*)$//' tmpfp > tmpfn
472                  mv tmpfn tmpfs              listDp=`grep '^[YN] [YN] [YN] [YN]' tmpfn | awk '{print $NF}'`
473              done              #mv -f tmpfn tmpfp
474              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp | awk '{print $NF}' | sort`              rm -f tmpfn
475              for xx in $listD              #echo "listDs='$listDs'" ;  echo "listDp='$listDp'"
476              do              if test "$listDs" != "$listDp" ; then
477                  sed "/ $xx\$/d" tmpfp > tmpfn                  if test $dBug = 't' ; then echo ' -> re-order list of exp' ; fi
478                  sed -n "/ $xx\$/p" tmpfp >> tmpfn                  #-- re-order list of exp (according to local "sort" order)
479                  mv tmpfn tmpfp                  listDs=`echo "$listDs" | sort`
480              done                  for xx in $listDs ; do
481                        sed -e "/ $xx\$/d" -e "/ $xx /d" tmpfs > tmpfn
482                        sed -n -e "/ $xx\$/p" -e "/ $xx /p" tmpfs >> tmpfn
483                        mv -f tmpfn tmpfs
484                    done
485                    listDp=`echo "$listDp" | sort`
486                    for xx in $listDp ; do
487                        sed -e "/ $xx\$/d" -e "/ $xx /d" tmpfp > tmpfn
488                        sed -n -e "/ $xx\$/p" -e "/ $xx /p" tmpfp >> tmpfn
489                        mv -f tmpfn tmpfp
490                    done
491                #else
492                #   echo 'same list of exp => skip re-ordering'
493                fi
494              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL
495              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
496              yy=$?              yy=$?
497              if test $yy != '0' ; then              if test $yy != '0' ; then
498                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
499                  #grep '^run: ' $outp                  #grep '^run: ' $outp
500                  #grep '^run: ' $outs                  #grep '^run: ' $outs
501                  #-- score for each test:                  #-- score for each test:
# Line 439  for pname in $MACHINES ; do Line 513  for pname in $MACHINES ; do
513                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
514                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' tmpdf`
515                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
516                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
517                    cat tmpdf                    cat tmpdf
518                  else                  else
519                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
# Line 447  for pname in $MACHINES ; do Line 521  for pname in $MACHINES ; do
521                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
522                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
523                  cat tmpdf >> $OUTPFIL                  cat tmpdf >> $OUTPFIL
524                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
525                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
526                  else                  else
527                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
528                  fi                  fi
529                  cdif=`expr $cdif + 1`                  cdif=`expr $cdif + 1`
530                  echo '----------------------------------------' | tee -a $OUTPFIL                  echo '----------------------------------------' | tee -a $OUTPFIL
531              else              else
532                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
533              fi              fi
534              rm -f tmpfs tmpfp tmpdf              rm -f tmpfs tmpfp tmpdf
535            fi            fi
536          done          done
537          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
538          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $sname $ctot $tmis $cdif >> $OUTPSUM
539          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
540            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
541         else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi
542      fi      fi
543    
544  done  done

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.22