/[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.25 by jmc, Fri Oct 29 20:18:55 2010 UTC revision 1.29 by jmc, Tue Aug 9 16:40:29 2011 UTC
# Line 70  make_resdir_list() Line 70  make_resdir_list()
70              if test "x$sUser" != x ; then              if test "x$sUser" != x ; then
71                  tUser=                  tUser=
72                  if test -f $dir/genmake_state ; then                  if test -f $dir/genmake_state ; then
73                     nn=`sed -n '/^# executed by:/=' $dir/genmake_state`                     nn=`sed -n '/^# executed by:/=' $dir/genmake_state`
74                     if test "x$nn" != x ; then                     if test "x$nn" != x ; then
75                       nn=`expr $nn + 1`                       nn=`expr $nn + 1`
76                       tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'`                       tUser=`sed -n "$nn s/^# *// p" $dir/genmake_state | sed 's/@.*$//'`
# Line 102  make_resdir_list() Line 102  make_resdir_list()
102    
103              ADJOINT=              ADJOINT=
104              RESTART=0              RESTART=0
105              NOI3E=0              FAST=0
106                DVLP=0
107              MTH=0              MTH=0
108              if test -r $dir/summary.txt ; then              if test -r $dir/summary.txt ; then
109                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
110                  eval $comm                  eval $comm
111                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
112                  NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`                  FAST=`grep -c "^run: .*testreport.* '*-fast'*" $dir/summary.txt`
113                    if test "x$FAST" = x0 ; then
114                       FAST=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`
115                    fi
116                    DVLP=`grep -c "^run: .*testreport.* '*-devel'*" $dir/summary.txt`
117                  MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`                  MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`
118              fi              fi
119              if test "x$RESTART" = x0 ; then              if test "x$RESTART" = x0 ; then
# Line 121  make_resdir_list() Line 126  make_resdir_list()
126                  yy=`echo $OPTFILE | grep -c '+mth$'`                  yy=`echo $OPTFILE | grep -c '+mth$'`
127                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
128              fi              fi
129              if test "x$NOI3E" = x1 ; then              if test "x$FAST" = x1 ; then
130                  OPTFILE="${OPTFILE}.noieee"                  OPTFILE="${OPTFILE}.fast"
131                fi
132                if test "x$DVLP" = x1 ; then
133                    OPTFILE="${OPTFILE}.dvlp"
134              fi              fi
135              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]$//'`
136              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]$//'`
137              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
138    
139              if [ $day -lt $BEFORE ] ; then              if [ $day -lt $BEFORE ] ; then
140                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist
141              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
142                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist
143              else              else
144                  if test $dBug = 't' ; then                  if test $dBug = 't' ; then
# Line 186  for ac_option ; do Line 194  for ac_option ; do
194    
195      case $ac_option in      case $ac_option in
196                    
197          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
198              usage ;;          -verbose | --verbose | -v | --v) dBug=t ;;
         -verbose | --verbose | -v | --v)  
             dBug=t ;;  
199                    
200          -list  | --list  | -l | --l)          -list  | --list  | -l | --l) ac_prev=MACHINES ;;
201              ac_prev=MACHINES ;;          -list=* | --list=*) MACHINES=$ac_optarg ;;
202          -list=* | --list=*)  
203              MACHINES=$ac_optarg ;;          -day  | --day  | -d | --d) ac_prev=FIRSTDAY ;;
204            -day=* | --day=*) FIRSTDAY=$ac_optarg ;;
205          -day  | --day  | -d | --d)  
206              ac_prev=FIRSTDAY ;;          -upto | --upto | -u | --u) ac_prev=LASTDAY ;;
207          -day=* | --day=*)          -upto=* | --upto=*) LASTDAY=$ac_optarg ;;
208              FIRSTDAY=$ac_optarg ;;  
209            -before | --before | -b | --b) ac_prev=BEFORE ;;
210          -upto | --upto | -u | --u)          -before=* | --before=*) BEFORE=$ac_optarg ;;
211              ac_prev=LASTDAY ;;  
212          -upto=* | --upto=*)          -outp | --outp | -o | --o) ac_prev=OUTPFIL ;;
213              LASTDAY=$ac_optarg ;;          -outp=* | --outp=*) OUTPFIL=$ac_optarg ;;
214    
215          -before | --before | -b | --b)          -nldf | --nldf | -n | --n) ac_prev=NBLDIFF ;;
216              ac_prev=BEFORE ;;          -nldf=* | --nldf=*) NBLDIFF=$ac_optarg ;;
217          -before=* | --before=*)  
218              BEFORE=$ac_optarg ;;          -addr | --addr | -a | --a) ac_prev=ADDRESS ;;
219            -addr=* | --addr=*) ADDRESS=$ac_optarg ;;
220          -outp | --outp | -o | --o)  
221              ac_prev=OUTPFIL ;;          *) echo "Error: don't understand argument \"$ac_option\""
222          -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  
             ;;  
223    
224       esac       esac
225    
# Line 314  echo "     name     checked   comp    Di Line 304  echo "     name     checked   comp    Di
304  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all
305    
306  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
307    MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor"    MACHINES="faulks meander aces- acesgrid baudelaire dickens danton beagle harbor"
308    MACHINES="$MACHINES columbia pleiades iblade rays solssrv solasrv sx8"    MACHINES="$MACHINES pleiades iblade rays solasrv sx8"
309    MACHINES="$MACHINES trane dodongo dokdo bigred"    MACHINES="$MACHINES trane dodongo dokdo stomp bigred"
310    
311    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
312    for madd in $MALL ; do    for madd in $MALL ; do
313      present=0      present=0
314      for m in $MACHINES ; do      for m in $MACHINES ; do
315          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`          mm=`echo $m | sed 's/\./ /g' | awk '{print $1}'`
316          echo $madd | grep $mm > /dev/null 2>&1          echo $madd | grep $mm > /dev/null 2>&1
317          RETVAL=$?          RETVAL=$?
318          test $RETVAL = 0  &&  present=1          test $RETVAL = 0  &&  present=1
319          continue          continue
320      done      done
321      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
322    done    done
# Line 335  fi Line 325  fi
325    
326  for pname in $MACHINES ; do  for pname in $MACHINES ; do
327    
328        sname=`echo $pname | sed 's/-$//'`
329      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
330      sUser=      sUser=
331      if test $mname != $pname ; then      if test $mname != $pname ; then
# Line 363  for pname in $MACHINES ; do Line 354  for pname in $MACHINES ; do
354          for key in $keys ; do          for key in $keys ; do
355            ctot=`expr $ctot + 1`            ctot=`expr $ctot + 1`
356            sline=`grep "^$key " ./slist | head -1`            sline=`grep "^$key " ./slist | head -1`
357            sdir=`echo $sline | cut -d " " -f 5`            sdir=`echo $sline | cut -d " " -f 5`
358            type=`echo $sline | cut -d " " -f 4`            type=`echo $sline | cut -d " " -f 4`
359            optf=`echo $sline | cut -d " " -f 3`            optf=`echo $sline | cut -d " " -f 3`
360            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
361            if test $num = 0 -a $monthDir = 1 ; then            if test $num = 0 -a $monthDir = 1 ; then
362            #- add results from previous month directory to "plist".            #- add results from previous month directory to "plist".
363              monthDir=2              monthDir=2
364              make_resdir_list              make_resdir_list
365              num=`grep -c "^$key" ./plist`              num=`grep -c "^$key" ./plist`
366            fi            fi
367            #- discard unsafe test:            #- discard unsafe test:
368            dd=`echo $optf | grep -c 'gfortran+mth'`            dd=`echo $optf | grep -c 'gfortran+mth'`
369            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 371  for pname in $MACHINES ; do
371            #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
372            #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
373            dd=`echo $optf | grep -c 'bigred.*noieee'`            dd=`echo $optf | grep -c 'bigred.*noieee'`
374            if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi            #if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
375            if test $num -lt 0 ; then            if test $num -lt 0 ; then
376              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
377              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
378            elif test $num = '0' ; then            elif test $num = '0' ; then
379              echo "no previous test for:" $key | tee -a $OUTPFIL              echo "no previous test for:" $key | tee -a $OUTPFIL
380              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
381            else            else
382              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
383              if test $dBug = 't' ; then              if test $dBug = 't' ; then
384                  echo "s='$sline'" | tee -a $OUTPFIL                  echo "s='$sline'" | tee -a $OUTPFIL
385                  echo "p='$pline'" | tee -a $OUTPFIL                  echo "p='$pline'" | tee -a $OUTPFIL
386              fi              fi
387              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
388              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
389              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outs ) | tail -1`
390                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
391                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfs
392              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
393              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              xx=`( echo 5 ; sed -n '/^  OPTFILE=/=' $outp ) | tail -1`
394                                   | sed 's/ OPTFILE=.*\// OPTFILE=/g' \              sed "1,$xx d" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
395                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                  | grep -v '^[A-S][a-t]* time:  ' > tmpfp
396              #-- re-order list of exp (according to local "sort" order)              #-- re-order list of exp (according to local "sort" order)
397              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`              listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs | awk '{print $NF}' | sort`
398              for xx in $listD              for xx in $listD
# Line 421  for pname in $MACHINES ; do Line 412  for pname in $MACHINES ; do
412              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
413              yy=$?              yy=$?
414              if test $yy != '0' ; then              if test $yy != '0' ; then
415                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
416                  #grep '^run: ' $outp                  #grep '^run: ' $outp
417                  #grep '^run: ' $outs                  #grep '^run: ' $outs
418                  #-- score for each test:                  #-- score for each test:
# Line 439  for pname in $MACHINES ; do Line 430  for pname in $MACHINES ; do
430                  ndf=`expr $ndf / 2`                  ndf=`expr $ndf / 2`
431                  nn=`grep -c '^---' tmpdf`                  nn=`grep -c '^---' tmpdf`
432                  ndf=`expr $ndf - $nn`                  ndf=`expr $ndf - $nn`
433                  if [ $ndf -le $NBLDIFF ] ; then                  if [ $ndf -le $NBLDIFF ] ; then
434                    cat tmpdf                    cat tmpdf
435                  else                  else
436                    echo " $ndf lines differ ( $score_s , $score_p )"                    echo " $ndf lines differ ( $score_s , $score_p )"
# Line 447  for pname in $MACHINES ; do Line 438  for pname in $MACHINES ; do
438                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL                  echo "< "`head -1 $outs`" ( $score_s )" >> $OUTPFIL
439                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL                  echo "> "`head -1 $outp`" ( $score_p )" >> $OUTPFIL
440                  cat tmpdf >> $OUTPFIL                  cat tmpdf >> $OUTPFIL
441                  if [ $cdif -eq 0 ] ; then                  if [ $cdif -eq 0 ] ; then
442                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin=`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
443                  else                  else
444                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`                    clin="$clin,"`printf '%3i (%5s,%5s)' $ndf $score_s $score_p`
445                  fi                  fi
446                  cdif=`expr $cdif + 1`                  cdif=`expr $cdif + 1`
447                  echo '----------------------------------------' | tee -a $OUTPFIL                  echo '----------------------------------------' | tee -a $OUTPFIL
448              else              else
449                  echo " $type , of='$optf'" | tee -a $OUTPFIL                  echo " $type , of='$optf'" | tee -a $OUTPFIL
450              fi              fi
451              rm -f tmpfs tmpfp tmpdf              rm -f tmpfs tmpfp tmpdf
452            fi            fi
453          done          done
454          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
455          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $sname $ctot $tmis $cdif >> $OUTPSUM
456          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
457            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
458         else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi
459      fi      fi
460    
461  done  done

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.22