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:" |
308 |
if test -r Makefile ; then |
if test -r Makefile ; then |
309 |
printf 'make ... ' 1>&2 |
printf 'make ... ' 1>&2 |
310 |
if test "x$ADM" = x ; then |
if test "x$ADM" = x ; then |
311 |
$MAKE >> make.log 2>&1 |
if test "x$JOBS" = x ; then |
312 |
|
$MAKE >> make.log 2>&1 |
313 |
|
else |
314 |
|
$MAKE -j $JOBS >> make.log 2>&1 |
315 |
|
fi |
316 |
else |
else |
317 |
$MAKE adall >> make.log 2>&1 |
$MAKE adall >> make.log 2>&1 |
318 |
fi |
fi |
419 |
cd $1 |
cd $1 |
420 |
printf 'runmodel ... ' 1>&2 |
printf 'runmodel ... ' 1>&2 |
421 |
# make output.txt |
# make output.txt |
422 |
$COMMAND >> run.log 2>&1 |
echo |
423 |
|
# echo "COMMAND='$COMMAND'" |
424 |
|
# echo "pwd='"`pwd`"'" |
425 |
|
( eval $COMMAND ) >> run.log 2>&1 |
426 |
RETVAL=$? |
RETVAL=$? |
427 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
428 |
echo successful 1>&2 |
echo successful 1>&2 |
551 |
expts='' |
expts='' |
552 |
# ieee=1 |
# ieee=1 |
553 |
|
|
554 |
IEEE= |
IEEE=true |
555 |
if test "x$MITGCM_IEEE" != x ; then |
if test "x$MITGCM_IEEE" != x ; then |
556 |
IEEE=$MITGCM_IEEE |
IEEE=$MITGCM_IEEE |
557 |
fi |
fi |
572 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
573 |
COMMAND= |
COMMAND= |
574 |
MAKE=make |
MAKE=make |
575 |
|
JOBS= |
576 |
MPI=f |
MPI=f |
577 |
|
DELDIR= |
578 |
|
|
579 |
ADM= |
ADM= |
580 |
|
|
627 |
-make=* | --make=*) |
-make=* | --make=*) |
628 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
629 |
|
|
630 |
|
-j) ac_prev=JOBS ;; |
631 |
|
-j=*) JOBS=$ac_optarg ;; |
632 |
|
|
633 |
-clean | --clean) |
-clean | --clean) |
634 |
CLEANUP=t ;; |
CLEANUP=t ;; |
635 |
|
|
653 |
-debug) debug=1 ;; |
-debug) debug=1 ;; |
654 |
-quiet) verbose=0 ;; |
-quiet) verbose=0 ;; |
655 |
|
|
656 |
|
-deldir | -dd) DELDIR=t ;; |
657 |
|
|
658 |
-*) |
-*) |
659 |
echo "Error: unrecognized option: "$ac_option |
echo "Error: unrecognized option: "$ac_option |
660 |
usage |
usage |
877 |
OLD_COMMAND=$COMMAND |
OLD_COMMAND=$COMMAND |
878 |
COMMAND="./mitgcmuv > output.txt" |
COMMAND="./mitgcmuv > output.txt" |
879 |
for ex in $extra_runs ; do |
for ex in $extra_runs ; do |
880 |
test -e "$dir/tr_run" && rm -rf "$dir/tr_run" |
test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex" |
881 |
mkdir "$dir/tr_run" |
mkdir "$dir/tr_run.$ex" |
882 |
( cd "$dir/input" ; links=`ls -1 | grep -v CVS` ) |
links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
883 |
( |
( |
884 |
cd "$dir/tr_run" |
cd "$dir/tr_run.$ex" |
885 |
for i in $links; do |
for i in $links; do |
886 |
ln -s ../input/$i $i |
ln -s ../input/$i $i |
887 |
done |
done |
888 |
) |
) |
889 |
( cd "$dir/input.$ex" ; links=`ls -1 | grep -v CVS` ) |
links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )` |
890 |
( |
( |
891 |
cd "$dir/tr_run" |
cd "$dir/tr_run.$ex" |
892 |
for i in $links; do |
for i in $links; do |
893 |
test -e $i && rm -f $i |
test -e $i && rm -f $i |
894 |
ln -s ../input.$ex/$i $i |
ln -s ../input.$ex/$i $i |
895 |
done |
done |
896 |
ln -s ../$builddir/mitgcmuv mitgcmuv |
ln -s ../$builddir/mitgcmuv mitgcmuv |
897 |
) |
) |
898 |
runmodel $dir/tr_run && run=Y \ |
runmodel $dir/tr_run.$ex && run=Y \ |
899 |
&& results=`testoutput $dir $rundir "."$ex` |
&& results=`testoutput $dir tr_run.$ex "."$ex` |
900 |
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}` |
901 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
902 |
fres="$fres.$ex" |
fres="$fres.$ex" |
968 |
cat $SUMMARY > tr_out.txt |
cat $SUMMARY > tr_out.txt |
969 |
fi |
fi |
970 |
|
|
971 |
|
if test "x$DELDIR" = xt ; then |
972 |
|
rm -rf $DRESULTS |
973 |
|
fi |
974 |
|
|