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) |
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 |
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 |
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 " \ |
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 ============================================================================== |