22 |
echo " (-command|-c) STRING command to run (e.g., if non-standard MPI setting)" |
echo " (-command|-c) STRING command to run (e.g., if non-standard MPI setting)" |
23 |
echo " DEF='mitgcmuv' or ='mpirun -np TR_NPROC mitgcmuv'" |
echo " DEF='mitgcmuv' or ='mpirun -np TR_NPROC mitgcmuv'" |
24 |
echo " ---- testing options : ----" |
echo " ---- testing options : ----" |
25 |
echo " (-optfile|-of) STRING list of optfiles to use" |
echo " (-optfile|-of) STRING optfile to use" |
26 |
echo " (-fast) use optfile default for compiler flags (no '-ieee')" |
echo " (-fast) use optfile default for compiler flags (no '-ieee')" |
27 |
echo " DEF=off => use IEEE numerics option (if available)" |
echo " DEF=off => use IEEE numerics option (if available)" |
28 |
echo " (-devel) use optfile developement flags (if available)" |
echo " (-devel) use optfile developement flags (if available)" |
270 |
allargs="" |
allargs="" |
271 |
for xx in $listVar |
for xx in $listVar |
272 |
do |
do |
273 |
case $xx in |
#ii=`echo $xx | sed 's/^pt[0-9][0-9]*..$/XXX/'` #- any ptr number |
274 |
|
ii=`echo $xx | sed 's/^pt[1-9]..$/XXX/'` #- 1 to 9 ptr number |
275 |
|
if test $ii != 'XXX' ; then |
276 |
|
#- all except ptracer stats: |
277 |
|
case $xx in |
278 |
'PS') if [ $debug -gt 0 ] |
'PS') if [ $debug -gt 0 ] |
279 |
then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi |
then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi |
280 |
testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $refoutp ; yy=$? |
testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $refoutp ; yy=$? |
301 |
'Vmx') testoutput_var $1 "dynstat_vvel_max" "V maximum" $2 $refoutp ; yy=$? ;; |
'Vmx') testoutput_var $1 "dynstat_vvel_max" "V maximum" $2 $refoutp ; yy=$? ;; |
302 |
'Vav') testoutput_var $1 "dynstat_vvel_mean" "V mean" $2 $refoutp ; yy=$? ;; |
'Vav') testoutput_var $1 "dynstat_vvel_mean" "V mean" $2 $refoutp ; yy=$? ;; |
303 |
'Vsd') testoutput_var $1 "dynstat_vvel_sd" "V Std.Dev" $2 $refoutp ; yy=$? ;; |
'Vsd') testoutput_var $1 "dynstat_vvel_sd" "V Std.Dev" $2 $refoutp ; yy=$? ;; |
|
'pt1mn'|'pt2mn'|'pt3mn'|'pt4mn'|'pt5mn') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'` |
|
|
testoutput_var $1 "trcstat_ptracer0"$ii"_min" "p0"$ii"_min" $2 $refoutp ; yy=$? ;; |
|
|
'pt1mx'|'pt2mx'|'pt3mx'|'pt4mx'|'pt5mx') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'` |
|
|
testoutput_var $1 "trcstat_ptracer0"$ii"_max" "p0"$ii"_max" $2 $refoutp ; yy=$? ;; |
|
|
'pt1av'|'pt2av'|'pt3av'|'pt4av'|'pt5av') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'` |
|
|
testoutput_var $1 "trcstat_ptracer0"$ii"_mean" "p0"$ii"_mean" $2 $refoutp ; yy=$? ;; |
|
|
'pt1sd'|'pt2sd'|'pt3sd'|'pt4sd'|'pt5sd') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'` |
|
|
testoutput_var $1 "trcstat_ptracer0"$ii"_sd" "p0"$ii"_StDv" $2 $refoutp ; yy=$? ;; |
|
304 |
'Qntmn') testoutput_var $1 "forcing_qnet_min" "Qnet minimum" $2 $refoutp ; yy=$? ;; |
'Qntmn') testoutput_var $1 "forcing_qnet_min" "Qnet minimum" $2 $refoutp ; yy=$? ;; |
305 |
'Qntmx') testoutput_var $1 "forcing_qnet_max" "Qnet maximum" $2 $refoutp ; yy=$? ;; |
'Qntmx') testoutput_var $1 "forcing_qnet_max" "Qnet maximum" $2 $refoutp ; yy=$? ;; |
306 |
'Qntav') testoutput_var $1 "forcing_qnet_mean" "Qnet mean" $2 $refoutp ; yy=$? ;; |
'Qntav') testoutput_var $1 "forcing_qnet_mean" "Qnet mean" $2 $refoutp ; yy=$? ;; |
335 |
'sboAp') testoutput_var $1 "sbo_zoamp" "SBO AM-P" $2 $refoutp ; yy=$? ;; |
'sboAp') testoutput_var $1 "sbo_zoamp" "SBO AM-P" $2 $refoutp ; yy=$? ;; |
336 |
'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;; |
'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;; |
337 |
*) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;; |
*) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;; |
338 |
esac |
esac |
339 |
|
else |
340 |
|
#- ptracers stats: |
341 |
|
nn=`echo $xx | sed 's/pt//' | sed 's/..$//'` |
342 |
|
ii=`echo $xx | sed 's/^pt[0-9]*//'` |
343 |
|
case $ii in |
344 |
|
'mn') testoutput_var $1 "trcstat_ptracer0"$nn"_min" "p0"$nn"_min" $2 $refoutp ; yy=$? ;; |
345 |
|
'mx') testoutput_var $1 "trcstat_ptracer0"$nn"_max" "p0"$nn"_max" $2 $refoutp ; yy=$? ;; |
346 |
|
'av') testoutput_var $1 "trcstat_ptracer0"$nn"_mean" "p0"$nn"_mean" $2 $refoutp ; yy=$? ;; |
347 |
|
'sd') testoutput_var $1 "trcstat_ptracer0"$nn"_sd" "p0"$nn"_StDv" $2 $refoutp ; yy=$? ;; |
348 |
|
esac |
349 |
|
fi |
350 |
if test $xx = $sVar |
if test $xx = $sVar |
351 |
then allargs="$allargs > $yy <" |
then allargs="$allargs > $yy <" |
352 |
else allargs="$allargs $yy" |
else allargs="$allargs $yy" |
1325 |
if test $count = 1 ; then echo "" ; echo -n " ... " ; fi |
if test $count = 1 ; then echo "" ; echo -n " ... " ; fi |
1326 |
#echo 'TESTDIRS='${TESTDIRS}'<' |
#echo 'TESTDIRS='${TESTDIRS}'<' |
1327 |
|
|
|
if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then |
|
|
OPTFILE=$MITGCM_OF |
|
|
fi |
|
|
|
|
1328 |
LOC_MFILE='tr_mpi_mfile' |
LOC_MFILE='tr_mpi_mfile' |
1329 |
RUNLOG="run.tr_log" |
RUNLOG="run.tr_log" |
1330 |
if test "x$MPI" = x0 ; then |
if test "x$MPI" = x0 ; then |
1332 |
if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi |
if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi |
1333 |
else |
else |
1334 |
OUTPUTFILE="STDOUT.0000" |
OUTPUTFILE="STDOUT.0000" |
1335 |
if test "x$COMMAND" = x ; then COMMAND="mpirun -v -np TR_NPROC ./$EXECUTABLE" ; fi |
if test "x$COMMAND" = x ; then COMMAND="mpirun -np TR_NPROC ./$EXECUTABLE" ; fi |
1336 |
fi |
fi |
1337 |
|
|
1338 |
echo "OK (COMMAND='$COMMAND')" |
echo "OK (COMMAND='$COMMAND')" |
1743 |
>> $DRESULTS/genmake_state |
>> $DRESULTS/genmake_state |
1744 |
rm -f tmp.tr_log |
rm -f tmp.tr_log |
1745 |
fi |
fi |
1746 |
echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state |
fi |
1747 |
echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state |
gmkLog=$dir/$builddir/genmake_state |
1748 |
sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state |
if test -r $gmkLog ; then |
1749 |
sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state |
echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state |
1750 |
|
echo "get genmake settings:" >> $DRESULTS/genmake_state |
1751 |
|
sed -n '/^HAVE_/p' $gmkLog | sed 's/^./ &/' \ |
1752 |
|
>> $DRESULTS/genmake_state |
1753 |
fi |
fi |
1754 |
fi |
fi |
1755 |
fi |
fi |