13 |
echo " (-help|-h) print usage" |
echo " (-help|-h) print usage" |
14 |
echo " (-mpi) use MPI input files" |
echo " (-mpi) use MPI input files" |
15 |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
16 |
echo " (DEF=\"noieee\")" |
echo " (DEF=\"-ieee\")" |
17 |
echo " (-optfile=|-of=)STRING list of optfiles to use" |
echo " (-optfile=|-of=)STRING list of optfiles to use" |
18 |
echo " (-a|-addr) STRING list of email recipients" |
echo " (-a|-addr) STRING list of email recipients" |
19 |
echo " (DEF=\"edhill@mitgcm.org\")" |
echo " (DEF=\"edhill@mitgcm.org\")" |
22 |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
23 |
echo " Bourne-compatible \"sh\" shell" |
echo " Bourne-compatible \"sh\" shell" |
24 |
echo " (DEF=\"\" for \"bash\")" |
echo " (DEF=\"\" for \"bash\")" |
25 |
|
echo " (-adm|-ad) perform an adjoint run" |
26 |
echo " (-command) STRING command to run" |
echo " (-command) STRING command to run" |
27 |
echo " (DEF=\"make output.txt\")" |
echo " (DEF=\"make output.txt\")" |
28 |
echo " (-m|-make) STRING command to use for \"make\"" |
echo " (-m|-make) STRING command to use for \"make\"" |
29 |
echo " (DEF=\"make\")" |
echo " (DEF=\"make\")" |
30 |
|
echo " (-ptracers|-ptr) STRING specify which ptracers to test" |
31 |
|
echo " (DEF=\"1 2 3 4 5\")" |
32 |
|
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
33 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
34 |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
35 |
echo " (-nogenmake|-ng) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
36 |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
37 |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
38 |
|
echo " (-deldir|-dd) on success, delete the output directory" |
39 |
echo |
echo |
40 |
echo "and where STRING follows a whitespace-delimited format" |
echo "and where STRING can be a whitespace-delimited list" |
41 |
echo "such as:" |
echo "such as:" |
42 |
|
echo |
43 |
echo " -t 'exp0 exp2 exp3' " |
echo " -t 'exp0 exp2 exp3' " |
44 |
echo " -addr='abc@123.com testing@home.org'" |
echo " -addr='abc@123.com testing@home.org'" |
45 |
echo |
echo |
46 |
|
echo "provided that the expression is properly quoted within the current" |
47 |
|
echo "shell (note the use of single quotes to protect white space)." |
48 |
|
echo |
49 |
exit 1 |
exit 1 |
50 |
} |
} |
51 |
|
|
52 |
# build the mpack utility |
# build the mpack utility |
53 |
build_mpack() |
build_mpack() |
54 |
{ |
{ |
55 |
echo -n "building the mpack utility... " |
printf "building the mpack utility... " |
56 |
if test ! -x "$MPACKDIR/mpack" ; then |
if test ! -x "$MPACKDIR/mpack" ; then |
57 |
if test ! -d $MPACKDIR ; then |
if test ! -d $MPACKDIR ; then |
58 |
echo |
echo |
62 |
echo |
echo |
63 |
HAVE_MPACK=f |
HAVE_MPACK=f |
64 |
fi |
fi |
65 |
echo -n "building mpack... " |
printf "building mpack... " |
66 |
( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1 |
if test "x$CC" = x ; then |
67 |
|
export CC=cc |
68 |
|
fi |
69 |
|
( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1 |
70 |
RETVAL=$? |
RETVAL=$? |
71 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
72 |
echo |
echo |
74 |
echo |
echo |
75 |
HAVE_MPACK=f |
HAVE_MPACK=f |
76 |
else |
else |
77 |
|
rm -f tr_build_mpack.out |
78 |
HAVE_MPACK=t |
HAVE_MPACK=t |
79 |
fi |
fi |
80 |
else |
else |
83 |
echo "OK" |
echo "OK" |
84 |
} |
} |
85 |
|
|
|
compare_lines() |
|
|
{ |
|
|
# use codelet to compare lines |
|
|
if [ $verbose -gt 1 ]; then |
|
|
cat tmp3.txt 1>&2 |
|
|
fi |
|
|
return `./a.out < tmp3.txt` |
|
|
} |
|
|
|
|
86 |
testoutput_for_prop() |
testoutput_for_prop() |
87 |
{ |
{ |
88 |
# testoutput_for_prop dir s1 label subdir |
# testoutput_for_prop dir s1 label subdir extension |
89 |
# |
# |
90 |
# compares files in $dir/$subdir/output.txt and $dir/results/output.txt |
# compares files in $dir/$subdir/output.txt and $dir/results/output.txt |
91 |
# using search strings s1 and text label |
# using search strings s1 and text label |
107 |
return 99 |
return 99 |
108 |
fi |
fi |
109 |
if [ $debug -gt 0 ]; then |
if [ $debug -gt 0 ]; then |
110 |
echo testoutput_for_prop: grep "$2" $1/results/output.txt 1>&2 |
echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2 |
111 |
fi |
fi |
112 |
grep "$2" $1/results/output.txt | sed 's/.*=//' | cat -n > tmp2.txt |
grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt |
113 |
lncnt=`wc -l tmp2.txt | awk '{print $1}' ` |
lncnt=`wc -l tmp2.txt | awk '{print $1}' ` |
114 |
if [ $lncnt -lt 3 ]; then |
if [ $lncnt -lt 3 ]; then |
115 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
128 |
cat tmp3.txt 1>&2 |
cat tmp3.txt 1>&2 |
129 |
fi |
fi |
130 |
echo "-1" >> tmp3.txt |
echo "-1" >> tmp3.txt |
131 |
digits_of_similarity=`./tmp_cmpnum < tmp3.txt` |
# On the SGI O3K (*not* the O2K), "cat -n" inserts a ":" after the line number |
132 |
|
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
133 |
|
digits_of_similarity=`./tmp_cmpnum < tmp4.txt` |
134 |
if [ $digits_of_similarity -eq 99 ]; then |
if [ $digits_of_similarity -eq 99 ]; then |
135 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
136 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
141 |
echo There were $digits_of_similarity decimal places of similarity for \"$2\" 1>&2 |
echo There were $digits_of_similarity decimal places of similarity for \"$2\" 1>&2 |
142 |
fi |
fi |
143 |
fi |
fi |
144 |
rm tmp1.txt tmp2.txt tmp3.txt |
rm -f tmp1.txt tmp2.txt tmp3.txt tmp4.txt |
145 |
|
|
146 |
return $digits_of_similarity |
return $digits_of_similarity |
147 |
} |
} |
161 |
done |
done |
162 |
} |
} |
163 |
|
|
164 |
|
testoutput_ad() |
165 |
|
{ |
166 |
|
grep $3 $1/results_ad/output.txt_adm | awk '{print NR " " $5}' > t05.txt |
167 |
|
grep $3 $1/$2/output.txt_adm | awk '{print NR " " $5}' > t15.txt |
168 |
|
grep $3 $1/results_ad/output.txt_adm | awk '{print NR " " $6}' > t06.txt |
169 |
|
grep $3 $1/$2/output.txt_adm | awk '{print NR " " $6}' > t16.txt |
170 |
|
join t05.txt t15.txt > t5.txt |
171 |
|
join t06.txt t16.txt > t6.txt |
172 |
|
echo "-1" >> t5.txt |
173 |
|
echo "-1" >> t6.txt |
174 |
|
digits_5=`./tmp_cmpnum < t5.txt` |
175 |
|
digits_6=`./tmp_cmpnum < t6.txt` |
176 |
|
dashnum $digits_5 $digits_6 |
177 |
|
rm -f t[01][56].txt t[56].txt |
178 |
|
} |
179 |
|
|
180 |
|
check_for_add_mon_output() |
181 |
|
{ |
182 |
|
# Check for additional types of monitor output |
183 |
|
if test "x$1" = x ; then |
184 |
|
return |
185 |
|
fi |
186 |
|
|
187 |
|
for ii in $PTRACERS_NUM ; do |
188 |
|
eval "HAVE_PTR0"$ii"=f" |
189 |
|
done |
190 |
|
|
191 |
|
ptr_add="trcstat_ptracerXX_min trcstat_ptracerXX_max" |
192 |
|
ptr_add="$ptr_add trcstat_ptracerXX_mean trcstat_ptracerXX_sd" |
193 |
|
for ii in $PTRACERS_NUM ; do |
194 |
|
for jj in $ptr_add ; do |
195 |
|
name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"` |
196 |
|
tst=`grep $name $1 | wc -l | awk '{print $1}'` |
197 |
|
if test ! "x$tst" = x0 ; then |
198 |
|
eval "HAVE_PTR0"$ii"=t" |
199 |
|
fi |
200 |
|
done |
201 |
|
# eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"' |
202 |
|
done |
203 |
|
} |
204 |
|
|
205 |
testoutput() |
testoutput() |
206 |
{ |
{ |
207 |
# testoutput diretory subdir |
# testoutput directory subdir extension |
208 |
# |
# |
209 |
# test output in "directory" |
# test output in "directory" |
210 |
|
if test "x$ADM" = x ; then |
211 |
|
if [ $debug -gt 0 ]; then |
212 |
|
echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2 |
213 |
|
fi |
214 |
|
testoutput_for_prop $1 "cg2d_init_res" "cg2d init. residual" $2 $3; cg2dres=$? |
215 |
|
if [ $debug -gt 0 ]; then |
216 |
|
echo testoutput: cg2dres=$cg2dres 1>&2 |
217 |
|
fi |
218 |
|
testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2 $3; tmin=$? |
219 |
|
testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2 $3; tmax=$? |
220 |
|
testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2 $3; tmean=$? |
221 |
|
testoutput_for_prop $1 "dynstat_theta_sd" "theta s.d." $2 $3; tsd=$? |
222 |
|
testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2 $3; smin=$? |
223 |
|
testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2 $3; smax=$? |
224 |
|
testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2 $3; smean=$? |
225 |
|
testoutput_for_prop $1 "dynstat_salt_sd" "salt s.d." $2 $3; ssd=$? |
226 |
|
testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2 $3; umin=$? |
227 |
|
testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2 $3; umax=$? |
228 |
|
testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2 $3; umean=$? |
229 |
|
testoutput_for_prop $1 "dynstat_uvel_sd" "U s.d." $2 $3; usd=$? |
230 |
|
testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2 $3; vmin=$? |
231 |
|
testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$? |
232 |
|
testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$? |
233 |
|
testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2 $3; vsd=$? |
234 |
|
|
235 |
|
# This is for PTRACERS |
236 |
|
for ii in $PTRACERS_NUM ; do |
237 |
|
eval `echo "p0"$ii"_min=99"` |
238 |
|
eval `echo "p0"$ii"_max=99"` |
239 |
|
eval `echo "p0"$ii"_mean=99"` |
240 |
|
eval `echo "p0"$ii"_sd=99"` |
241 |
|
tst=`eval 'echo "$HAVE_PTR0'$ii'"'` |
242 |
|
#echo 'tst = '$tst |
243 |
|
if test "x$tst" = xt ; then |
244 |
|
a="trcstat_ptracer0" |
245 |
|
testoutput_for_prop $1 "$a"$ii"_min" "p0"$ii"_min" $2 $3 |
246 |
|
RETVAL=$? ; eval `echo "p0"$ii"_min="$RETVAL` |
247 |
|
testoutput_for_prop $1 "$a"$ii"_max" "p0"$ii"_max" $2 $3 |
248 |
|
RETVAL=$? ; eval `echo "p0"$ii"_max="$RETVAL` |
249 |
|
testoutput_for_prop $1 "$a"$ii"_mean" "p0"$ii"_mean" $2 $3 |
250 |
|
RETVAL=$? ; eval `echo "p0"$ii"_mean="$RETVAL` |
251 |
|
testoutput_for_prop $1 "$a"$ii"_sd" "p0"$ii"_sd" $2 $3 |
252 |
|
RETVAL=$? ; eval `echo "p0"$ii"_sd="$RETVAL` |
253 |
|
fi |
254 |
|
done |
255 |
|
|
256 |
if [ $debug -gt 0 ]; then |
allargs="$cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd" |
257 |
echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2 |
allargs="$allargs $umin $umax $umean $usd $vmin $vmax $vmean $vsd" |
258 |
fi |
allargs="$allargs $p01_min $p01_max $p01_mean $p01_sd" |
259 |
testoutput_for_prop $1 "cg2d_init_res" "cg2d init. residual" $2; cg2dres=$? |
allargs="$allargs $p02_min $p02_max $p02_mean $p02_sd" |
260 |
if [ $debug -gt 0 ]; then |
allargs="$allargs $p03_min $p03_max $p03_mean $p03_sd" |
261 |
echo testoutput: cg2dres=$cg2dres 1>&2 |
allargs="$allargs $p04_min $p04_max $p04_mean $p04_sd" |
262 |
|
allargs="$allargs $p05_min $p05_max $p05_mean $p05_sd" |
263 |
|
|
264 |
|
eval "dashnum $allargs" |
265 |
|
|
266 |
|
else |
267 |
|
testoutput_ad $1 $2 "precision_grdchk_result" |
268 |
fi |
fi |
|
testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2; tmin=$? |
|
|
testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2; tmax=$? |
|
|
testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2; tmean=$? |
|
|
testoutput_for_prop $1 "dynstat_theta_sd" "theta s.d." $2; tsd=$? |
|
|
testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2; smin=$? |
|
|
testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2; smax=$? |
|
|
testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2; smean=$? |
|
|
testoutput_for_prop $1 "dynstat_salt_sd" "salt s.d." $2; ssd=$? |
|
|
testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2; umin=$? |
|
|
testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2; umax=$? |
|
|
testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2; umean=$? |
|
|
testoutput_for_prop $1 "dynstat_uvel_sd" "U s.d." $2; usd=$? |
|
|
testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2; vmin=$? |
|
|
testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2; vmax=$? |
|
|
testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2; vmean=$? |
|
|
testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2; vsd=$? |
|
|
|
|
|
dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \ |
|
|
$umin $umax $umean $usd $vmin $vmax $vmean $vsd |
|
269 |
} |
} |
270 |
|
|
271 |
genmakemodel() |
genmakemodel() |
274 |
if test "x$NOGENMAKE" = xt ; then |
if test "x$NOGENMAKE" = xt ; then |
275 |
echo "genmake skipped!" |
echo "genmake skipped!" |
276 |
else |
else |
277 |
GENMAKE2="$BASH ../../../tools/genmake2" |
if test "x$BASH" = x ; then |
278 |
|
GENMAKE2="../../../tools/genmake2" |
279 |
|
else |
280 |
|
GENMAKE2="$BASH ../../../tools/genmake2 -bash $BASH" |
281 |
|
fi |
282 |
( |
( |
283 |
cd $1; |
cd $1; |
284 |
command="$GENMAKE2 -ds -m $MAKE --mods=../code" |
command="$GENMAKE2 -ds -m $MAKE" |
285 |
|
if test "x$ADM" = x ; then |
286 |
|
command="$command --mods=../code" |
287 |
|
else |
288 |
|
command="$command --mods=../code_ad" |
289 |
|
command="$command -adof=../../../tools/adjoint_options/adjoint_staf" |
290 |
|
fi |
291 |
if test "x$OPTFILE" != xNONE ; then |
if test "x$OPTFILE" != xNONE ; then |
292 |
command="$command --optfile=$OPTFILE" |
command="$command --optfile=$OPTFILE" |
293 |
fi |
fi |
297 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' 1>&2 |
298 |
$command > make.log 2>&1 |
$command > make.log 2>&1 |
299 |
RETVAL=$? |
RETVAL=$? |
300 |
cp Makefile $CDIR |
# Reduce the size of the testing emails! |
301 |
|
head -100 Makefile > $CDIR/Makefile_head |
302 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
303 |
tail make.log |
tail make.log |
304 |
echo "genmakemodel: genmake failed" 1>&2 |
echo "genmakemodel: genmake failed" 1>&2 |
369 |
cd $1; |
cd $1; |
370 |
if test -r Makefile ; then |
if test -r Makefile ; then |
371 |
printf 'make ... ' 1>&2 |
printf 'make ... ' 1>&2 |
372 |
$MAKE >> make.log 2>&1 |
if test "x$ADM" = x ; then |
373 |
|
if test "x$JOBS" = x ; then |
374 |
|
$MAKE >> make.log 2>&1 |
375 |
|
else |
376 |
|
$MAKE -j $JOBS >> make.log 2>&1 |
377 |
|
fi |
378 |
|
else |
379 |
|
$MAKE adall >> make.log 2>&1 |
380 |
|
fi |
381 |
RETVAL=$? |
RETVAL=$? |
382 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
383 |
tail make.log |
tail make.log |
391 |
) |
) |
392 |
} |
} |
393 |
|
|
394 |
|
symlink_mpifiles() |
395 |
|
{ |
396 |
|
# Put special links so that MPI specific files are used |
397 |
|
# This MUST be invoked between makeclean and makelinks because |
398 |
|
# the Makefile will link to non-mpi files by default |
399 |
|
|
400 |
|
dir=$1 |
401 |
|
code_dir=$2 |
402 |
|
BUILD_DIR=$dir/$3 |
403 |
|
CODE_DIR=$dir/$code_dir |
404 |
|
|
405 |
|
# These are files that should replace their counter-part when using -mpi |
406 |
|
MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")` |
407 |
|
|
408 |
|
# Is this an MPI run? |
409 |
|
if test "x$MPI" = xt ; then |
410 |
|
# YES: We symbolically link these files to the build |
411 |
|
# dir so long as there is no real file in place |
412 |
|
for ii in $MPI_FILES ; do |
413 |
|
i=`echo $ii | sed 's:^\./::'` |
414 |
|
name=`echo $i | sed 's:_mpi::' ` |
415 |
|
cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1 |
416 |
|
RETVAL=$? |
417 |
|
if test "x$RETVAL" != x0 ; then |
418 |
|
if ! test -f $BUILD_DIR/$i ; then |
419 |
|
#echo Linking $name to $i |
420 |
|
(cd $BUILD_DIR; ln -sf ../$code_dir/$i $name) |
421 |
|
fi |
422 |
|
fi |
423 |
|
done |
424 |
|
else |
425 |
|
# NO: We undo any _mpi symbolically linked files |
426 |
|
for ii in $MPI_FILES ; do |
427 |
|
i=`echo $ii | sed 's:^\./::'` |
428 |
|
name=`echo $i | sed 's:_mpi::' ` |
429 |
|
if test -L $BUILD_DIR/$name ; then |
430 |
|
cmp $BUILD_DIR/$name "../$code_dir/$name"_mpi > /dev/null 2>&1 |
431 |
|
RETVAL=$? |
432 |
|
if test "x$RETVAL" = x0 ; then |
433 |
|
#echo Un-linking $name from $linktarg |
434 |
|
rm -f $BUILD_DIR/$name |
435 |
|
fi |
436 |
|
fi |
437 |
|
done |
438 |
|
fi |
439 |
|
|
440 |
|
} |
441 |
|
|
442 |
linkdata() |
linkdata() |
443 |
{ |
{ |
444 |
# linkdata flag |
# linkdata flag |
447 |
if test "x$1" = x1 ; then |
if test "x$1" = x1 ; then |
448 |
( |
( |
449 |
cd $2 |
cd $2 |
450 |
files=`( cd ../input ; ls -1 | grep -v CVS )` |
if test "x$ADM" = x ; then |
451 |
for i in $files ; do |
files=`( cd ../input ; ls -1 | grep -v CVS )` |
452 |
if test ! -d "../input/"$i ; then |
for i in $files ; do |
453 |
ln -sf "../input/"$i $i |
if test ! -d "../input/"$i -a ! -f $i ; then |
454 |
fi |
ln -sf "../input/"$i $i |
455 |
done |
fi |
456 |
|
done |
457 |
|
else |
458 |
|
files=`( cd ../input ; ls -1 *.bin | grep -v CVS )` |
459 |
|
for i in $files ; do |
460 |
|
if test ! -d "../input/"$i ; then |
461 |
|
ln -sf "../input/"$i $i |
462 |
|
fi |
463 |
|
done |
464 |
|
files=`( cd ../input_ad ; ls -1 | grep -v CVS )` |
465 |
|
for i in $files ; do |
466 |
|
if test ! -d "../input_ad/"$i ; then |
467 |
|
ln -sf "../input_ad/"$i $i |
468 |
|
fi |
469 |
|
done |
470 |
|
fi |
471 |
) |
) |
472 |
fi |
fi |
473 |
} |
} |
476 |
{ |
{ |
477 |
# runmodel directory |
# runmodel directory |
478 |
# |
# |
479 |
# runs "$COMMAND" in "directory" |
# runs "$COMMAND in "directory" |
480 |
# (where "$COMMAND" is relative to "directory") |
# (where "$COMMAND" is relative to "directory") |
481 |
( |
( |
482 |
cd $1 |
cd $1 |
483 |
printf 'runmodel ... ' 1>&2 |
printf 'runmodel ... ' 1>&2 |
484 |
# make output.txt |
# make output.txt |
485 |
$COMMAND >> run.log 2>&1 |
echo |
486 |
|
rm -f run.log |
487 |
|
# echo "COMMAND='$COMMAND'" |
488 |
|
# echo "pwd='"`pwd`"'" |
489 |
|
( eval $COMMAND ) > run.log 2>&1 |
490 |
RETVAL=$? |
RETVAL=$? |
491 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
492 |
|
tail run.log |
493 |
echo successful 1>&2 |
echo successful 1>&2 |
494 |
cp output.txt $CDIR"/output.txt" |
# === Reduce the size of the testing emails! |
495 |
|
# if test "x$ADM" = x ; then |
496 |
|
# cp output.txt $CDIR"/output.txt" |
497 |
|
# else |
498 |
|
# cp output.txt_adm $CDIR"/output.txt_adm" |
499 |
|
# fi |
500 |
|
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
501 |
return 0 |
return 0 |
502 |
else |
else |
503 |
tail run.log |
tail run.log |
504 |
echo failed 1>&2 |
echo failed 1>&2 |
505 |
cp run.log $CDIR"/run.log" |
cp run.log $CDIR"/run.log" |
506 |
|
if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi |
507 |
return 1 |
return 1 |
508 |
fi |
fi |
509 |
) |
) |
513 |
{ |
{ |
514 |
# create codelet for comparing model output |
# create codelet for comparing model output |
515 |
|
|
516 |
echo -n "creating the comparison code... " |
printf "creating the comparison code... " |
517 |
cat > tmp_cmpnum.c <<EOF |
cat > tmp_cmpnum.c <<EOF |
518 |
#include <stdio.h> |
#include <stdio.h> |
519 |
#include <math.h> |
#include <math.h> |
520 |
int main( int argc, char** argv ) { |
int main( int argc, char** argv ) { |
521 |
int linnum,best; |
int linnum,best,lncnt; |
522 |
double a,b,diff; |
double a,b,abave,relerr; |
523 |
best = -16; |
best = -22; |
524 |
while( 1 ) { |
lncnt = 0; |
525 |
|
while( 1 & (lncnt+=1) < 999 ) { |
526 |
scanf("%d", &linnum); |
scanf("%d", &linnum); |
527 |
if (linnum == -1) break; |
if (linnum == -1) break; |
528 |
scanf("%lf", &a); scanf("%lf", &b); |
scanf("%lf", &a); scanf("%lf", &b); |
529 |
diff = 0.5*(fabs(a)+fabs(b)); |
abave = 0.5*(fabs(a)+fabs(b)); |
530 |
if (diff > 1.e-12) { |
if (abave > 0.0) { |
531 |
diff=fabs(a-b)/diff; |
relerr=fabs(a-b)/abave; |
532 |
if (diff > 0.0) { |
if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); } |
533 |
linnum = (int)log10(diff); |
else { linnum = -16 ; } |
534 |
best = (best > linnum) ? best : linnum; |
best = (best > linnum) ? best : linnum; |
|
} |
|
|
else { |
|
|
if (best == -16 && diff != 0) best = -22; |
|
|
} |
|
535 |
} |
} |
536 |
} |
} |
537 |
|
if (lncnt == 999) best=-29; |
538 |
printf("%d\n", -best); |
printf("%d\n", -best); |
539 |
return 0; |
return 0; |
540 |
} |
} |
541 |
EOF |
EOF |
542 |
cc -o tmp_cmpnum tmp_cmpnum.c -lm |
$CC -o tmp_cmpnum tmp_cmpnum.c -lm |
543 |
|
|
544 |
if [ -x ./tmp_cmpnum ]; then |
if [ -x ./tmp_cmpnum ]; then |
545 |
echo "OK" |
echo "OK" |
546 |
return 0 |
return 0 |
547 |
else |
else |
548 |
echo |
echo |
549 |
echo "ERROR: failed to compile comparison code" |
echo "ERROR: failed to compile comparison code -- please specify" |
550 |
|
echo " a C compiler using the CC environment variable." |
551 |
exit 1 |
exit 1 |
552 |
fi |
fi |
553 |
} |
} |
616 |
expts='' |
expts='' |
617 |
# ieee=1 |
# ieee=1 |
618 |
|
|
619 |
IEEE= |
IEEE=true |
620 |
if test "x$MITGCM_IEEE" != x ; then |
if test "x$MITGCM_IEEE" != x ; then |
621 |
IEEE=$MITGCM_IEEE |
IEEE=$MITGCM_IEEE |
622 |
fi |
fi |
635 |
MPACKDIR="../tools/mpack-1.6" |
MPACKDIR="../tools/mpack-1.6" |
636 |
HAVE_MPACK= |
HAVE_MPACK= |
637 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
638 |
COMMAND="make output.txt" |
COMMAND= |
639 |
MAKE=make |
if test "x$MAKE" = x ; then |
640 |
|
MAKE=make |
641 |
|
fi |
642 |
|
if test "x$CC" = x ; then |
643 |
|
CC=cc |
644 |
|
fi |
645 |
|
JOBS= |
646 |
MPI=f |
MPI=f |
647 |
|
DELDIR= |
648 |
|
|
649 |
|
ADM= |
650 |
|
|
651 |
|
# Additional monitor types |
652 |
|
PTRACERS_NUM="1 2 3 4 5" |
653 |
|
|
654 |
echo -n "parsing options... " |
printf "parsing options... " |
655 |
|
|
656 |
ac_prev= |
ac_prev= |
657 |
for ac_option ; do |
for ac_option ; do |
700 |
-make=* | --make=*) |
-make=* | --make=*) |
701 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
702 |
|
|
703 |
|
-ptracers | --ptracers | -ptr | --ptr) |
704 |
|
ac_prev=PTRACERS_NUM ;; |
705 |
|
-ptracers=* | --ptracers=* | -ptr=* | --ptr=*) |
706 |
|
PTRACERS_NUM=$ac_optarg ;; |
707 |
|
|
708 |
|
-j) ac_prev=JOBS ;; |
709 |
|
-j=*) JOBS=$ac_optarg ;; |
710 |
|
|
711 |
-clean | --clean) |
-clean | --clean) |
712 |
CLEANUP=t ;; |
CLEANUP=t ;; |
713 |
|
|
722 |
|
|
723 |
-mpi) MPI=t ;; |
-mpi) MPI=t ;; |
724 |
|
|
725 |
|
-adm | -ad) ADM=t ;; |
726 |
|
|
727 |
-ieee) IEEE=true ;; |
-ieee) IEEE=true ;; |
728 |
-noieee) IEEE= ;; |
-noieee) IEEE= ;; |
729 |
|
|
731 |
-debug) debug=1 ;; |
-debug) debug=1 ;; |
732 |
-quiet) verbose=0 ;; |
-quiet) verbose=0 ;; |
733 |
|
|
734 |
|
-deldir | -dd) DELDIR=t ;; |
735 |
|
|
736 |
-*) |
-*) |
737 |
echo "Error: unrecognized option: "$ac_option |
echo "Error: unrecognized option: "$ac_option |
738 |
usage |
usage |
761 |
OPTFILE=$MITGCM_OF |
OPTFILE=$MITGCM_OF |
762 |
fi |
fi |
763 |
|
|
764 |
|
if test "x$ADM" = xt -a "x$COMMAND" = x ; then |
765 |
|
COMMAND="./mitgcmuv_ad > output.txt_adm 2>&1" |
766 |
|
fi |
767 |
|
|
768 |
|
if test "x$COMMAND" = x ; then |
769 |
|
COMMAND="$MAKE output.txt" |
770 |
|
fi |
771 |
|
|
772 |
echo "OK" |
echo "OK" |
773 |
|
|
774 |
# create the FORTRAN comparison code |
# create the FORTRAN comparison code |
775 |
createcodelet |
createcodelet |
776 |
|
|
777 |
# build the mpack utility |
# build the mpack utility |
778 |
build_mpack |
if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then |
779 |
|
echo "skipping mpack build" |
780 |
|
else |
781 |
|
build_mpack |
782 |
|
fi |
783 |
|
|
784 |
# Create a uniquely named directory to store results |
# Create a uniquely named directory to store results |
785 |
MACH=`hostname` |
MACH=`hostname` |
786 |
UNAMEA=`uname -a` |
UNAMEA=`uname -a` |
787 |
DATE=`date +%Y%m%d` |
DATE=`date +%Y%m%d` |
788 |
BASE=$MACH"_"$DATE"_" |
BASE="tr_"$MACH"_"$DATE"_" |
789 |
DNUM=0 |
DNUM=0 |
790 |
DRESULTS="$BASE$DNUM" |
DRESULTS="$BASE$DNUM" |
791 |
while test -e $DRESULTS ; do |
while test -e $DRESULTS ; do |
799 |
exit 1 |
exit 1 |
800 |
fi |
fi |
801 |
SUMMARY="$DRESULTS/summary.txt" |
SUMMARY="$DRESULTS/summary.txt" |
802 |
echo -n "Start time: " >> $SUMMARY |
printf "Start time: " >> $SUMMARY |
803 |
start_date=`date` |
start_date=`date` |
804 |
echo $start_date > $SUMMARY |
echo $start_date > $SUMMARY |
805 |
|
|
830 |
fi |
fi |
831 |
echo |
echo |
832 |
echo >> $SUMMARY |
echo >> $SUMMARY |
833 |
cat << EOF | tee -a $SUMMARY |
if test "x$ADM" = x ; then |
834 |
T S U V |
line_0=" ----T----- ----S----- ----U----- ----V-----" |
835 |
G D M c m s m s m s m s |
line_1="G D M c m s m s m s m s" |
836 |
E p a R g m m e . m m e . m m e . m m e . |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
837 |
N n k u 2 i a a d i a a d i a a d i a a d |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
838 |
2 d e n d n x n . n x n . n x n . n x n . |
line_4="2 d e n d n x n . n x n . n x n . n x n ." |
839 |
|
for ii in $PTRACERS_NUM ; do |
840 |
|
# tst=`eval 'echo $HAVE_PTR0'$ii` |
841 |
|
# if test "x$tst" = xt ; then |
842 |
|
line_0="$line_0 --PTR 0"$ii"--" |
843 |
|
line_1="$line_1 m s" |
844 |
|
line_2="$line_2 m m e ." |
845 |
|
line_3="$line_3 i a a d" |
846 |
|
line_4="$line_4 n x n ." |
847 |
|
# fi |
848 |
|
done |
849 |
|
echo "$line_0" | tee -a $SUMMARY |
850 |
|
echo "$line_1" | tee -a $SUMMARY |
851 |
|
echo "$line_2" | tee -a $SUMMARY |
852 |
|
echo "$line_3" | tee -a $SUMMARY |
853 |
|
echo "$line_4" | tee -a $SUMMARY |
854 |
|
echo " " | tee -a $SUMMARY |
855 |
|
else |
856 |
|
echo "ADJOINT=true" >> $SUMMARY |
857 |
|
echo >> $SUMMARY |
858 |
|
cat << EOF | tee -a $SUMMARY |
859 |
|
G D M C G |
860 |
|
E p a R o r |
861 |
|
N n k u s a |
862 |
|
2 d e n t d |
863 |
|
|
864 |
EOF |
EOF |
865 |
|
fi |
866 |
|
|
867 |
# ...and each test directory... |
# ...and each test directory... |
868 |
for dir in $TESTDIRS ; do |
for dir in $TESTDIRS ; do |
875 |
if test -r $dir/input/Makefile ; then |
if test -r $dir/input/Makefile ; then |
876 |
( cd $dir/input ; make CLEAN ) |
( cd $dir/input ; make CLEAN ) |
877 |
fi |
fi |
878 |
|
( |
879 |
|
cd $dir |
880 |
|
rm -rf tr_run.* |
881 |
|
) |
882 |
continue |
continue |
883 |
fi |
fi |
884 |
|
|
885 |
# Verify that the testdir exists and contains previous |
# Verify that the testdir exists and contains previous |
886 |
# results in the correct location--or skip this directory! |
# results in the correct location--or skip this directory! |
887 |
if test ! -r $dir"/results/output.txt" ; then |
fout= |
888 |
echo "can't read \"$dir/results/output.txt\" -- skipping $dir" |
if test "x$ADM" = x ; then |
889 |
|
fout=$dir"/results/output.txt" |
890 |
|
else |
891 |
|
fout=$dir"/results_ad/output.txt_adm" |
892 |
|
fi |
893 |
|
if test ! -r $fout ; then |
894 |
|
echo "can't read \"$fout\" -- skipping $dir" |
895 |
continue |
continue |
896 |
fi |
fi |
897 |
|
if test "x$ADM" = x ; then |
898 |
|
check_for_add_mon_output $fout |
899 |
|
fi |
900 |
|
|
901 |
echo "-------------------------------------------------------------------------------" |
# Check for additional types of monitor output |
|
echo |
|
|
echo "Experiment: $dir" |
|
|
echo |
|
|
unset genmake makedepend make run |
|
|
results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --' |
|
902 |
|
|
903 |
builddir="input" |
builddir="input" |
904 |
rundir="input" |
rundir="input" |
910 |
linkdata $use_seperate_build $dir/$rundir |
linkdata $use_seperate_build $dir/$rundir |
911 |
fi |
fi |
912 |
|
|
913 |
CODE_DIR=$dir/code |
# Check whether there are "extra runs" for this testdir |
914 |
BUILD_DIR=$dir/$builddir |
extra_runs= |
915 |
MPI_FILES="CPP_EEOPTIONS.h_mpi SIZE.h_mpi" |
if test "x$ADM" = x -a "x$use_seperate_build" = x1 ; then |
916 |
NOMPI_FILES="CPP_EEOPTIONS.h_nompi SIZE.h_nompi" |
ex_run_dirs=`( cd $dir ; echo input.* )` |
917 |
|
echo "ex_run_dirs='$ex_run_dirs'" |
918 |
|
for exd in $ex_run_dirs ; do |
919 |
|
name=`echo $exd | sed -e 's/input.//g'` |
920 |
|
outf="$dir/results/output.txt.$name" |
921 |
|
if test -f $outf -a -r $outf ; then |
922 |
|
extra_runs="$extra_runs $name" |
923 |
|
fi |
924 |
|
done |
925 |
|
fi |
926 |
|
|
927 |
# Is this an MPI run? |
if test "x$ADM" = x ; then |
928 |
if test "x$MPI" = xt ; then |
code_dir=code |
929 |
FILES=$MPI_FILES |
CODE_DIR=$dir/code |
|
endings="_mpi" |
|
930 |
else |
else |
931 |
FILES=$NOMPI_FILES |
code_dir=code_ad |
932 |
endings="_nompi" |
CODE_DIR=$dir/code_ad |
933 |
fi |
fi |
934 |
|
BUILD_DIR=$dir/$builddir |
935 |
# Check to see that we have the files |
|
936 |
have_files=t |
if test ! -r $CODE_DIR"/SIZE.h_mpi" -a "x$MPI" = "xt" ; then |
937 |
for i in $FILES ; do |
echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir" |
|
if test ! -r $CODE_DIR/$i ; then |
|
|
echo "Warning: can't read file $CODE_DIR/$i" |
|
|
have_files=f |
|
|
fi |
|
|
done |
|
|
if test "x$have_files" != xt -a "x$MPI" = xt ; then |
|
|
echo "Skipping $dir due to lack of input files (see above warning)" |
|
938 |
continue |
continue |
939 |
fi |
fi |
940 |
|
|
941 |
# If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR |
echo "-------------------------------------------------------------------------------" |
942 |
if test "x$have_files" = xt ; then |
echo |
943 |
for i in $FILES ; do |
echo "Experiment: $dir" |
944 |
sstr="s|$endings||" |
echo |
945 |
name=`echo $i | sed -e $sstr ` |
unset genmake makedepend make run |
946 |
cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1 |
results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --' |
947 |
RETVAL=$? |
|
|
if test "x$RETVAL" != x0 ; then |
|
|
cp $CODE_DIR/$i $BUILD_DIR/$name |
|
|
fi |
|
|
done |
|
|
fi |
|
|
|
|
948 |
# Create an output dir for each OPTFILE/tdir combination |
# Create an output dir for each OPTFILE/tdir combination |
949 |
rel_CDIR=$DRESULTS"/"$dir |
rel_CDIR=$DRESULTS"/"$dir |
950 |
mkdir $rel_CDIR |
mkdir $rel_CDIR |
955 |
else |
else |
956 |
genmakemodel $dir/$builddir && genmake=Y \ |
genmakemodel $dir/$builddir && genmake=Y \ |
957 |
&& makeclean $dir/$builddir \ |
&& makeclean $dir/$builddir \ |
958 |
|
&& symlink_mpifiles $dir $code_dir $builddir \ |
959 |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
960 |
&& makemodel $dir/$builddir && make=Y \ |
&& makemodel $dir/$builddir && make=Y \ |
961 |
&& linkdata $use_seperate_build $dir/$rundir \ |
&& linkdata $use_seperate_build $dir/$rundir \ |
964 |
fi |
fi |
965 |
|
|
966 |
echo |
echo |
967 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
if test "x$ADM" = x ; then |
968 |
echo |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
969 |
echo "$fres" >> $SUMMARY |
echo |
970 |
echo "fresults='$fres'" > $CDIR"/summary.txt" |
echo "$fres" >> $SUMMARY |
971 |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
echo "fresults='$fres'" > $CDIR"/summary.txt" |
972 |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
973 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
974 |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
975 |
|
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
976 |
|
|
977 |
|
for ex in $extra_runs ; do |
978 |
|
test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex" |
979 |
|
for ldir in input.$ex input ; do |
980 |
|
( |
981 |
|
cd "$dir/$ldir" > /dev/null 2>&1 |
982 |
|
ls -1 2>/dev/null \ |
983 |
|
| sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g' |
984 |
|
) > tr_exrun_links |
985 |
|
( |
986 |
|
cd "$dir/tr_run.$ex" |
987 |
|
cat ../../tr_exrun_links | while read i ; do |
988 |
|
if test ! "x$i" = x ; then |
989 |
|
test ! -r $i && ln -s "../"$ldir"/"$i $i |
990 |
|
fi |
991 |
|
done |
992 |
|
) |
993 |
|
test -e tr_exrun_links && rm -f tr_exrun_links |
994 |
|
done |
995 |
|
ldir=build |
996 |
|
( |
997 |
|
cd "$dir/$ldir" > /dev/null 2>&1 |
998 |
|
ls -1 Makefile *.[fFhco] mitgcmuv 2>/dev/null \ |
999 |
|
| sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g' |
1000 |
|
) > tr_exrun_links |
1001 |
|
( |
1002 |
|
cd "$dir/tr_run.$ex" |
1003 |
|
cat ../../tr_exrun_links | while read i ; do |
1004 |
|
if test ! "x$i" = x ; then |
1005 |
|
test ! -r $i && ln -s "../"$ldir"/"$i $i |
1006 |
|
fi |
1007 |
|
done |
1008 |
|
) |
1009 |
|
test -e tr_exrun_links && rm -f tr_exrun_links |
1010 |
|
runmodel $dir/tr_run.$ex && run=Y \ |
1011 |
|
&& results=`testoutput $dir tr_run.$ex "."$ex` |
1012 |
|
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
1013 |
|
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1014 |
|
fres="$fres.$ex" |
1015 |
|
echo |
1016 |
|
echo "$fres" >> $SUMMARY |
1017 |
|
echo "fresults='$fres'" > $CDIR"/summary.txt" |
1018 |
|
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
1019 |
|
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
1020 |
|
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
1021 |
|
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
1022 |
|
done |
1023 |
|
else |
1024 |
|
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
1025 |
|
fres=$fres"$results $dir" |
1026 |
|
echo |
1027 |
|
echo "$fres" >> $SUMMARY |
1028 |
|
echo "fresults='$fres'" > $CDIR"/summary.txt" |
1029 |
|
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
1030 |
|
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
1031 |
|
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
1032 |
|
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
1033 |
|
fi |
1034 |
|
|
1035 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
1036 |
|
|
1037 |
done |
done |
1038 |
|
|
1039 |
echo -n "Start time: " >> $SUMMARY |
printf "Start time: " >> $SUMMARY |
1040 |
echo $start_date >> $SUMMARY |
echo $start_date >> $SUMMARY |
1041 |
echo -n "End time: " >> $SUMMARY |
printf "End time: " >> $SUMMARY |
1042 |
date >> $SUMMARY |
date >> $SUMMARY |
1043 |
|
|
1044 |
# If addresses were supplied and mpack built successfully, then try |
# If addresses were supplied and mpack built successfully, then try |
1049 |
if test "x$HAVE_MPACK" = xt ; then |
if test "x$HAVE_MPACK" = xt ; then |
1050 |
tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \ |
tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \ |
1051 |
&& gzip $DRESULTS".tar" \ |
&& gzip $DRESULTS".tar" \ |
1052 |
&& $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES |
&& $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES |
1053 |
RETVAL=$? |
RETVAL=$? |
1054 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
1055 |
echo |
echo |
1072 |
rm -f tmp_cmpnum.c tmp_cmpnum |
rm -f tmp_cmpnum.c tmp_cmpnum |
1073 |
|
|
1074 |
if test "x$CLEANUP" != xt ; then |
if test "x$CLEANUP" != xt ; then |
1075 |
cat $SUMMARY |
cat $SUMMARY | sed 's/ -- -- -- --//g' |
1076 |
if test -e tr.out ; then |
if test -e tr_out.txt ; then |
1077 |
mv tr.out tr.out.old |
mv tr_out.txt tr_out.txt.old |
1078 |
fi |
fi |
1079 |
cat $SUMMARY > tr.out |
cat $SUMMARY | sed 's/ -- -- -- --//g' > tr_out.txt |
1080 |
|
fi |
1081 |
|
|
1082 |
|
if test "x$DELDIR" = xt ; then |
1083 |
|
rm -rf $DRESULTS |
1084 |
fi |
fi |
1085 |
|
|