/[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.37 by jmc, Thu Mar 7 21:57:45 2013 UTC revision 1.53 by jmc, Wed Sep 18 16:17:55 2019 UTC
# Line 39  usage() Line 39  usage()
39  make_resdir_list()  make_resdir_list()
40  {  {
41        if test $monthDir == 1 ; then        if test $monthDir == 1 ; then
42          dir_list=`grep '.._'$mname ./dir_all`          dir_list=`grep '.._'$mname $TMP.dir_all`
43        else        else
44          dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/??_*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )`          dir_list=`( cd $INDIR ; ls -1 -t ../$PREV_P/??_*${mname}*/summary.txt 2> /dev/null | sed 's/\/summary.txt//' )`
45          #echo "dir_list='$dir_list'"          #echo "dir_list='$dir_list'"
# Line 101  make_resdir_list() Line 101  make_resdir_list()
101                  fi                  fi
102              fi              fi
103    
104              ADJOINT=              ADJOINT=0
105              TANGLIN=              TANGLIN=0
106                OPENAD=0
107              RESTART=0              RESTART=0
108              EXTRA=              EXTRA=
109              FAST=0              FAST=0
# Line 111  make_resdir_list() Line 112  make_resdir_list()
112              MTH=0              MTH=0
113              UR4=0              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                  comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null`                    OPENAD=`grep -c '^Adjoint .* OpenAD' $dir/summary.txt`
118                  eval $comm                  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                  comm=`grep '^run: .*testreport.* ' $dir/summary.txt`                  comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
125                  EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`                  EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
# Line 146  make_resdir_list() Line 151  make_resdir_list()
151                     UR4=`echo "$comm" | grep -c " -*-ur4\>"`                     UR4=`echo "$comm" | grep -c " -*-ur4\>"`
152                  fi                  fi
153              fi              fi
154              if test "x$ADJOINT" = xtrue ; then              if test "x$ADJOINT" = x1 ; then
155                  kind="adjoint" ; order=0                  kind="adm-TAF" ; order=0
156              elif test "x$TANGLIN" = xtrue ; then                  if test "x$OPENAD" = x1 ; then kind="adm-OAD" ; order=2 ; fi
157                  kind="tanglin" ; order=1              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              elif test "x$RESTART" = x0 ; then
161                  kind="forward" ; order=2                  kind="forward" ; order=4
162              else              else
163                  kind="restart" ; order=3                  kind="restart" ; order=5
164              fi              fi
             order=`expr $order + 10 \* $EXTRA`  
             order=`printf '%3.3i' $order`  
165              if test "x$UR4" = x1 ; then              if test "x$UR4" = x1 ; then
166                  OPTFILE="${OPTFILE}.use_r4"                  OPTFILE="${OPTFILE}.use_r4"
167              fi              fi
168              if test "x$MPI" = x1 ; then              if test "x$MPI" = x1 ; then
169                  yy=`echo $OPTFILE | grep -c '+mpi'`                  yy=`echo $OPTFILE | grep -c '+mpi'`
170                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi                  if test $yy = 0 ; then yy=`echo $OPTFILE | grep -c '+impi'` ; fi
171                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi"
172                                    else order=`expr $order + 200` ; 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$'`
# Line 174  make_resdir_list() Line 181  make_resdir_list()
181              if test "x$DVLP" = x1 ; then              if test "x$DVLP" = x1 ; then
182                  OPTFILE="${OPTFILE}.dvlp"                  OPTFILE="${OPTFILE}.dvlp"
183              fi              fi
184                order=`expr $order + 10 \* $EXTRA`
185                order=`printf '%3.3i' $order`
186              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]$//'`
187              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]$//'`
188              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
189    
190              if [ $day -lt $BEFORE ] ; then              if [ $day -lt $BEFORE ] ; then
191                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./plist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> $TMP.plist
192              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
193                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./slist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> $TMP.slist
194              else              else
195                  if test $dBug = 't' ; then                  if test $dBug = 't' ; then
196                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL
# Line 192  make_resdir_list() Line 201  make_resdir_list()
201          if test $dBug = 't' ; then          if test $dBug = 't' ; then
202            if test $monthDir == 1 ; then            if test $monthDir == 1 ; then
203              echo "---- current list (n=$monthDir) :" | tee -a $OUTPFIL              echo "---- current list (n=$monthDir) :" | tee -a $OUTPFIL
204                  cat ./slist | tee -a $OUTPFIL                  cat $TMP.slist | tee -a $OUTPFIL
205            fi            fi
206            num1=`wc -l ./slist | awk '{print $1}'`            num1=`wc -l $TMP.slist | awk '{print $1}'`
207            if test $num1 -gt 0 ; then            if test $num1 -gt 0 ; then
208            echo   ".... previous list (n=$monthDir):" | tee -a $OUTPFIL            echo   ".... previous list (n=$monthDir):" | tee -a $OUTPFIL
209                  cat ./plist | tee -a $OUTPFIL | head -20                  cat $TMP.plist | tee -a $OUTPFIL | head -20
210            fi            fi
211            echo "----" | tee -a $OUTPFIL            echo "----" | tee -a $OUTPFIL
212          fi          fi
# Line 217  BEFORE="30000000" Line 226  BEFORE="30000000"
226  OUTPFIL=`basename $0`'.log'  OUTPFIL=`basename $0`'.log'
227  NBLDIFF=5  NBLDIFF=5
228  ADDRESS='none'  ADDRESS='none'
229    MAILCMD="mail"
230  dBug=f  dBug=f
231  t4update=0  t4update=0
232  sTime=`date`  sTime=`date`
# Line 235  for ac_option ; do Line 245  for ac_option ; do
245      fi      fi
246    
247      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
   
248      case $ac_option in      case $ac_option in
249                    
250          -help | --help | -h | --h) usage ;;          -help | --help | -h | --h) usage ;;
# Line 265  for ac_option ; do Line 274  for ac_option ; do
274    
275          *) echo "Error: don't understand argument \"$ac_option\""          *) echo "Error: don't understand argument \"$ac_option\""
276             usage ;;             usage ;;
   
277       esac       esac
278    
279  done  done
280    
281    #TMP=./chkoutp_$$
282    #- try to put temporary files in system-local /tmp dir
283    TMP=/tmp/chkoutp_$$
284    touch $TMP ; retVal=$?
285    if [ $retVal -eq 0 ] ; then
286      if test ! -r $TMP ; then TMP=./chkoutp_$$ ; fi
287    else
288      TMP=./chkoutp_$$
289    fi
290    rm -f $TMP
291    if test $dBug = 't' ; then echo "temp files: $TMP" ; fi
292    
293  #-- test FIRSTDAY content ; interpret as "date -d" arg. if not YYYYMMDD  #-- test FIRSTDAY content ; interpret as "date -d" arg. if not YYYYMMDD
294  ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'`  ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'`
295  if test "x$ttt" != 'xyz' ; then  if test "x$ttt" != 'xyz' ; then
# Line 295  if test $PM == '00' ; then PM='12' ; PY= Line 316  if test $PM == '00' ; then PM='12' ; PY=
316  PREV_P="${PY}_${PM}";  PREV_P="${PY}_${PM}";
317  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9][0-9][0-9]/&_/'`  PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9][0-9][0-9]/&_/'`
318    
319  #INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD"  #INDIR="/net/zany.mit.edu/data/ORWELL/export-9/mitgcm-testing/results/$PERIOD"
320  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"  INDIR="/u/u0/httpd/html/testing/results/$PERIOD"
321  #INDIR="/export/export-7/u/u2/jmc/mitgcm/test_web/results/$PERIOD"  #INDIR="$HOME/mitgcm/test_web/results/$PERIOD"
322    
323  #- a short summary of this checking :  #- a short summary of this checking :
324  OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`  OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'`
# Line 312  if test $t4update = 1 ; then Line 333  if test $t4update = 1 ; then
333      if test $PRC_MAILS -ot $OUTPSUM ; then      if test $PRC_MAILS -ot $OUTPSUM ; then
334        echo ' '$CMDLINE | tee -a $OUTPSUM        echo ' '$CMDLINE | tee -a $OUTPSUM
335        echo " t4update: skip "`basename $0`" ( $PRC_MAILS older than $OUTPSUM )" | tee -a $OUTPSUM        echo " t4update: skip "`basename $0`" ( $PRC_MAILS older than $OUTPSUM )" | tee -a $OUTPSUM
336        echo "End  time:   "`date` | tee -a $OUTPSUM        echo " End  time:  "`date` | tee -a $OUTPSUM
337        exit 0        exit 0
338      else      else
339        if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi        if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
340        echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL        echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL
341      fi      fi
342      elif test -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then
343          echo ' '$CMDLINE | tee -a $OUTPSUM
344          echo " t4update: skip "`basename $0`" ( $PRC_MAILS missing )" | tee -a $OUTPSUM
345          echo " End  time:  "`date` | tee -a $OUTPSUM
346          exit 0
347    else    else
348        if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi        if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi
349        echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL        echo " t4update ignored (not current day or $OUTPSUM missing)" | tee $OUTPFIL
350    fi    fi
351  elif test -e $OUTPFIL ; then  elif test -e $OUTPFIL ; then
352    mv -f $OUTPFIL $OUTPFIL'_bak'    mv -f $OUTPFIL $OUTPFIL'_bak'
# Line 365  fi Line 391  fi
391  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM  echo "    Machine   Tot. Nb.   no    Nb with  Nb diff" >> $OUTPSUM
392  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM  echo "     name     checked   comp    Diff    lines"  >> $OUTPSUM
393    
394  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all
395    
396  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
397    MACHINES="aces- acesgrid baudelaire dickens danton beagle"    MACHINES="villon baudelaire batsi engaging1 engaging- svante glacier"
398    MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"    MACHINES="$MACHINES ollie stan1 pleiades archer"
399    
400    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`    MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
401    for madd in $MALL ; do    for madd in $MALL ; do
402      present=0      present=0
403      for m in $MACHINES ; do      for m in $MACHINES ; do
# Line 400  for pname in $MACHINES ; do Line 426  for pname in $MACHINES ; do
426      echo " name='$pname'" >> $OUTPFIL      echo " name='$pname'" >> $OUTPFIL
427      ctot=0 ; cmis=0 ; cdif=0      ctot=0 ; cmis=0 ; cdif=0
428    
429      # put results from selected period in "slist",      # put results from selected period in "TMP.slist",
430      #     results from previous period in "plist"      #     results from previous period in "TMP.plist"
431      rm -f ./plist ./slist ; touch ./plist ./slist      rm -f $TMP.plist $TMP.slist ; touch $TMP.plist $TMP.slist
432    
433      #- create list of results (slist & plist) from current month directory      #- create list of results (slist & plist) from current month directory
434      monthDir=1      monthDir=1
435      make_resdir_list      make_resdir_list
436    
437      #  Do we have any data?  If so, create the latest pointer.      #  Do we have any data?  If so, create the latest pointer.
438      num=`wc -l ./slist | awk '{print $1}'`      num=`wc -l $TMP.slist | awk '{print $1}'`
439      if test $num -gt 0 ; then      if test $num -gt 0 ; then
440    
441          keys=`cat ./slist | cut -d " " -f 1 | sort | uniq`          keys=`cat $TMP.slist | cut -d " " -f 1 | sort | uniq`
442    
443          for key in $keys ; do          for key in $keys ; do
444            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
445            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " $TMP.slist | head -1`
446            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
447            type=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
448            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
449            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" $TMP.plist`
450            if test $num = 0 -a $monthDir = 1 ; then            if test $num = 0 -a $monthDir = 1 ; then
451            #- add results from previous month directory to "plist".            #- add results from previous month directory to "plist".
452              monthDir=2              monthDir=2
453              make_resdir_list              make_resdir_list
454              num=`grep -c "^$key" ./plist`              num=`grep -c "^$key" $TMP.plist`
455            fi            fi
456            #- discard unsafe test:            #- discard unsafe test:
457            dd=`echo $optf | grep -c 'gfortran+mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
# Line 439  for pname in $MACHINES ; do Line 465  for pname in $MACHINES ; do
465              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
466              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
467            elif test $num = '0' ; then            elif test $num = '0' ; then
468              echo "no previous test for:" $key | tee -a $OUTPFIL              echo "  dir='$sdir', type='$type', of='$optf':" | tee -a $OUTPFIL
469                echo "  --> no previous test matching key='$key'" | tee -a $OUTPFIL
470              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
471            else            else
472              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " $TMP.plist | head -1`
473              if test $dBug = 't' ; then              if test $dBug = 't' ; then
474                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
475                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
# Line 451  for pname in $MACHINES ; do Line 478  for pname in $MACHINES ; do
478              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
479              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
480              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
481                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > $TMP.fs
482              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
483              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
484              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
485                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > $TMP.fp
486              #-- re-order list of exp (according to local "sort" order)              #-- check if list of exp are the same (and in the same order)
487              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`              sed 's/  (e=.*, w=.*)$//' $TMP.fs > $TMP.fn
488              for xx in $listD              listDs=`grep '^[YN] [YN] [YN] [YN]' $TMP.fn | awk '{print $NF}'`
489              do              #mv -f $TMP.fn $TMP.fs
490                  sed "/ $xx\$/d" tmpfs > tmpfn              rm -f $TMP.fn
491                  sed -n "/ $xx\$/p" tmpfs >> tmpfn              sed 's/  (e=.*, w=.*)$//' $TMP.fp > $TMP.fn
492                  mv tmpfn tmpfs              listDp=`grep '^[YN] [YN] [YN] [YN]' $TMP.fn | awk '{print $NF}'`
493              done              #mv -f $TMP.fn $TMP.fp
494              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp | awk '{print $NF}' | sort`              rm -f $TMP.fn
495              for xx in $listD              #echo "listDs='$listDs'" ;  echo "listDp='$listDp'"
496              do              if test "$listDs" != "$listDp" ; then
497                  sed "/ $xx\$/d" tmpfp > tmpfn                  if test $dBug = 't' ; then echo ' -> re-order list of exp' ; fi
498                  sed -n "/ $xx\$/p" tmpfp >> tmpfn                  #-- re-order list of exp (according to local "sort" order)
499                  mv tmpfn tmpfp                  listDs=`echo "$listDs" | sort`
500              done                  for xx in $listDs ; do
501                        sed -e "/ $xx\$/d" -e "/ $xx /d" $TMP.fs > $TMP.fn
502                        sed -n -e "/ $xx\$/p" -e "/ $xx /p" $TMP.fs >> $TMP.fn
503                        mv -f $TMP.fn $TMP.fs
504                    done
505                    listDp=`echo "$listDp" | sort`
506                    for xx in $listDp ; do
507                        sed -e "/ $xx\$/d" -e "/ $xx /d" $TMP.fp > $TMP.fn
508                        sed -n -e "/ $xx\$/p" -e "/ $xx /p" $TMP.fp >> $TMP.fn
509                        mv -f $TMP.fn $TMP.fp
510                    done
511                #else
512                #   echo 'same list of exp => skip re-ordering'
513                fi
514              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL
515              diff tmpfs tmpfp > tmpdf              diff $TMP.fs $TMP.fp > $TMP.dif
516              yy=$?              yy=$?
517              if test $yy != '0' ; then              if test $yy != '0' ; then
518                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
519                  #grep '^run: ' $outp                  #grep '^run: ' $outp
520                  #grep '^run: ' $outs                  #grep '^run: ' $outs
521                  #-- score for each test:                  #-- score for each test:
522                  grep '^[YN] [YN] [YN] [YN]' tmpfs > tmploc 2>/dev/null                  grep '^[YN] [YN] [YN] [YN]' $TMP.fs > tmploc 2>/dev/null
523                  t_tot=`cat tmploc | wc -l | sed -e 's| ||g'`                  t_tot=`cat tmploc | wc -l | sed -e 's| ||g'`
524                  t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'`                  t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'`
525                  score_s=`printf '%2i' $t_pass`":$t_tot"                  score_s=`printf '%2i' $t_pass`":$t_tot"
526                  grep '^[YN] [YN] [YN] [YN]' tmpfp > tmploc 2>/dev/null                  grep '^[YN] [YN] [YN] [YN]' $TMP.fp > tmploc 2>/dev/null
527                  t_tot=`cat tmploc | wc -l | sed -e 's| ||g'`                  t_tot=`cat tmploc | wc -l | sed -e 's| ||g'`
528                  t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'`                  t_pass=`grep '^Y Y Y Y' tmploc | grep 'pass ' | wc -l | sed -e 's| ||g'`
529                  score_p=`printf '%2i' $t_pass`":$t_tot"                  score_p=`printf '%2i' $t_pass`":$t_tot"
530                  rm -f tmploc                  rm -f tmploc
531                  #-- count Nb of different lines                  #-- count Nb of different lines
532                  ndf=`wc -l tmpdf | awk '{print $1}'`                  ndf=`wc -l $TMP.dif | awk '{print $1}'`
533                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
534                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' $TMP.dif`
535                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
536                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
537                    cat tmpdf                    cat $TMP.dif
538                  else                  else
539                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
540                  fi                  fi
541                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
542                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
543                  cat tmpdf >> $OUTPFIL                  cat $TMP.dif >> $OUTPFIL
544                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
545                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
546                  else                  else
# Line 511  for pname in $MACHINES ; do Line 551  for pname in $MACHINES ; do
551              else              else
552                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
553              fi              fi
554              rm -f tmpfs tmpfp tmpdf              rm -f $TMP.fs $TMP.fp $TMP.dif
555            fi            fi
556          done          done
557          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
# Line 524  for pname in $MACHINES ; do Line 564  for pname in $MACHINES ; do
564  done  done
565    
566  echo "Start time:  $sTime" | tee -a $OUTPFIL  echo "Start time:  $sTime" | tee -a $OUTPFIL
567  echo "End  time:   "`date` | tee -a $OUTPFIL | tee -a $OUTPSUM  echo "End time:    "`date` | tee -a $OUTPFIL | tee -a $OUTPSUM
568    
569  rm -f ./dir_all ./slist ./plist  rm -f $TMP.dir_all $TMP.slist $TMP.plist
570  if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi  if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi
571  if test "x$ADDRESS" != 'xnone' ; then  if test "x$ADDRESS" != 'xnone' ; then
572    echo ".. send $OUTPSUM to $ADDRESS"    #- change default sender address ("From:") using "mail -r" option
573    mail -s $OUTPSUM $ADDRESS < $OUTPSUM    #  since, by default, baudelaire uses USER@localhost.localdomain
574      #fullNam=`hostname -A | awk '{print $1}'`
575      #MAILCMD="$MAILCMD -r ${USER}@${fullNam}"
576      #---
577      echo ".. send $OUTPSUM to '$ADDRESS' using '$MAILCMD'"
578      $MAILCMD -s 'check_outp summary' $ADDRESS < $OUTPSUM
579  fi  fi
580  echo ".. cat $OUTPSUM"  echo ".. cat $OUTPSUM"
581  cat $OUTPSUM  cat $OUTPSUM

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

  ViewVC Help
Powered by ViewVC 1.1.22