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\")" |
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 " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
31 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
32 |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
33 |
echo " (-nogenmake|-ng) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
34 |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
35 |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
36 |
|
echo " (-deldir|-dd) on success, delete the output directory" |
37 |
echo |
echo |
38 |
echo "and where STRING follows a whitespace-delimited format" |
echo "and where STRING follows a whitespace-delimited format" |
39 |
echo "such as:" |
echo "such as:" |
236 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' 1>&2 |
237 |
$command > make.log 2>&1 |
$command > make.log 2>&1 |
238 |
RETVAL=$? |
RETVAL=$? |
239 |
cp Makefile $CDIR |
# Reduce the size of the testing emails! |
240 |
|
# cp Makefile $CDIR |
241 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
242 |
tail make.log |
tail make.log |
243 |
echo "genmakemodel: genmake failed" 1>&2 |
echo "genmakemodel: genmake failed" 1>&2 |
309 |
if test -r Makefile ; then |
if test -r Makefile ; then |
310 |
printf 'make ... ' 1>&2 |
printf 'make ... ' 1>&2 |
311 |
if test "x$ADM" = x ; then |
if test "x$ADM" = x ; then |
312 |
$MAKE >> make.log 2>&1 |
if test "x$JOBS" = x ; then |
313 |
|
$MAKE >> make.log 2>&1 |
314 |
|
else |
315 |
|
$MAKE -j $JOBS >> make.log 2>&1 |
316 |
|
fi |
317 |
else |
else |
318 |
$MAKE adall >> make.log 2>&1 |
$MAKE adall >> make.log 2>&1 |
319 |
fi |
fi |
427 |
RETVAL=$? |
RETVAL=$? |
428 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
429 |
echo successful 1>&2 |
echo successful 1>&2 |
430 |
if test "x$ADM" = x ; then |
# === Reduce the size of the testing emails! |
431 |
cp output.txt $CDIR"/output.txt" |
# if test "x$ADM" = x ; then |
432 |
else |
# cp output.txt $CDIR"/output.txt" |
433 |
cp output.txt_adm $CDIR"/output.txt_adm" |
# else |
434 |
fi |
# cp output.txt_adm $CDIR"/output.txt_adm" |
435 |
|
# fi |
436 |
return 0 |
return 0 |
437 |
else |
else |
438 |
tail run.log |
tail run.log |
553 |
expts='' |
expts='' |
554 |
# ieee=1 |
# ieee=1 |
555 |
|
|
556 |
IEEE= |
IEEE=true |
557 |
if test "x$MITGCM_IEEE" != x ; then |
if test "x$MITGCM_IEEE" != x ; then |
558 |
IEEE=$MITGCM_IEEE |
IEEE=$MITGCM_IEEE |
559 |
fi |
fi |
574 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
575 |
COMMAND= |
COMMAND= |
576 |
MAKE=make |
MAKE=make |
577 |
|
JOBS= |
578 |
MPI=f |
MPI=f |
579 |
|
DELDIR= |
580 |
|
|
581 |
ADM= |
ADM= |
582 |
|
|
629 |
-make=* | --make=*) |
-make=* | --make=*) |
630 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
631 |
|
|
632 |
|
-j) ac_prev=JOBS ;; |
633 |
|
-j=*) JOBS=$ac_optarg ;; |
634 |
|
|
635 |
-clean | --clean) |
-clean | --clean) |
636 |
CLEANUP=t ;; |
CLEANUP=t ;; |
637 |
|
|
655 |
-debug) debug=1 ;; |
-debug) debug=1 ;; |
656 |
-quiet) verbose=0 ;; |
-quiet) verbose=0 ;; |
657 |
|
|
658 |
|
-deldir | -dd) DELDIR=t ;; |
659 |
|
|
660 |
-*) |
-*) |
661 |
echo "Error: unrecognized option: "$ac_option |
echo "Error: unrecognized option: "$ac_option |
662 |
usage |
usage |
879 |
OLD_COMMAND=$COMMAND |
OLD_COMMAND=$COMMAND |
880 |
COMMAND="./mitgcmuv > output.txt" |
COMMAND="./mitgcmuv > output.txt" |
881 |
for ex in $extra_runs ; do |
for ex in $extra_runs ; do |
882 |
test -e "$dir/tr_run" && rm -rf "$dir/tr_run" |
test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex" |
883 |
mkdir "$dir/tr_run" |
mkdir "$dir/tr_run.$ex" |
884 |
links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
885 |
( |
( |
886 |
cd "$dir/tr_run" |
cd "$dir/tr_run.$ex" |
887 |
for i in $links; do |
for i in $links; do |
888 |
ln -s ../input/$i $i |
ln -s ../input/$i $i |
889 |
done |
done |
890 |
) |
) |
891 |
links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
892 |
( |
( |
893 |
cd "$dir/tr_run" |
cd "$dir/tr_run.$ex" |
894 |
for i in $links; do |
for i in $links; do |
895 |
test -e $i && rm -f $i |
test -e $i && rm -f $i |
896 |
ln -s ../input.$ex/$i $i |
ln -s ../input.$ex/$i $i |
897 |
done |
done |
898 |
ln -s ../$builddir/mitgcmuv mitgcmuv |
ln -s ../$builddir/mitgcmuv mitgcmuv |
899 |
) |
) |
900 |
runmodel $dir/tr_run && run=Y \ |
runmodel $dir/tr_run.$ex && run=Y \ |
901 |
&& results=`testoutput $dir tr_run "."$ex` |
&& results=`testoutput $dir tr_run.$ex "."$ex` |
902 |
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
903 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
904 |
fres="$fres.$ex" |
fres="$fres.$ex" |
940 |
if test "x$HAVE_MPACK" = xt ; then |
if test "x$HAVE_MPACK" = xt ; then |
941 |
tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \ |
tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \ |
942 |
&& gzip $DRESULTS".tar" \ |
&& gzip $DRESULTS".tar" \ |
943 |
&& $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES |
&& $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES |
944 |
RETVAL=$? |
RETVAL=$? |
945 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
946 |
echo |
echo |
970 |
cat $SUMMARY > tr_out.txt |
cat $SUMMARY > tr_out.txt |
971 |
fi |
fi |
972 |
|
|
973 |
|
if test "x$DELDIR" = xt ; then |
974 |
|
rm -rf $DRESULTS |
975 |
|
fi |
976 |
|
|