13 |
echo " (-optfile=|-of=)STRING list of genmake2 \"optfiles\"" |
echo " (-optfile=|-of=)STRING list of genmake2 \"optfiles\"" |
14 |
echo " (-a|-addr)STRING list of email recipients" |
echo " (-a|-addr)STRING list of email recipients" |
15 |
echo " (-t|-tdir)STRING list of \"test\" dirs" |
echo " (-t|-tdir)STRING list of \"test\" dirs" |
16 |
|
echo " (-b|-bash)STRING the \"bash\" executable" |
17 |
|
echo " (-m|-make)STRING the \"make\" executable" |
18 |
echo |
echo |
19 |
exit 1 |
exit 1 |
20 |
} |
} |
31 |
exit 1 |
exit 1 |
32 |
fi |
fi |
33 |
echo -n "building mpack... " |
echo -n "building mpack... " |
34 |
( cd $MPACKDIR && ./configure && make ) > build_mpack.out 2>&1 |
( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1 |
35 |
RETVAL=$? |
RETVAL=$? |
36 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
37 |
echo |
echo |
162 |
genmakemodel() |
genmakemodel() |
163 |
{ |
{ |
164 |
# genmakemodel directory |
# genmakemodel directory |
165 |
GENMAKE2="../../../tools/genmake2" |
GENMAKE2="$BASH ../../../tools/genmake2" |
166 |
( |
( |
167 |
cd $1; |
cd $1; |
168 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' 1>&2 |
169 |
# ../../../tools/genmake -ieee -mods=../code > make.log 2>&1 |
# ../../../tools/genmake -ieee -mods=../code > make.log 2>&1 |
170 |
$GENMAKE2 -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1 |
$GENMAKE2 -make $MAKE -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1 |
171 |
RETVAL=$? |
RETVAL=$? |
172 |
for i in gm_state gm_optfile gm_local Makefile ; do |
for i in gm_state gm_optfile gm_local Makefile ; do |
173 |
if test -r $i ; then |
if test -r $i ; then |
193 |
rm -f output.txt |
rm -f output.txt |
194 |
printf 'make CLEAN ... ' 2>&1 |
printf 'make CLEAN ... ' 2>&1 |
195 |
if test -r Makefile ; then |
if test -r Makefile ; then |
196 |
make CLEAN >> make.log 2>&1 |
$MAKE CLEAN >> make.log 2>&1 |
197 |
RETVAL=$? |
RETVAL=$? |
198 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
199 |
tail make.log |
tail make.log |
213 |
( |
( |
214 |
cd $1; |
cd $1; |
215 |
printf 'make depend ... ' 1>&2 |
printf 'make depend ... ' 1>&2 |
216 |
make depend >> make.log 2>&1 |
$MAKE depend >> make.log 2>&1 |
217 |
RETVAL=$? |
RETVAL=$? |
218 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
219 |
tail make.log |
tail make.log |
233 |
cd $1; |
cd $1; |
234 |
if test -r Makefile ; then |
if test -r Makefile ; then |
235 |
printf 'make ... ' 1>&2 |
printf 'make ... ' 1>&2 |
236 |
make >> make.log 2>&1 |
$MAKE >> make.log 2>&1 |
237 |
RETVAL=$? |
RETVAL=$? |
238 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
239 |
tail make.log |
tail make.log |
269 |
rm -f output.txt |
rm -f output.txt |
270 |
fi |
fi |
271 |
printf 'runmodel: ' 1>&2 |
printf 'runmodel: ' 1>&2 |
272 |
make output.txt |
$MAKE output.txt |
273 |
RETVAL=$? |
RETVAL=$? |
274 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
275 |
cp output.txt $CDIR"/output.txt" |
cp output.txt $CDIR"/output.txt" |
317 |
return 0 |
return 0 |
318 |
else |
else |
319 |
echo |
echo |
320 |
echo "createcodelet: failed to compile codelet" | tee |
echo "createcodelet: failed to compile codelet" |
321 |
exit 1 |
exit 1 |
322 |
fi |
fi |
323 |
} |
} |
390 |
ieee=1 |
ieee=1 |
391 |
expts='' |
expts='' |
392 |
|
|
393 |
|
BASH= |
394 |
OPTFILES= |
OPTFILES= |
395 |
ADDRESSES=edhill@mitgcm.org |
ADDRESSES=edhill@mitgcm.org |
396 |
TESTDIRS= |
TESTDIRS= |
397 |
MPACKDIR="../tools/mpack-1.6" |
MPACKDIR="../tools/mpack-1.6" |
398 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
399 |
|
MAKE=make |
400 |
|
|
401 |
echo -n "parsing options... " |
echo -n "parsing options... " |
402 |
|
|
432 |
-tdir=* | --tdir=*) |
-tdir=* | --tdir=*) |
433 |
TESTDIRS=$ac_optarg ;; |
TESTDIRS=$ac_optarg ;; |
434 |
|
|
435 |
|
-bash | --bash | -b | --b) |
436 |
|
ac_prev=BASH ;; |
437 |
|
-bash=* | --bash=*) |
438 |
|
BASH=$ac_optarg ;; |
439 |
|
|
440 |
|
-make | --make | -m | --m) |
441 |
|
ac_prev=MAKE ;; |
442 |
|
-make=* | --make=*) |
443 |
|
MAKE=$ac_optarg ;; |
444 |
|
|
445 |
-quick) quick=1 ;; |
-quick) quick=1 ;; |
446 |
-verbose) verbose=2 ;; |
-verbose) verbose=2 ;; |
447 |
-debug) debug=1 ;; |
-debug) debug=1 ;; |
519 |
|
|
520 |
# ...and each test directory... |
# ...and each test directory... |
521 |
for dir in $TESTDIRS ; do |
for dir in $TESTDIRS ; do |
522 |
|
|
523 |
|
# Verify that the testdir exists and contains previous |
524 |
|
# results in the correct location--or skip this directory! |
525 |
|
if test ! -r $dir"/results/output.txt" ; then |
526 |
|
echo | tee -a $SUMMARY |
527 |
|
echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \ |
528 |
|
| tee -a $SUMMARY |
529 |
|
continue |
530 |
|
fi |
531 |
|
|
532 |
# Create an output dir for each OPTFILE/tdir combination |
# Create an output dir for each OPTFILE/tdir combination |
533 |
CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR |
CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR |
553 |
rundir=input |
rundir=input |
554 |
fi |
fi |
555 |
|
|
|
# Verify that the testdir exists and contains previous |
|
|
# results in the correct location--or skip this directory! |
|
|
if test ! -r $dir"/results/output.txt" ; then |
|
|
echo | tee $SUMMARY |
|
|
echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \ |
|
|
| tee $SUMMARY |
|
|
continue |
|
|
fi |
|
|
|
|
556 |
genmakemodel $dir/$builddir && genmake=Y \ |
genmakemodel $dir/$builddir && genmake=Y \ |
557 |
&& makeclean $dir/$builddir \ |
&& makeclean $dir/$builddir \ |
558 |
&& makedependmodel $dir/$builddir && makedepend=Y \ |
&& makedependmodel $dir/$builddir && makedepend=Y \ |