/[MITgcm]/MITgcm/verification/testscript
ViewVC logotype

Diff of /MITgcm/verification/testscript

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by adcroft, Fri Mar 9 17:56:37 2001 UTC revision 1.2 by adcroft, Fri Mar 9 19:05:26 2001 UTC
# Line 8  Line 8 
8  # This is the number of least-significant digits allows to be  # This is the number of least-significant digits allows to be
9  # in error before the test is classified as a "fail".  # in error before the test is classified as a "fail".
10    
11    set on_error_die
12  set passaccuracy=7  set passaccuracy=7
13  printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' " " Make " " " " Exact "# of" " " > summary.txt  printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' " " Make " " " " Exact "# of" " " > summary.txt
14  printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' Config Depend Compile Execute Match Digits experiment >> summary.txt  printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' Config Depend Compile Execute Match Digits Experiment >> summary.txt
15    
16  # Pass any arguments  # Pass any arguments
17  foreach arg ($argv)  foreach arg ($argv)
# Line 30  foreach arg ($argv) Line 31  foreach arg ($argv)
31     end     end
32     rm -f summary.txt     rm -f summary.txt
33     exit 0     exit 0
34       breaksw
35      case -nodie:
36       unset on_error_die
37       breaksw
38    default:    default:
39     echo Unknown argument given to $0     echo Unknown argument given to $0
40     exit 1     exit 1
# Line 54  foreach dr ([a-zA-Z01-9]*) Line 59  foreach dr ([a-zA-Z01-9]*)
59    set untested=($untested $dr)    set untested=($untested $dr)
60   else   else
61    set config=NO    set config=NO
   set makedepend=NO  
   set compile=NO  
   set execute=NO  
   set exactmatch=NO  
   set accuracy=-  
62    cd input    cd input
63    echo -n "  generating Makefile ..."    echo -n "  generating Makefile ..."
64    ../../../tools/genmake -mods=../code >&! make.log    ../../../tools/genmake -mods=../code >&! make.log
65    if ($status == 0) set config=Yes    if ($status == 0) set config=Yes
66      set makedepend=NO
67    echo " done."    echo " done."
68    echo -n "  make depend ..."    echo -n "  make depend ..."
69    make cleanlinks depend >>& make.log    make cleanlinks depend >>& make.log
# Line 73  foreach dr ([a-zA-Z01-9]*) Line 74  foreach dr ([a-zA-Z01-9]*)
74    if ($status) then    if ($status) then
75     echo "               ***** An error occurred during make *****"     echo "               ***** An error occurred during make *****"
76     cat make.log     cat make.log
77     exit 1     echo The error during compilation occured in \"$dr\"
78       set compile=NO
79       if ($?on_error_die) exit 1
80    else    else
81     set compile=Yes     set compile=Yes
82       set execute=NO
83    endif    endif
84    echo " done."    echo " done."
85    echo -n "  running model ..."    echo -n "  running model ..."
86      if ($compile == 'Yes') then
87    ./mitgcmuv | & grep "D iters" > output.txt    ./mitgcmuv | & grep "D iters" > output.txt
88    if ($status == 0) then    if ($status == 0) then
89      set execute=Yes      set execute=Yes
90        set exactmatch=NO
91        set accuracy=-
92      echo " done."      echo " done."
93      sed 's/.*D iters, err =//' output.txt \      sed 's/.*D iters, err =//' output.txt \
94      | grep "   0    " \      | grep "   0    " \
# Line 134  foreach dr ([a-zA-Z01-9]*) Line 141  foreach dr ([a-zA-Z01-9]*)
141      endif      endif
142    else    else
143      echo " error"      echo " error"
144      echo "               ***** An error occured running the mode *****"      echo "               ***** An error occured running the model *****"
145      tail output.txt      tail output.txt
146      exit 1      echo The runtime error occured in \"$dr\"
147        if ($?on_error_die) exit 1
148      endif
149    endif    endif
150    cd ..    cd ..
151   endif   endif
152   echo ""   echo ""
153   cd ..   cd ..
154  # Pretty summary  # Pretty summary
155     printresults:
156   printf '  %s\t  %s\t  %s\t  %s\t  %s\t  %s\t%s\n' $config $makedepend $compile $execute $exactmatch $accuracy $dr >> summary.txt   printf '  %s\t  %s\t  %s\t  %s\t  %s\t  %s\t%s\n' $config $makedepend $compile $execute $exactmatch $accuracy $dr >> summary.txt
157  end  end
158  echo ==============================================================================  echo ==============================================================================

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22