18 |
echo " (-optfile=|-of=)STRING list of optfiles to use" |
echo " (-optfile=|-of=)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 test dirs to use" |
echo " (-t|-tdir) STRING list of group and/or exp. dirs to test" |
22 |
echo " (DEF=\"\" which builds all)" |
echo " (recognized groups: basic, tutorials)" |
23 |
|
echo " (DEF=\"\" which test all)" |
24 |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
echo " (-b|-bash) STRING preferred location of a \"bash\" or" |
25 |
echo " Bourne-compatible \"sh\" shell" |
echo " Bourne-compatible \"sh\" shell" |
26 |
echo " (DEF=\"\" for \"bash\")" |
echo " (DEF=\"\" for \"bash\")" |
111 |
return 99 |
return 99 |
112 |
fi |
fi |
113 |
if [ $debug -gt 0 ]; then |
if [ $debug -gt 0 ]; then |
114 |
echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2 |
echo testoutput_for_prop: grep "$2" $1/results/output.$5 1>&2 |
115 |
fi |
fi |
116 |
grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt |
grep "$2" $1/results/output.$5 | sed 's/.*=//' | cat -n > tmp2.txt |
117 |
lncntB=`wc -l tmp2.txt | awk '{print $1}' ` |
lncntB=`wc -l tmp2.txt | awk '{print $1}' ` |
118 |
if [ $lncntB -lt 3 ]; then |
if [ $lncntB -lt 3 ]; then |
119 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
841 |
else |
else |
842 |
TESTDIRS=`scandirs results` |
TESTDIRS=`scandirs results` |
843 |
fi |
fi |
844 |
|
else |
845 |
|
#- expand group of experiments: |
846 |
|
LIST=" " |
847 |
|
for xx in $TESTDIRS |
848 |
|
do |
849 |
|
case $xx in |
850 |
|
'basic') LIST=${LIST}" aim.5l_cs front_relax global_ocean.90x40x15" |
851 |
|
LIST=${LIST}" hs94.128x64x5 tutorial_barotropic_gyre" |
852 |
|
LIST=${LIST}" tutorial_global_oce_biogeo tutorial_plume_on_slope" |
853 |
|
;; |
854 |
|
'tutorials') |
855 |
|
LIST=${LIST}" "`ls | grep 'tutorial_'` ;; |
856 |
|
*) LIST=${LIST}" "$xx ;; |
857 |
|
esac |
858 |
|
done |
859 |
|
#echo 'LIST='${LIST}'<' |
860 |
|
#- remove duplicate and non-directory: |
861 |
|
TESTDIRS=" " |
862 |
|
for xx in $LIST |
863 |
|
do |
864 |
|
if test -d $xx ; then |
865 |
|
yy=`echo $TESTDIRS | grep -c $xx` |
866 |
|
if test $yy = 0 ; then TESTDIRS=${TESTDIRS}" "$xx ; fi |
867 |
|
else |
868 |
|
echo " -- skip \"$xx\" : not a directory !" |
869 |
|
fi |
870 |
|
done |
871 |
fi |
fi |
872 |
|
#echo 'TESTDIRS='${TESTDIRS}'<' |
873 |
|
|
874 |
if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then |
if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then |
875 |
OPTFILE=$MITGCM_OF |
OPTFILE=$MITGCM_OF |
1063 |
#echo "ex_run_dirs='$ex_run_dirs'" |
#echo "ex_run_dirs='$ex_run_dirs'" |
1064 |
for exd in $ex_run_dirs ; do |
for exd in $ex_run_dirs ; do |
1065 |
name=`echo $exd | sed -e 's/input.//g'` |
name=`echo $exd | sed -e 's/input.//g'` |
1066 |
outf="$dir/results/output.txt.$name" |
outf="$dir/results/output.$name.txt" |
1067 |
if test -f $outf -a -r $outf ; then |
if test -f $outf -a -r $outf ; then |
1068 |
if test "x$MULTI_THREAD" = "xt" ; then |
if test "x$MULTI_THREAD" = "xt" ; then |
1069 |
if test -r $dir"/"$exd"/eedata.mth" ; then |
if test -r $dir"/"$exd"/eedata.mth" ; then |
1106 |
&& makemodel $dir/$builddir && make=Y \ |
&& makemodel $dir/$builddir && make=Y \ |
1107 |
&& linkdata $dir/$rundir $input_dirs \ |
&& linkdata $dir/$rundir $input_dirs \ |
1108 |
&& runmodel $dir/$rundir && run=Y \ |
&& runmodel $dir/$rundir && run=Y \ |
1109 |
&& results=`testoutput $dir $rundir` |
&& results=`testoutput $dir $rundir "txt"` |
1110 |
fi |
fi |
1111 |
|
|
1112 |
echo |
echo |
1131 |
run_clean $dir/tr_run.$ex |
run_clean $dir/tr_run.$ex |
1132 |
linkdata $dir/tr_run.$ex input.$ex input |
linkdata $dir/tr_run.$ex input.$ex input |
1133 |
runmodel $dir/tr_run.$ex && run=Y \ |
runmodel $dir/tr_run.$ex && run=Y \ |
1134 |
&& results=`testoutput $dir tr_run.$ex "."$ex` |
&& results=`testoutput $dir tr_run.$ex ${ex}".txt"` |
1135 |
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}` |
1136 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1137 |
fres="$fres.$ex" |
fres="$fres.$ex" |