/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Diff of /MITgcm/verification/testreport

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.201 by jmc, Mon Feb 23 23:05:57 2015 UTC revision 1.204 by jmc, Fri Nov 20 19:47:46 2015 UTC
# Line 42  usage() Line 42  usage()
42      echo "  (-bash|-b) STRING        preferred location of a \"bash\" or \"sh\" shell"      echo "  (-bash|-b) STRING        preferred location of a \"bash\" or \"sh\" shell"
43      echo "                             (DEF=\"\" for \"bash\")"      echo "                             (DEF=\"\" for \"bash\")"
44      echo "  (-ef) STRING             used as genmake2 \"-extra_flag\" argument"      echo "  (-ef) STRING             used as genmake2 \"-extra_flag\" argument"
45      echo "  (-ncad)                  used genmake2 option \"-nocat4ad\" (-ncad)"      echo "  (-ncad)                  use genmake2 option \"-nocat4ad\" (-ncad)"
46        echo "  (-small_f)               make target small_f before making target all"
47      echo "  (-makedepend|-md) STRING command to use for \"makedepend\""      echo "  (-makedepend|-md) STRING command to use for \"makedepend\""
48      echo "  (-make|-m) STRING        command to use for \"make\""      echo "  (-make|-m) STRING        command to use for \"make\""
49      echo "                             (DEF=\"make\")"      echo "                             (DEF=\"make\")"
# Line 131  testoutput_var() Line 132  testoutput_var()
132          echo testoutput_var: grep "$2" $1/$4/$OUTPUTFILE 1>&2          echo testoutput_var: grep "$2" $1/$4/$OUTPUTFILE 1>&2
133      fi      fi
134      if [ -r $1/$4/$OUTPUTFILE ]; then      if [ -r $1/$4/$OUTPUTFILE ]; then
135          grep "$2" $1/$4/$OUTPUTFILE | sed 's/.*=//' | cat -n > ${TMP}a.txt          grep "$2" $1/$4/$OUTPUTFILE | sed 's/.*=//' | nl > ${TMP}a.txt
136          lncntA=`wc -l ${TMP}a.txt | awk '{print $1}' `          lncntA=`wc -l ${TMP}a.txt | awk '{print $1}' `
137          if [ $lncntA -lt 2 ]; then          if [ $lncntA -lt 2 ]; then
138              if [ $verbose -gt 0 ]; then              if [ $verbose -gt 0 ]; then
# Line 146  testoutput_var() Line 147  testoutput_var()
147      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
148          echo testoutput_var: grep "$2" $1/$5 1>&2          echo testoutput_var: grep "$2" $1/$5 1>&2
149      fi      fi
150      grep "$2" $1/$5 | sed 's/.*=//' | cat -n > ${TMP}b.txt      grep "$2" $1/$5 | sed 's/.*=//' | nl > ${TMP}b.txt
151      lncntB=`wc -l ${TMP}b.txt | awk '{print $1}' `      lncntB=`wc -l ${TMP}b.txt | awk '{print $1}' `
152      if [ $lncntB -lt 2 ]; then      if [ $lncntB -lt 2 ]; then
153          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
# Line 527  makemodel() Line 528  makemodel()
528      else      else
529          cd $1;          cd $1;
530          if test -r Makefile ; then          if test -r Makefile ; then
531                if test "x$MKSMALLF" = xt ; then
532                    printf 'make small_f ... '
533                    $MAKE_CMD small_f >> make.tr_log 2>&1
534                    RETVAL=$?
535                    if test "x$RETVAL" != x0 ; then
536                        tail make.tr_log
537                        echo failed
538                        cp genmake.log genmake.tr_log $CDIR
539                        tail -$NBLINES_MKLOG make.tr_log > $CDIR"/make.tr_log_tail"
540                        rm -f $EXECUTABLE
541                        mk_fail=1
542                    else
543                        echo successful
544                    fi
545                fi
546              printf 'make ... '              printf 'make ... '
547              $MAKE_CMD $TARG >> make.tr_log 2>&1              $MAKE_CMD $TARG >> make.tr_log 2>&1
548              RETVAL=$?              RETVAL=$?
# Line 842  runmodel() Line 858  runmodel()
858          if test -f $OUTPUTFILE ; then          if test -f $OUTPUTFILE ; then
859            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
860                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
861            grep -A3 'Seconds in section "ALL' $OUTPUTFILE \  #         grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
862                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"  #               | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
863    #         some implementations of grep cannot do contextual searches so we
864    #         replace the above with a sed command
865              cat $OUTPUTFILE | sed -n '/Seconds in section "ALL/{N
866              N
867              N
868              p
869              }' | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
870          fi          fi
871          if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi          if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
872          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
# Line 1058  DELDIR= Line 1081  DELDIR=
1081  USE_R4=  USE_R4=
1082  EXTRFLG=  EXTRFLG=
1083  NOCATAD=  NOCATAD=
1084    MKSMALLF=
1085    
1086  #- type of testing (KIND):  #- type of testing (KIND):
1087  #   KIND=0 : forward (= default) ;  KIND=1 : Tangent Linear with TAF ;  #   KIND=0 : forward (= default) ;  KIND=1 : Tangent Linear with TAF ;
# Line 1167  for ac_option ; do Line 1191  for ac_option ; do
1191                  echo "Error: '-tlm', '-adm' and '-oad' are exclusive" ; usage                  echo "Error: '-tlm', '-adm' and '-oad' are exclusive" ; usage
1192                fi ;;                fi ;;
1193          -ncad) NOCATAD=t ;;          -ncad) NOCATAD=t ;;
1194            -small_f) MKSMALLF=t ;;
1195    
1196          -ieee)   echo "Warning: ignore option '-ieee' (already the default)"          -ieee)   echo "Warning: ignore option '-ieee' (already the default)"
1197                   printf " ... " ;;                   printf " ... " ;;
# Line 1684  for dir in $TESTDIRS ; do Line 1709  for dir in $TESTDIRS ; do
1709  #           sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state  #           sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state
1710  # bsd-sed cannot do the above code  # bsd-sed cannot do the above code
1711              cat $dir/$builddir/Makefile | \              cat $dir/$builddir/Makefile | \
1712                  sed  -n '/^# executed by:/{N                  sed -n '/^# executed by:/{N
1713                                             p                                            p
1714                                             }' >> $DRESULTS/genmake_state                                            }' >> $DRESULTS/genmake_state
1715              echo " $mkOpt" >> $DRESULTS/genmake_state              echo " $mkOpt" >> $DRESULTS/genmake_state
1716              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1717                  eval $mkOpt                  eval $mkOpt
# Line 1715  for dir in $TESTDIRS ; do Line 1740  for dir in $TESTDIRS ; do
1740                                           >> $DRESULTS/genmake_state                                           >> $DRESULTS/genmake_state
1741                    rm -f tmp.tr_log                    rm -f tmp.tr_log
1742                  fi                  fi
1743                  echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state              fi
1744                  echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state              gmkLog=$dir/$builddir/genmake_state
1745                  sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state              if test -r $gmkLog ; then
1746                  sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state                  echo -n "from '$gmkLog', "      >> $DRESULTS/genmake_state
1747                    echo "get genmake settings:"    >> $DRESULTS/genmake_state
1748                    sed -n '/^HAVE_/p' $gmkLog | sed 's/^./ &/' \
1749                                                    >> $DRESULTS/genmake_state
1750              fi              fi
1751          fi          fi
1752      fi      fi

Legend:
Removed from v.1.201  
changed lines
  Added in v.1.204

  ViewVC Help
Powered by ViewVC 1.1.22