10 |
|
|
11 |
set on_error_die |
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 |
set SKIP=( ) |
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' " " Make " " " " Exact "# of" " " " " > summary.txt |
15 |
|
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 |
16 |
|
|
17 |
# Pass any arguments |
# Pass any arguments |
18 |
foreach arg ($argv) |
foreach arg ($argv) |
36 |
case -nodie: |
case -nodie: |
37 |
unset on_error_die |
unset on_error_die |
38 |
breaksw |
breaksw |
39 |
|
case -skip=*: |
40 |
|
set SKIP = ( $SKIP `echo $arg | sed 's/-skip=//' | sed 's/,/ /g' `) |
41 |
|
breaksw |
42 |
default: |
default: |
43 |
echo Unknown argument given to $0 |
echo Unknown argument given to $0 |
44 |
exit 1 |
exit 1 |
47 |
|
|
48 |
foreach dr ([a-zA-Z01-9]*) |
foreach dr ([a-zA-Z01-9]*) |
49 |
if (! -d $dr/input ) continue |
if (! -d $dr/input ) continue |
50 |
|
foreach skip ($SKIP) |
51 |
|
if ($skip == $dr) continue;continue |
52 |
|
end |
53 |
set config=- |
set config=- |
54 |
set makedepend=- |
set makedepend=- |
55 |
set compile=- |
set compile=- |
56 |
set execute=- |
set execute=- |
57 |
set exactmatch=- |
set exactmatch=- |
58 |
set accuracy=- |
set accuracy=- |
59 |
|
set pass=FAIL |
60 |
echo ============================================================================== |
echo ============================================================================== |
61 |
echo Entering $dr |
echo Entering $dr |
62 |
cd $dr |
cd $dr |
92 |
echo " done." |
echo " done." |
93 |
echo -n " running model ..." |
echo -n " running model ..." |
94 |
if ($compile == 'Yes') then |
if ($compile == 'Yes') then |
95 |
./mitgcmuv | & grep "D iters" > output.txt |
# ./mitgcmuv | & grep "D iters" > output.txt |
96 |
|
./mitgcmuv > & output.txt |
97 |
if ($status == 0) then |
if ($status == 0) then |
98 |
set execute=Yes |
set execute=Yes |
99 |
set exactmatch=NO |
set exactmatch=NO |
100 |
set accuracy=- |
set accuracy=- |
101 |
echo " done." |
echo " done." |
102 |
sed 's/.*D iters, err =//' output.txt \ |
grep "D iters" output.txt | sed 's/.*D iters, err =//' \ |
103 |
| grep " 0 " \ |
| grep " 0 " \ |
104 |
> high.txt |
> high.txt |
105 |
grep "D iters" ../results/output.txt \ |
grep "D iters" ../results/output.txt \ |
131 |
if ($?fail ) then |
if ($?fail ) then |
132 |
if (! $?fails) set fails |
if (! $?fails) set fails |
133 |
set fails=($fails $dr) |
set fails=($fails $dr) |
134 |
|
set pass=FAIL |
135 |
echo " ***** FAIL *****" |
echo " ***** FAIL *****" |
136 |
else |
else |
137 |
if (! $?passes) set passes |
if (! $?passes) set passes |
138 |
set passes=($passes $dr) |
set passes=($passes $dr) |
139 |
|
set pass=Pass |
140 |
echo "" |
echo "" |
141 |
echo " ***** PASS (grade $lvl) *****" |
echo " ***** PASS (grade $lvl) *****" |
142 |
endif |
endif |
143 |
set accuracy=$lvl |
set accuracy=$lvl |
144 |
else |
else |
145 |
set exactmatch=Yes |
set exactmatch=Yes |
146 |
|
set pass=Pass |
147 |
echo "" |
echo "" |
148 |
echo Model passed at highest accuracy. |
echo Model passed at highest accuracy. |
149 |
echo "" |
echo "" |
157 |
tail output.txt |
tail output.txt |
158 |
echo The runtime error occured in \"$dr\" |
echo The runtime error occured in \"$dr\" |
159 |
if ($?on_error_die) exit 1 |
if ($?on_error_die) exit 1 |
160 |
|
set pass=- |
161 |
endif |
endif |
162 |
|
rm -f high.txt oldhigh.txt low.txt oldlow.txt output.txt make.log |
163 |
endif |
endif |
164 |
cd .. |
cd .. |
165 |
endif |
endif |
167 |
cd .. |
cd .. |
168 |
# Pretty summary |
# Pretty summary |
169 |
printresults: |
printresults: |
170 |
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\t%s\n' $config $makedepend $compile $execute $exactmatch $accuracy $pass $dr >> summary.txt |
171 |
end |
end |
172 |
echo ============================================================================== |
echo ============================================================================== |
173 |
echo "" |
echo "" |