/[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.2.1 by adcroft, Wed Mar 14 21:40:12 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\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\t%s\n' Config Depend Compile Execute Match Digits Status 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 44  foreach dr ([a-zA-Z01-9]*) Line 49  foreach dr ([a-zA-Z01-9]*)
49   set execute=-   set execute=-
50   set exactmatch=-   set exactmatch=-
51   set accuracy=-   set accuracy=-
52     set pass=FAIL
53   echo ==============================================================================   echo ==============================================================================
54   echo Entering $dr   echo Entering $dr
55   cd $dr   cd $dr
# Line 54  foreach dr ([a-zA-Z01-9]*) Line 60  foreach dr ([a-zA-Z01-9]*)
60    set untested=($untested $dr)    set untested=($untested $dr)
61   else   else
62    set config=NO    set config=NO
   set makedepend=NO  
   set compile=NO  
   set execute=NO  
   set exactmatch=NO  
   set accuracy=-  
63    cd input    cd input
64    echo -n "  generating Makefile ..."    echo -n "  generating Makefile ..."
65    ../../../tools/genmake -mods=../code >&! make.log    ../../../tools/genmake -mods=../code >&! make.log
66    if ($status == 0) set config=Yes    if ($status == 0) set config=Yes
67      set makedepend=NO
68    echo " done."    echo " done."
69    echo -n "  make depend ..."    echo -n "  make depend ..."
70    make cleanlinks depend >>& make.log    make cleanlinks depend >>& make.log
# Line 73  foreach dr ([a-zA-Z01-9]*) Line 75  foreach dr ([a-zA-Z01-9]*)
75    if ($status) then    if ($status) then
76     echo "               ***** An error occurred during make *****"     echo "               ***** An error occurred during make *****"
77     cat make.log     cat make.log
78     exit 1     echo The error during compilation occured in \"$dr\"
79       set compile=NO
80       if ($?on_error_die) exit 1
81    else    else
82     set compile=Yes     set compile=Yes
83       set execute=NO
84    endif    endif
85    echo " done."    echo " done."
86    echo -n "  running model ..."    echo -n "  running model ..."
87      if ($compile == 'Yes') then
88    ./mitgcmuv | & grep "D iters" > output.txt    ./mitgcmuv | & grep "D iters" > output.txt
89    if ($status == 0) then    if ($status == 0) then
90      set execute=Yes      set execute=Yes
91        set exactmatch=NO
92        set accuracy=-
93      echo " done."      echo " done."
94      sed 's/.*D iters, err =//' output.txt \      sed 's/.*D iters, err =//' output.txt \
95      | grep "   0    " \      | grep "   0    " \
# Line 115  foreach dr ([a-zA-Z01-9]*) Line 123  foreach dr ([a-zA-Z01-9]*)
123        if ($?fail ) then        if ($?fail ) then
124          if (! $?fails) set fails          if (! $?fails) set fails
125          set fails=($fails $dr)          set fails=($fails $dr)
126            set pass=FAIL
127          echo "                        ***** FAIL *****"          echo "                        ***** FAIL *****"
128        else        else
129          if (! $?passes) set passes          if (! $?passes) set passes
130          set passes=($passes $dr)          set passes=($passes $dr)
131            set pass=Pass
132          echo ""          echo ""
133          echo "                   ***** PASS (grade $lvl) *****"          echo "                   ***** PASS (grade $lvl) *****"
134        endif        endif
135        set accuracy=$lvl        set accuracy=$lvl
136      else      else
137        set exactmatch=Yes        set exactmatch=Yes
138          set pass=Pass
139        echo ""        echo ""
140        echo Model passed at highest accuracy.        echo Model passed at highest accuracy.
141        echo ""        echo ""
# Line 134  foreach dr ([a-zA-Z01-9]*) Line 145  foreach dr ([a-zA-Z01-9]*)
145      endif      endif
146    else    else
147      echo " error"      echo " error"
148      echo "               ***** An error occured running the mode *****"      echo "               ***** An error occured running the model *****"
149      tail output.txt      tail output.txt
150      exit 1      echo The runtime error occured in \"$dr\"
151        if ($?on_error_die) exit 1
152        set pass=-
153      endif
154    endif    endif
155    cd ..    cd ..
156   endif   endif
157   echo ""   echo ""
158   cd ..   cd ..
159  # Pretty summary  # Pretty summary
160   printf '  %s\t  %s\t  %s\t  %s\t  %s\t  %s\t%s\n' $config $makedepend $compile $execute $exactmatch $accuracy $dr >> summary.txt   printresults:
161     printf '  %s\t  %s\t  %s\t  %s\t  %s\t %s\t %s\t%s\n' $config $makedepend $compile $execute $exactmatch $accuracy $pass $dr >> summary.txt
162  end  end
163  echo ==============================================================================  echo ==============================================================================
164  echo ""  echo ""

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

  ViewVC Help
Powered by ViewVC 1.1.22