/[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.199 by mlosch, Wed Feb 18 16:11:31 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)                  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 130  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 145  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 402  genmakemodel() Line 404  genmakemodel()
404              if test "x$EXTRFLG" != x ; then              if test "x$EXTRFLG" != x ; then
405                  command="$command -extra_flag $EXTRFLG"                  command="$command -extra_flag $EXTRFLG"
406              fi              fi
407                if test "x$NOCATAD" = xt ; then
408                    command="$command -nocat4ad"
409                fi
410              if test "x$TS" = xt ; then              if test "x$TS" = xt ; then
411                  command="$command -ts"                  command="$command -ts"
412              fi              fi
# Line 523  makemodel() Line 528  makemodel()
528      else      else
529          cd $1;          cd $1;
530          if test -r Makefile ; then          if test -r Makefile ; then
531              printf 'make ... '              if test "x$MKSMALLF" = xt ; then
532              if test "x$REPLMAKE" = x ; then                  printf 'make small_f ... '
533                  $MAKE $TARG >> make.tr_log 2>&1                  $MAKE_CMD small_f >> make.tr_log 2>&1
534              else                  RETVAL=$?
535                  $REPLMAKE $TARG >> make.tr_log 2>&1                  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              fi
546                printf 'make ... '
547                $MAKE_CMD $TARG >> make.tr_log 2>&1
548              RETVAL=$?              RETVAL=$?
549              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
550                  tail make.tr_log                  tail make.tr_log
# Line 776  runmodel() Line 792  runmodel()
792          if test "x$MPI" != x0 ; then          if test "x$MPI" != x0 ; then
793              #- adjust the MPI run command with the right number of Procs              #- adjust the MPI run command with the right number of Procs
794              #echo '' ; echo "  COMMAND='$COMMAND'"              #echo '' ; echo "  COMMAND='$COMMAND'"
795              COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $LOC_NPROC /"`              COMMAND=`echo $COMMAND | sed "s/ TR_NPROC/ $LOC_NPROC/"`
796              if test "x$MPI_MFILE" != x ; then              if test "x$MPI_MFILE" != x ; then
797                COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"`                COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"`
798              fi              fi
# 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 1044  MKDEPEND= Line 1067  MKDEPEND=
1067  if test "x$MAKE" = x ; then  if test "x$MAKE" = x ; then
1068      MAKE=make      MAKE=make
1069  fi  fi
1070  REPLMAKE=  MAKE_CMD=
1071  if test "x$CC" = x ; then  if test "x$CC" = x ; then
1072      CC=cc      CC=cc
1073  fi  fi
# Line 1057  OUTDIR= Line 1080  OUTDIR=
1080  DELDIR=  DELDIR=
1081  USE_R4=  USE_R4=
1082  EXTRFLG=  EXTRFLG=
1083    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 1116  for ac_option ; do Line 1141  for ac_option ; do
1141          -make | --make | -m | --m) ac_prev=MAKE ;;          -make | --make | -m | --m) ac_prev=MAKE ;;
1142          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;
1143    
1144          -repl_mk | --repl_mk ) ac_prev=REPLMAKE ;;          -repl_mk | --repl_mk ) ac_prev=MAKE_CMD ;;
1145          -repl_mk=* | --repl_mk=*) REPLMAKE=$ac_optarg ;;          -repl_mk=* | --repl_mk=*) MAKE_CMD=$ac_optarg ;;
1146    
1147          -odir | --odir) ac_prev=OUTDIR ;;          -odir | --odir) ac_prev=OUTDIR ;;
1148          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;
# Line 1165  for ac_option ; do Line 1190  for ac_option ; do
1190          -oad) if test $KIND = 0 ; then KIND=4 ; NODEPEND=t ; else          -oad) if test $KIND = 0 ; then KIND=4 ; NODEPEND=t ; else
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 ;;
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 1184  for ac_option ; do Line 1211  for ac_option ; do
1211    
1212          -ts) TS=t;;          -ts) TS=t;;
1213          -papis) PAPIS=t;;          -papis) PAPIS=t;;
1214          -pcls) PCL=t;;          -pcls) PCLS=t;;
1215    
1216          -*) echo "Error: unrecognized option: "$ac_option          -*) echo "Error: unrecognized option: "$ac_option
1217              usage ;;              usage ;;
# Line 1200  if test "x$QUICK" = xt ; then Line 1227  if test "x$QUICK" = xt ; then
1227      NOCLEAN=t      NOCLEAN=t
1228      NODEPEND=t      NODEPEND=t
1229  fi  fi
1230    if test "x$MAKE_CMD" = x ; then MAKE_CMD=$MAKE ; fi
1231    
1232  #- check length of MPI machine file:  #- check length of MPI machine file:
1233  if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then  if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then
# Line 1238  elif test $KIND = 4 ; then Line 1266  elif test $KIND = 4 ; then
1266      ref_outp="output_oadm.txt"      ref_outp="output_oadm.txt"
1267      EXECUTABLE="mitgcmuv_ad"      EXECUTABLE="mitgcmuv_ad"
1268  else  else
     if test "x$JOBS" != x ; then TARG="-j $JOBS $TARG" ; fi  
1269      code_dir=code      code_dir=code
1270      inputdir=input      inputdir=input
1271      ref_outp="output.txt"      ref_outp="output.txt"
1272      EXECUTABLE="mitgcmuv"      EXECUTABLE="mitgcmuv"
1273  fi  fi
1274    if test "x$JOBS" != x ; then TARG="-j $JOBS $TARG" ; fi
1275    
1276  xx=`echo $TESTDIRS | awk '{print $1}'`  xx=`echo $TESTDIRS | awk '{print $1}'`
1277  if test "x$TESTDIRS" = x ; then  if test "x$TESTDIRS" = x ; then
# Line 1306  fi Line 1334  fi
1334    
1335  echo "OK (COMMAND='$COMMAND')"  echo "OK (COMMAND='$COMMAND')"
1336    
1337  TMP=./tr_$$  #TMP=./tr_$$
1338  #- try to put temporary files in system-local /tmp dir  #- try to put temporary files in system-local /tmp dir
1339  #TMP=/tmp/tr_$$  TMP=/tmp/tr_${USER}_$$
1340  #touch $TMP ; retVal=$?  touch $TMP ; retVal=$?
1341  #if [ $retVal -eq 0 ] ; then  if [ $retVal -eq 0 ] ; then
1342  #  if test ! -r $TMP ; then TMP=./tr_$$ ; fi    if test ! -r $TMP ; then TMP=./tr_$$ ; fi
1343  #else  else
1344  #  TMP=./tr_$$    TMP=./tr_$$
1345  #fi  fi
1346  #rm -f $TMP  rm -f $TMP
1347  #if [ $verbose -gt 1 ]; then echo " temp files: $TMP" ; fi  if [ $verbose -gt 1 ]; then echo " temp files: $TMP" ; fi
1348    
1349  # set the Default List of output variables to be checked:  # set the Default List of output variables to be checked:
1350  #  (use default or load experiment-specific list from file "tr_checklist")  #  (use default or load experiment-specific list from file "tr_checklist")
# Line 1372  if test "x$OUTDIR" != x ; then Line 1400  if test "x$OUTDIR" != x ; then
1400  else  else
1401     #short_name=`hostname -s | tr '[:upper:]' '[:lower:]'`     #short_name=`hostname -s | tr '[:upper:]' '[:lower:]'`
1402     # hostname -s is not universal (does work on AIX system)     # hostname -s is not universal (does work on AIX system)
1403     short_name=`hostname | sed 's/\..*$//' | tr '[:upper:]' '[:lower:]'`      short_name=`hostname | sed 's/\..*$//' | tr '[:upper:]' '[:lower:]'`
     
1404      BASE="tr_"$short_name"_"$DATE"_"      BASE="tr_"$short_name"_"$DATE"_"
1405  fi  fi
1406  DNUM=0  DNUM=0
# Line 1682  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 1713  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.199  
changed lines
  Added in v.1.204

  ViewVC Help
Powered by ViewVC 1.1.22