/[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.86 by jmc, Sun Jul 16 04:02:49 2006 UTC revision 1.87 by jmc, Mon Jul 31 20:48:41 2006 UTC
# Line 91  testoutput_for_prop() Line 91  testoutput_for_prop()
91  {  {
92      # testoutput_for_prop dir s1 label subdir extension      # testoutput_for_prop dir s1 label subdir extension
93      #      #
94      #  compares files in $dir/$subdir/output.txt and $dir/results/output.txt      #  compares files $dir/$subdir/$OUTPUTFILE and $dir/results/output.txt
95      #  using search strings s1 and text label      #  using search strings s1 and text label
96    
97      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
98          echo testoutput_for_prop: grep "$2" $1/$4/output.txt 1>&2          echo testoutput_for_prop: grep "$2" $1/$4/$OUTPUTFILE 1>&2
99      fi      fi
100      if [ -r $1/$4/output.txt ]; then      if [ -r $1/$4/$OUTPUTFILE ]; then
101          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt          grep "$2" $1/$4/$OUTPUTFILE | sed 's/.*=//' | cat -n > tmp1.txt
102          lncntA=`wc -l tmp1.txt | awk '{print $1}' `          lncntA=`wc -l tmp1.txt | awk '{print $1}' `
103          if [ $lncntA -lt 3 ]; then          if [ $lncntA -lt 3 ]; then
104              if [ $verbose -gt 0 ]; then              if [ $verbose -gt 0 ]; then
# Line 107  testoutput_for_prop() Line 107  testoutput_for_prop()
107              return 99              return 99
108          fi          fi
109      else      else
110          echo testoutput_for_prop: output.txt from model run was not readable 1>&2          echo testoutput_for_prop: $OUTPUTFILE from model run was not readable 1>&2
111          return 99          return 99
112      fi      fi
113      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
# Line 129  testoutput_for_prop() Line 129  testoutput_for_prop()
129      fi      fi
130      has_nan=`cat tmp1.txt | grep -i nan | wc -l`      has_nan=`cat tmp1.txt | grep -i nan | wc -l`
131      if [ $has_nan -gt 0  ] ; then      if [ $has_nan -gt 0  ] ; then
132          echo testoutput_for_prop: output.txt contains $has_nan NaN values  1>&2          echo testoutput_for_prop: $OUTPUTFILE contains $has_nan NaN values  1>&2
133          return 99          return 99
134      fi      fi
135      has_inf=`cat tmp1.txt | grep -i inf | wc -l`      has_inf=`cat tmp1.txt | grep -i inf | wc -l`
136      if [ $has_inf -gt 0  ] ; then      if [ $has_inf -gt 0  ] ; then
137          echo testoutput_for_prop: output.txt contains $has_inf Inf values  1>&2          echo testoutput_for_prop: $OUTPUTFILE contains $has_inf Inf values  1>&2
138          return 99          return 99
139      fi      fi
140      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
# Line 184  dashnum() Line 184  dashnum()
184  testoutput_ad()  testoutput_ad()
185  {  {
186      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $5}' > t05.txt      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $5}' > t05.txt
187      grep $3 $1/$2/output_adm.txt | awk '{print NR " " $5}' > t15.txt      grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $5}' > t15.txt
188      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $6}' > t06.txt      grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $6}' > t06.txt
189      grep $3 $1/$2/output_adm.txt | awk '{print NR " " $6}' > t16.txt      grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $6}' > t16.txt
190      join t05.txt t15.txt > t5.txt      join t05.txt t15.txt > t5.txt
191      join t06.txt t16.txt > t6.txt      join t06.txt t16.txt > t6.txt
192      echo "-1" >> t5.txt      echo "-1" >> t5.txt
# Line 341  makeclean() Line 341  makeclean()
341      else      else
342          (          (
343              cd $1;              cd $1;
344              #if test -e output.txt ; then rm -f output.txt ; fi              #if test -e $OUTPUTFILE ; then rm -f $OUTPUTFILE ; fi
345              if test -r Makefile ; then              if test -r Makefile ; then
346                  printf 'clean build-dir: make Clean ... ' 2>&1                  printf 'clean build-dir: make Clean ... ' 2>&1
347                  $MAKE Clean >> make.log 2>&1                  $MAKE Clean >> make.log 2>&1
# Line 561  runmodel() Line 561  runmodel()
561              tail run.log              tail run.log
562              echo successful 1>&2              echo successful 1>&2
563              # === Reduce the size of the testing emails!              # === Reduce the size of the testing emails!
564              # if test "x$ADM" = x ; then              #cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE
             #   cp output.txt $CDIR"/output.txt"  
             # else  
             #   cp output_adm.txt $CDIR"/output_adm.txt"  
             # fi  
565              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
566              return 0              return 0
567          else          else
# Line 883  else Line 879  else
879      OUTPUTFILE="output.txt"      OUTPUTFILE="output.txt"
880  fi  fi
881    
 if test "x$ADM" = xt -a "x$COMMAND" = x ; then  
     COMMAND="./$EXECUTABLE > $OUTPUTFILE"  
 fi  
   
882  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
883      COMMAND="./$EXECUTABLE > $OUTPUTFILE"      COMMAND="./$EXECUTABLE > $OUTPUTFILE"
884  fi  fi
885    if test "x$MPI" = xt ; then
886        OUTPUTFILE="STDOUT.0000"
887    fi
888    
889  #echo "OK"  #echo "OK"
890  echo "OK (COMMAND= $COMMAND )"  echo "OK (COMMAND= $COMMAND )"

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

  ViewVC Help
Powered by ViewVC 1.1.22