/[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.62 by edhill, Tue Jan 25 22:41:05 2005 UTC revision 1.70 by jmc, Thu Jul 28 21:12:15 2005 UTC
# Line 27  usage() Line 27  usage()
27      echo "                             (DEF=\"make output.txt\")"      echo "                             (DEF=\"make output.txt\")"
28      echo "  (-m|-make) STRING        command to use for \"make\""      echo "  (-m|-make) STRING        command to use for \"make\""
29      echo "                             (DEF=\"make\")"      echo "                             (DEF=\"make\")"
30        echo "  (-odir) STRING           used to build output directory name"
31        echo "                             (DEF=\"hostname\")"
32      echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"      echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"
33      echo "                             (DEF=\"1 2 3 4 5\")"      echo "                             (DEF=\"1 2 3 4 5\")"
34      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
# Line 95  testoutput_for_prop() Line 97  testoutput_for_prop()
97      fi      fi
98      if [ -r $1/$4/output.txt ]; then      if [ -r $1/$4/output.txt ]; then
99          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt
100          lncnt=`wc -l tmp1.txt | awk '{print $1}' `          lncntA=`wc -l tmp1.txt | awk '{print $1}' `
101          if [ $lncnt -lt 3 ]; then          if [ $lncntA -lt 3 ]; then
102              if [ $verbose -gt 0 ]; then              if [ $verbose -gt 0 ]; then
103                  echo Not enough lines of output when searching for "$2" 1>&2                  echo Not enough lines of output when searching for "$2" 1>&2
104              fi              fi
# Line 110  testoutput_for_prop() Line 112  testoutput_for_prop()
112          echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2          echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2
113      fi      fi
114      grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt      grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt
115      lncnt=`wc -l tmp2.txt | awk '{print $1}' `      lncntB=`wc -l tmp2.txt | awk '{print $1}' `
116      if [ $lncnt -lt 3 ]; then      if [ $lncntB -lt 3 ]; then
117          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
118              echo Not enough lines of output when searching for "$2" 1>&2              echo Not enough lines of output when searching for "$2" 1>&2
119          fi          fi
120          return 99          return 99
121      fi      fi
122        if [ $lncntA -ne $lncntB ]; then
123            if [ $verbose -gt 0 ]; then
124                echo Not same Nb of lines when searching for "$2" ":" $lncntA $lncntB 1>&2
125            fi
126            return 99
127        fi
128      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
129          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2
130      fi      fi
# Line 294  genmakemodel() Line 302  genmakemodel()
302              if test "x$IEEE" != x ; then              if test "x$IEEE" != x ; then
303                  command="$command -ieee"                  command="$command -ieee"
304              fi              fi
305                if test "x$MPI" = xt ; then
306                    command="$command -mpi"
307                fi
308              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
309              $command > make.log 2>&1              $command > make.log 2>&1
310              RETVAL=$?              RETVAL=$?
# Line 339  makeclean() Line 350  makeclean()
350      fi      fi
351  }  }
352    
353    postclean()
354    {
355        # postclean directory
356        if test "x$POSTCLEAN" = xt ; then
357            (
358                cd $1;
359                if test -r Makefile ; then
360                    $MAKE CLEAN >> /dev/null 2>&1
361                fi
362                exit 0
363            )
364        fi
365    }
366    
367  makedependmodel()  makedependmodel()
368  {  {
369      # makedependmodel directory      # makedependmodel directory
# Line 529  int main( int argc, char** argv )  { Line 554  int main( int argc, char** argv )  {
554      abave = 0.5*(fabs(a)+fabs(b));      abave = 0.5*(fabs(a)+fabs(b));
555      if (abave > 0.0) {      if (abave > 0.0) {
556        relerr=fabs(a-b)/abave;        relerr=fabs(a-b)/abave;
557        if (relerr > 0.0) { linnum = (int)lrint(log10(relerr)); }        if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); }
558        else { linnum = -16 ; }        else { linnum = -16 ; }
559        best = (best > linnum) ? best : linnum;        best = (best > linnum) ? best : linnum;
560      }      }
# Line 627  QUICK=f Line 652  QUICK=f
652  NOGENMAKE=f  NOGENMAKE=f
653  NOCLEAN=f  NOCLEAN=f
654  NODEPEND=f  NODEPEND=f
655    POSTCLEAN=f
656    
657  BASH=  BASH=
658  OPTFILE=NONE  OPTFILE=NONE
# Line 644  if test "x$CC" = x ; then Line 670  if test "x$CC" = x ; then
670  fi  fi
671  JOBS=  JOBS=
672  MPI=f  MPI=f
673    OUTDIR=
674  DELDIR=  DELDIR=
675    
676  ADM=  ADM=
# Line 700  for ac_option ; do Line 727  for ac_option ; do
727          -make=* | --make=*)          -make=* | --make=*)
728              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
729    
730            -odir | --odir)
731                ac_prev=OUTDIR ;;
732            -odir=* | --odir=*)
733                OUTDIR=$ac_optarg ;;
734    
735          -ptracers | --ptracers | -ptr | --ptr)          -ptracers | --ptracers | -ptr | --ptr)
736              ac_prev=PTRACERS_NUM ;;              ac_prev=PTRACERS_NUM ;;
737          -ptracers=* | --ptracers=* | -ptr=* | --ptr=*)          -ptracers=* | --ptracers=* | -ptr=* | --ptr=*)
# Line 709  for ac_option ; do Line 741  for ac_option ; do
741          -j=*) JOBS=$ac_optarg ;;          -j=*) JOBS=$ac_optarg ;;
742    
743          -clean | --clean)          -clean | --clean)
744              CLEANUP=t ;;              CLEANUP=t ; DELDIR=t ;;
745    
746          -quick | --quick | -q | --q)          -quick | --quick | -q | --q)
747              QUICK=t ;;              QUICK=t ;;
# Line 720  for ac_option ; do Line 752  for ac_option ; do
752          -nodepend | --nodepend | -nd | --nd)          -nodepend | --nodepend | -nd | --nd)
753              NODEPEND=t ;;              NODEPEND=t ;;
754    
755            -postclean | --postclean | -pc | --pc)
756                POSTCLEAN=t ;;
757    
758          -mpi) MPI=t ;;          -mpi) MPI=t ;;
759    
760          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
# Line 786  MACH=`hostname` Line 821  MACH=`hostname`
821  UNAMEA=`uname -a`  UNAMEA=`uname -a`
822  DATE=`date +%Y%m%d`  DATE=`date +%Y%m%d`
823  BASE="tr_"$MACH"_"$DATE"_"  BASE="tr_"$MACH"_"$DATE"_"
824    if test "x$OUTDIR" != x ; then
825        BASE="tr_"$OUTDIR"_"$DATE"_"
826    fi
827  DNUM=0  DNUM=0
828  DRESULTS="$BASE$DNUM"  DRESULTS="$BASE$DNUM"
829  while test -e $DRESULTS ; do  while test -e $DRESULTS ; do
# Line 995  for dir in $TESTDIRS ; do Line 1033  for dir in $TESTDIRS ; do
1033              ldir=build              ldir=build
1034              (              (
1035                  cd "$dir/$ldir" > /dev/null 2>&1                  cd "$dir/$ldir" > /dev/null 2>&1
1036                  ls -1 Makefile *.[fFhco]* mitgcmuv  2>/dev/null \                  ls -1 Makefile *.[fFhco] mitgcmuv  2>/dev/null \
1037                      | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'                      | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'
1038              ) > tr_exrun_links              ) > tr_exrun_links
1039              (              (
# Line 1031  for dir in $TESTDIRS ; do Line 1069  for dir in $TESTDIRS ; do
1069          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1070          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
1071      fi      fi
1072    
1073        postclean $dir/$builddir
1074            
1075      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1076            
# Line 1072  fi Line 1112  fi
1112  rm -f tmp_cmpnum.c tmp_cmpnum  rm -f tmp_cmpnum.c tmp_cmpnum
1113    
1114  if test "x$CLEANUP" != xt ; then  if test "x$CLEANUP" != xt ; then
1115      cat $SUMMARY      cat $SUMMARY | sed 's/ -- -- -- --//g'
1116      if test -e tr_out.txt ; then      if test -e tr_out.txt ; then
1117          mv tr_out.txt tr_out.txt.old          mv tr_out.txt tr_out.txt.old
1118      fi      fi
1119      cat $SUMMARY > tr_out.txt      cat $SUMMARY | sed 's/ -- -- -- --//g' > tr_out.txt
1120  fi  fi
1121    
1122  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.70

  ViewVC Help
Powered by ViewVC 1.1.22