/[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.83 by jmc, Wed Jul 5 22:39:57 2006 UTC revision 1.86 by jmc, Sun Jul 16 04:02:49 2006 UTC
# Line 18  usage() Line 18  usage()
18      echo "  (-optfile=|-of=)STRING   list of optfiles to use"      echo "  (-optfile=|-of=)STRING   list of optfiles to use"
19      echo "  (-a|-addr) STRING        list of email recipients"      echo "  (-a|-addr) STRING        list of email recipients"
20      echo "                             (DEF=\"edhill@mitgcm.org\")"      echo "                             (DEF=\"edhill@mitgcm.org\")"
21      echo "  (-t|-tdir) STRING        list of test dirs to use"      echo "  (-t|-tdir) STRING        list of group and/or exp. dirs to test"
22      echo "                             (DEF=\"\" which builds all)"      echo "                             (recognized groups: basic, tutorials)"
23        echo "                             (DEF=\"\" which test all)"
24      echo "  (-b|-bash) STRING        preferred location of a \"bash\" or"      echo "  (-b|-bash) STRING        preferred location of a \"bash\" or"
25      echo "                             Bourne-compatible \"sh\" shell"      echo "                             Bourne-compatible \"sh\" shell"
26      echo "                             (DEF=\"\" for \"bash\")"      echo "                             (DEF=\"\" for \"bash\")"
# Line 110  testoutput_for_prop() Line 111  testoutput_for_prop()
111          return 99          return 99
112      fi      fi
113      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
114          echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2          echo testoutput_for_prop: grep "$2" $1/results/output.$5 1>&2
115      fi      fi
116      grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt      grep "$2" $1/results/output.$5 | sed 's/.*=//' | cat -n > tmp2.txt
117      lncntB=`wc -l tmp2.txt | awk '{print $1}' `      lncntB=`wc -l tmp2.txt | awk '{print $1}' `
118      if [ $lncntB -lt 3 ]; then      if [ $lncntB -lt 3 ]; then
119          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
# Line 840  if test "x$TESTDIRS" = x ; then Line 841  if test "x$TESTDIRS" = x ; then
841      else      else
842          TESTDIRS=`scandirs results`          TESTDIRS=`scandirs results`
843      fi      fi
844    else
845        #- expand group of experiments:
846        LIST=" "
847        for xx in $TESTDIRS
848        do
849          case $xx in
850            'basic') LIST=${LIST}" aim.5l_cs hs94.128x64x5 ideal_2D_oce"
851                     LIST=${LIST}" lab_sea tutorial_baroclinic_gyre"
852                     LIST=${LIST}" tutorial_global_oce_latlon tutorial_plume_on_slope"
853                    ;;
854            'tutorials')
855                     LIST=${LIST}" "`ls | grep 'tutorial_'` ;;
856            *)       LIST=${LIST}" "$xx ;;
857          esac
858        done
859        #echo 'LIST='${LIST}'<'
860        #- remove duplicate and non-directory:
861        TESTDIRS=" "
862        for xx in $LIST
863        do
864            if test -d $xx ; then
865                yy=`echo $TESTDIRS | grep -c $xx`
866                if test $yy = 0 ; then TESTDIRS=${TESTDIRS}" "$xx ; fi
867            else
868                echo " -- skip \"$xx\" : not a directory !"
869            fi
870        done
871  fi  fi
872    #echo 'TESTDIRS='${TESTDIRS}'<'
873    
874  if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then  if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then
875      OPTFILE=$MITGCM_OF      OPTFILE=$MITGCM_OF
# Line 1034  for dir in $TESTDIRS ; do Line 1063  for dir in $TESTDIRS ; do
1063          #echo "ex_run_dirs='$ex_run_dirs'"          #echo "ex_run_dirs='$ex_run_dirs'"
1064          for exd in $ex_run_dirs ; do          for exd in $ex_run_dirs ; do
1065              name=`echo $exd | sed -e 's/input.//g'`              name=`echo $exd | sed -e 's/input.//g'`
1066              outf="$dir/results/output.txt.$name"              outf="$dir/results/output.$name.txt"
1067              if test -f $outf -a -r $outf ; then              if test -f $outf -a -r $outf ; then
1068                  if test "x$MULTI_THREAD" = "xt" ; then                  if test "x$MULTI_THREAD" = "xt" ; then
1069                      if test -r $dir"/"$exd"/eedata.mth" ; then                      if test -r $dir"/"$exd"/eedata.mth" ; then
# Line 1077  for dir in $TESTDIRS ; do Line 1106  for dir in $TESTDIRS ; do
1106              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
1107              && linkdata $dir/$rundir $input_dirs \              && linkdata $dir/$rundir $input_dirs \
1108              && runmodel $dir/$rundir && run=Y \              && runmodel $dir/$rundir && run=Y \
1109              && results=`testoutput $dir $rundir`              && results=`testoutput $dir $rundir "txt"`
1110      fi      fi
1111            
1112      echo      echo
# Line 1102  for dir in $TESTDIRS ; do Line 1131  for dir in $TESTDIRS ; do
1131              run_clean $dir/tr_run.$ex              run_clean $dir/tr_run.$ex
1132              linkdata $dir/tr_run.$ex input.$ex input              linkdata $dir/tr_run.$ex input.$ex input
1133              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
1134                  && results=`testoutput $dir tr_run.$ex "."$ex`                  && results=`testoutput $dir tr_run.$ex ${ex}".txt"`
1135              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}`
1136              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1137              fres="$fres.$ex"              fres="$fres.$ex"

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.86

  ViewVC Help
Powered by ViewVC 1.1.22