/[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.61 by edhill, Thu Dec 16 20:25:11 2004 UTC revision 1.68 by edhill, Tue Jun 7 22:21:47 2005 UTC
# Line 95  testoutput_for_prop() Line 95  testoutput_for_prop()
95      fi      fi
96      if [ -r $1/$4/output.txt ]; then      if [ -r $1/$4/output.txt ]; then
97          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt
98          lncnt=`wc -l tmp1.txt | awk '{print $1}' `          lncntA=`wc -l tmp1.txt | awk '{print $1}' `
99          if [ $lncnt -lt 3 ]; then          if [ $lncntA -lt 3 ]; then
100              if [ $verbose -gt 0 ]; then              if [ $verbose -gt 0 ]; then
101                  echo Not enough lines of output when searching for "$2" 1>&2                  echo Not enough lines of output when searching for "$2" 1>&2
102              fi              fi
# Line 110  testoutput_for_prop() Line 110  testoutput_for_prop()
110          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
111      fi      fi
112      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
113      lncnt=`wc -l tmp2.txt | awk '{print $1}' `      lncntB=`wc -l tmp2.txt | awk '{print $1}' `
114      if [ $lncnt -lt 3 ]; then      if [ $lncntB -lt 3 ]; then
115          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
116              echo Not enough lines of output when searching for "$2" 1>&2              echo Not enough lines of output when searching for "$2" 1>&2
117          fi          fi
118          return 99          return 99
119      fi      fi
120        if [ $lncntA -ne $lncntB ]; then
121            if [ $verbose -gt 0 ]; then
122                echo Not same Nb of lines when searching for "$2" ":" $lncntA $lncntB 1>&2
123            fi
124            return 99
125        fi
126      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
127          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2
128      fi      fi
# Line 294  genmakemodel() Line 300  genmakemodel()
300              if test "x$IEEE" != x ; then              if test "x$IEEE" != x ; then
301                  command="$command -ieee"                  command="$command -ieee"
302              fi              fi
303                if test "x$MPI" = xt ; then
304                    command="$command -mpi"
305                fi
306              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
307              $command > make.log 2>&1              $command > make.log 2>&1
308              RETVAL=$?              RETVAL=$?
# Line 339  makeclean() Line 348  makeclean()
348      fi      fi
349  }  }
350    
351    postclean()
352    {
353        # postclean directory
354        if test "x$POSTCLEAN" = xt ; then
355            (
356                cd $1;
357                if test -r Makefile ; then
358                    $MAKE CLEAN >> /dev/null 2>&1
359                fi
360                exit 0
361            )
362        fi
363    }
364    
365  makedependmodel()  makedependmodel()
366  {  {
367      # makedependmodel directory      # makedependmodel directory
# Line 529  int main( int argc, char** argv )  { Line 552  int main( int argc, char** argv )  {
552      abave = 0.5*(fabs(a)+fabs(b));      abave = 0.5*(fabs(a)+fabs(b));
553      if (abave > 0.0) {      if (abave > 0.0) {
554        relerr=fabs(a-b)/abave;        relerr=fabs(a-b)/abave;
555        if (relerr > 0.0) { linnum = (int)log10(relerr); }        if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); }
556        else { linnum = -16 ; }        else { linnum = -16 ; }
557        best = (best > linnum) ? best : linnum;        best = (best > linnum) ? best : linnum;
558      }      }
# Line 627  QUICK=f Line 650  QUICK=f
650  NOGENMAKE=f  NOGENMAKE=f
651  NOCLEAN=f  NOCLEAN=f
652  NODEPEND=f  NODEPEND=f
653    POSTCLEAN=f
654    
655  BASH=  BASH=
656  OPTFILE=NONE  OPTFILE=NONE
# Line 720  for ac_option ; do Line 744  for ac_option ; do
744          -nodepend | --nodepend | -nd | --nd)          -nodepend | --nodepend | -nd | --nd)
745              NODEPEND=t ;;              NODEPEND=t ;;
746    
747            -postclean | --postclean | -pc | --pc)
748                POSTCLEAN=t ;;
749    
750          -mpi) MPI=t ;;          -mpi) MPI=t ;;
751    
752          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
# Line 875  for dir in $TESTDIRS ; do Line 902  for dir in $TESTDIRS ; do
902          if test -r $dir/input/Makefile ; then          if test -r $dir/input/Makefile ; then
903              ( cd $dir/input ; make CLEAN )              ( cd $dir/input ; make CLEAN )
904          fi          fi
905            (
906                cd $dir
907                rm -rf tr_run.*
908            )
909          continue          continue
910      fi      fi
911    
# Line 972  for dir in $TESTDIRS ; do Line 1003  for dir in $TESTDIRS ; do
1003    
1004          for ex in $extra_runs ; do          for ex in $extra_runs ; do
1005              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"
1006              for ldir in build input input.$ex ; do              for ldir in input.$ex input ; do
1007                  (                  (
1008                      cd "$dir/$ldir" > /dev/null 2>&1                      cd "$dir/$ldir" > /dev/null 2>&1
1009                      ls -1 2>/dev/null \                      ls -1 2>/dev/null \
# Line 982  for dir in $TESTDIRS ; do Line 1013  for dir in $TESTDIRS ; do
1013                      cd "$dir/tr_run.$ex"                      cd "$dir/tr_run.$ex"
1014                      cat ../../tr_exrun_links | while read i ; do                      cat ../../tr_exrun_links | while read i ; do
1015                          if test ! "x$i" = x ; then                          if test ! "x$i" = x ; then
1016                              test -e $i  &&  rm -f $i                              test ! -r $i  &&  ln -s "../"$ldir"/"$i $i
                             ln -s "../"$ldir"/"$i $i  
1017                          fi                          fi
1018                      done                      done
1019                  )                  )
1020                  test -e tr_exrun_links  &&  rm -f tr_exrun_links                  test -e tr_exrun_links  &&  rm -f tr_exrun_links
1021              done              done
1022                ldir=build
1023                (
1024                    cd "$dir/$ldir" > /dev/null 2>&1
1025                    ls -1 Makefile *.[fFhco] mitgcmuv  2>/dev/null \
1026                        | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'
1027                ) > tr_exrun_links
1028                (
1029                    cd "$dir/tr_run.$ex"
1030                        cat ../../tr_exrun_links | while read i ; do
1031                            if test ! "x$i" = x ; then
1032                                test ! -r $i  &&  ln -s "../"$ldir"/"$i $i
1033                            fi
1034                        done
1035                )
1036                test -e tr_exrun_links  &&  rm -f tr_exrun_links
1037              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
1038                  && results=`testoutput $dir tr_run.$ex "."$ex`                  && results=`testoutput $dir tr_run.$ex "."$ex`
1039              fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`              fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
# Line 1013  for dir in $TESTDIRS ; do Line 1058  for dir in $TESTDIRS ; do
1058          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1059          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
1060      fi      fi
1061    
1062        postclean $dir/$builddir
1063            
1064      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1065            
# Line 1054  fi Line 1101  fi
1101  rm -f tmp_cmpnum.c tmp_cmpnum  rm -f tmp_cmpnum.c tmp_cmpnum
1102    
1103  if test "x$CLEANUP" != xt ; then  if test "x$CLEANUP" != xt ; then
1104      cat $SUMMARY      cat $SUMMARY | sed 's/ -- -- -- --//g'
1105      if test -e tr_out.txt ; then      if test -e tr_out.txt ; then
1106          mv tr_out.txt tr_out.txt.old          mv tr_out.txt tr_out.txt.old
1107      fi      fi
1108      cat $SUMMARY > tr_out.txt      cat $SUMMARY | sed 's/ -- -- -- --//g' > tr_out.txt
1109  fi  fi
1110    
1111  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.68

  ViewVC Help
Powered by ViewVC 1.1.22