15 |
echo " (-mpi) compile and run using MPI" |
echo " (-mpi) compile and run using MPI" |
16 |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
17 |
echo " (DEF=\"-ieee\")" |
echo " (DEF=\"-ieee\")" |
18 |
echo " (-optfile=|-of=)STRING list of optfiles to use" |
echo " (-of=|-optfile=)STRING list of optfiles to use" |
19 |
echo " (-a|-addr) STRING list of email recipients" |
echo " (-a|-addr) STRING list of email recipients" |
20 |
echo " (DEF=\"edhill@mitgcm.org\")" |
echo " (DEF=\"edhill@mitgcm.org\")" |
21 |
echo " (-t|-tdir) STRING list of group and/or exp. dirs to test" |
echo " (-t|-tdir) STRING list of group and/or exp. dirs to test" |
22 |
echo " (recognized groups: basic, tutorials)" |
echo " (recognized groups: basic, tutorials)" |
23 |
echo " (DEF=\"\" which test all)" |
echo " (DEF=\"\" which test all)" |
24 |
|
echo " (-skd|-skipdir) STRING list of exp. dirs to skip" |
25 |
|
echo " (DEF=\"\" which test all)" |
26 |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
27 |
echo " Bourne-compatible \"sh\" shell" |
echo " Bourne-compatible \"sh\" shell" |
28 |
echo " (DEF=\"\" for \"bash\")" |
echo " (DEF=\"\" for \"bash\")" |
33 |
echo " (DEF=\"make\")" |
echo " (DEF=\"make\")" |
34 |
echo " (-odir) STRING used to build output directory name" |
echo " (-odir) STRING used to build output directory name" |
35 |
echo " (DEF=\"hostname\")" |
echo " (DEF=\"hostname\")" |
36 |
echo " (-ptracers|-ptr) STRING specify which ptracers to test" |
echo " (-ptr|-ptracers) STRING specify which ptracers to test" |
37 |
echo " (DEF=\"1 2 3 4 5\")" |
echo " (DEF=\"1 2 3 4 5\")" |
38 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
39 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
40 |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-q|-quick) same as \"-nogenmake -noclean -nodepend\"" |
41 |
echo " (-nogenmake|-ng) skip the genmake stage" |
echo " (-ng|-nogenmake) skip the genmake stage" |
42 |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
echo " (-nc|-noclean) skip the \"make clean\" stage" |
43 |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
echo " (-nd|-nodepend) skip the \"make depend\" stage" |
44 |
echo " (-deldir|-dd) on success, delete the output directory" |
echo " (-dd|-deldir) on success, delete the output directory" |
45 |
echo |
echo |
46 |
echo "and where STRING can be a whitespace-delimited list" |
echo "and where STRING can be a whitespace-delimited list" |
47 |
echo "such as:" |
echo "such as:" |
653 |
|
|
654 |
} |
} |
655 |
|
|
|
show_help() |
|
|
{ |
|
|
cat - << EOF |
|
|
$0 [-help] [-quick] [-verbose] dir1 [dir2] [...] |
|
|
|
|
|
-help|-h Show this help message |
|
|
-quiet Reduce the amount of output |
|
|
-verbose Produce copious amounts of output |
|
|
-debug Produce even more output which will mean nothing to most |
|
|
-force Do "make CLEAN" before compiling. This forces a complete rebuild. |
|
|
-clean Do "make CLEAN" after compiling and testing. |
|
|
-cleanup Aggresively removes all model output, executables and object files |
|
|
and then exits. Use with care. |
|
|
|
|
|
Normal usage: |
|
|
$0 * Configure, compile, run and analyze in all experiment directories |
|
|
EOF |
|
|
} |
|
|
|
|
656 |
scandirs() |
scandirs() |
657 |
{ |
{ |
658 |
if [ $# -eq 1 ]; then |
if [ $# -eq 1 ]; then |
692 |
OPTFILE=NONE |
OPTFILE=NONE |
693 |
ADDRESSES= |
ADDRESSES= |
694 |
TESTDIRS= |
TESTDIRS= |
695 |
|
SKIPDIRS= |
696 |
MPACKDIR="../tools/mpack-1.6" |
MPACKDIR="../tools/mpack-1.6" |
697 |
HAVE_MPACK= |
HAVE_MPACK= |
698 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
748 |
-tdir=* | --tdir=*) |
-tdir=* | --tdir=*) |
749 |
TESTDIRS=$ac_optarg ;; |
TESTDIRS=$ac_optarg ;; |
750 |
|
|
751 |
|
-skipdir | --skipdir | -skd | --skd) |
752 |
|
ac_prev=SKIPDIRS ;; |
753 |
|
-skipdir=* | --skipdir=*) |
754 |
|
SKIPDIRS=$ac_optarg ;; |
755 |
|
|
756 |
-bash | --bash | -b | --b) |
-bash | --bash | -b | --b) |
757 |
ac_prev=BASH ;; |
ac_prev=BASH ;; |
758 |
-bash=* | --bash=*) |
-bash=* | --bash=*) |
833 |
|
|
834 |
if test "x$TESTDIRS" = x ; then |
if test "x$TESTDIRS" = x ; then |
835 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
836 |
TESTDIRS=`scandirs results_ad` |
LIST=`scandirs results_ad` |
837 |
else |
else |
838 |
TESTDIRS=`scandirs results` |
LIST=`scandirs results` |
839 |
fi |
fi |
840 |
else |
else |
841 |
#- expand group of experiments: |
#- expand group of experiments: |
852 |
*) LIST=${LIST}" "$xx ;; |
*) LIST=${LIST}" "$xx ;; |
853 |
esac |
esac |
854 |
done |
done |
855 |
#echo 'LIST='${LIST}'<' |
fi |
856 |
#- remove duplicate and non-directory: |
#echo 'LIST='${LIST}'<' |
857 |
TESTDIRS=" " |
#- skip dirs, remove duplicate and non-directory: |
858 |
for xx in $LIST |
TESTDIRS=" " |
859 |
do |
count=0 |
860 |
|
for xx in $LIST |
861 |
|
do |
862 |
|
yy=`echo $SKIPDIRS | grep -c $xx` |
863 |
|
if test $yy = 0 ; then |
864 |
if test -d $xx ; then |
if test -d $xx ; then |
865 |
yy=`echo $TESTDIRS | grep -c $xx` |
yy=`echo $TESTDIRS | grep -c $xx` |
866 |
if test $yy = 0 ; then TESTDIRS=${TESTDIRS}" "$xx ; fi |
if test $yy = 0 ; then TESTDIRS=${TESTDIRS}" "$xx ; fi |
867 |
else |
else count=1 ; |
868 |
echo " -- skip \"$xx\" : not a directory !" |
echo ""; echo -n " -- skip \"$xx\" (not a directory !)" |
869 |
fi |
fi |
870 |
done |
else |
871 |
fi |
if test $count = 1 ; then echo -n ", \"$xx\"" |
872 |
|
else count=1 ; echo "" ; echo -n " skip: \"$xx\"" |
873 |
|
fi |
874 |
|
fi |
875 |
|
done |
876 |
|
if test $count = 1 ; then echo "" ; echo -n " ... " ; fi |
877 |
#echo 'TESTDIRS='${TESTDIRS}'<' |
#echo 'TESTDIRS='${TESTDIRS}'<' |
878 |
|
|
879 |
if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then |
if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then |