/[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.71 by jmc, Tue Aug 16 17:12:46 2005 UTC revision 1.75 by jmc, Fri Feb 24 23:15:25 2006 UTC
# Line 125  testoutput_for_prop() Line 125  testoutput_for_prop()
125          fi          fi
126          return 99          return 99
127      fi      fi
128      non_real_numb=`egrep -c -i 'NAN|INF' tmp1.txt`      has_nan=`cat tmp1.txt | grep -i nan | wc -l`
129      if [ $non_real_numb -gt 0 ]; then      if [ $has_nan -gt 0  ] ; then
130          echo testoutput_for_prop: output.txt has $non_real_numb not real numbers 1>&2          echo testoutput_for_prop: output.txt contains $has_nan NaN values  1>&2
131            return 99
132        fi
133        has_inf=`cat tmp1.txt | grep -i inf | wc -l`
134        if [ $has_inf -gt 0  ] ; then
135            echo testoutput_for_prop: output.txt contains $has_inf Inf values  1>&2
136          return 99          return 99
137      fi      fi
138      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
# Line 510  runmodel() Line 515  runmodel()
515      #  (where "$COMMAND" is relative to "directory")      #  (where "$COMMAND" is relative to "directory")
516      (      (
517          cd $1          cd $1
518          printf 'runmodel ... ' 1>&2          printf 'runmodel in %s ...' $1 1>&2
519          # make output.txt          # make output.txt
520          echo          echo
521          rm -f run.log          rm -f run.log
522            if test output.txt -ot mitgcmuv ; then
523               ( eval $COMMAND ) > run.log 2>&1
524               RETVAL=$?
525            else
526               echo ' output.txt is up to date ' > run.log 2>&1
527               RETVAL=0
528            fi
529          # echo "COMMAND='$COMMAND'"          # echo "COMMAND='$COMMAND'"
530          # echo "pwd='"`pwd`"'"          # echo "pwd='"`pwd`"'"
         ( eval $COMMAND ) > run.log 2>&1  
         RETVAL=$?  
531          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
532              tail run.log              tail run.log
533              echo successful 1>&2              echo successful 1>&2
# Line 806  if test "x$ADM" = xt -a "x$COMMAND" = x Line 816  if test "x$ADM" = xt -a "x$COMMAND" = x
816  fi  fi
817    
818  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
819      COMMAND="$MAKE output.txt"      COMMAND="./mitgcmuv > output.txt"
820  fi  fi
821    
822  echo "OK"  echo "OK"
# Line 986  for dir in $TESTDIRS ; do Line 996  for dir in $TESTDIRS ; do
996      echo "Experiment:  $dir"      echo "Experiment:  $dir"
997      echo      echo
998      unset genmake makedepend make run      unset genmake makedepend make run
999      results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'      results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'
1000    
1001      #  Create an output dir for each OPTFILE/tdir combination      #  Create an output dir for each OPTFILE/tdir combination
1002      rel_CDIR=$DRESULTS"/"$dir      rel_CDIR=$DRESULTS"/"$dir
# Line 1018  for dir in $TESTDIRS ; do Line 1028  for dir in $TESTDIRS ; do
1028          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
1029    
1030          for ex in $extra_runs ; do          for ex in $extra_runs ; do
1031                unset run
1032                results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'
1033                #  Create an output dir for each OPTFILE/tdir.ex combination
1034                rel_CDIR=$DRESULTS"/"$dir"."$ex
1035                mkdir $rel_CDIR
1036                CDIR=`pwd`"/$rel_CDIR"
1037              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"
1038              for ldir in input.$ex input ; do              for ldir in input.$ex input ; do
1039                  (                  (
# Line 1037  for dir in $TESTDIRS ; do Line 1053  for dir in $TESTDIRS ; do
1053              done              done
1054              ldir=build              ldir=build
1055              (              (
1056                  cd "$dir/$ldir" > /dev/null 2>&1                  cd $dir/tr_run.$ex
1057                  ls -1 Makefile *.[fFhco] mitgcmuv  2>/dev/null \                  test ! -e mitgcmuv  &&  ln -s "../"$ldir"/"mitgcmuv .
                     | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'  
             ) > tr_exrun_links  
             (  
                 cd "$dir/tr_run.$ex"  
                     cat ../../tr_exrun_links | while read i ; do  
                         if test ! "x$i" = x ; then  
                             test ! -r $i  &&  ln -s "../"$ldir"/"$i $i  
                         fi  
                     done  
1058              )              )
             test -e tr_exrun_links  &&  rm -f tr_exrun_links  
1059              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
1060                  && results=`testoutput $dir tr_run.$ex "."$ex`                  && results=`testoutput $dir tr_run.$ex "."$ex`
1061              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 1061  for dir in $TESTDIRS ; do Line 1067  for dir in $TESTDIRS ; do
1067              echo "MACH='$MACH'" >> $CDIR"/summary.txt"              echo "MACH='$MACH'" >> $CDIR"/summary.txt"
1068              echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"              echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
1069              echo "DATE='$DATE'" >> $CDIR"/summary.txt"              echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1070              echo "tdir='$dir'" >> $CDIR"/summary.txt"              echo "tdir='$dir.$ex'" >> $CDIR"/summary.txt"
1071          done          done
1072      else      else
1073          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}`

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.22