--- MITgcm/verification/testreport 2010/04/30 13:07:19 1.140 +++ MITgcm/verification/testreport 2010/10/21 21:29:42 1.143 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.140 2010/04/30 13:07:19 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.143 2010/10/21 21:29:42 jmc Exp $ # $Name: $ # @@ -33,6 +33,7 @@ echo " (-adm|-ad) perform an adjoint run" echo " (-oad) perform an OpenAD adjoint run" echo " (-command|-c) STRING command to run" + echo " (-makedepend|-md) STRING command to use for \"makedepend\"" echo " (-make|-m) STRING command to use for \"make\"" echo " (DEF=\"make\")" echo " (-odir) STRING used to build output directory name" @@ -40,7 +41,7 @@ echo " (-ptracers|-ptr) STRING specify which ptracers to test" echo " (DEF=\"1 2 3 4 5\")" echo " (-match) NUMBER Matching Criteria (number of digits)" - echo " (DEF=\"12\")" + echo " (DEF=\"$MATCH_CRIT\")" echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" echo " (-clean) *ONLY* run \"make CLEAN\"" echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" @@ -317,6 +318,9 @@ ( cd $1; command="$GENMAKE2 -ds -m $MAKE" + if test "x$MKDEPEND" != x ; then + command="$command -makedepend=$MKDEPEND" + fi if test "x$ADM" = xt ; then command="$command --mods=../code_ad" elif test "x$OADM" = xt ; then @@ -829,6 +833,7 @@ HAVE_MPACK= MPACK= COMMAND= +MKDEPEND= if test "x$MAKE" = x ; then MAKE=make fi @@ -903,6 +908,11 @@ -command=* | --command=* | -c=* | --c=*) COMMAND=$ac_optarg ;; + -makedepend | --makedepend | -md | --md) + ac_prev=MKDEPEND ;; + -makedepend=* | --makedepend=* | -md=* | --md=*) + MKDEPEND=$ac_optarg ;; + -make | --make | -m | --m) ac_prev=MAKE ;; -make=* | --make=* | -m=* | --m=*) @@ -1005,8 +1015,12 @@ EXECUTABLE="mitgcmuv" fi +xx=`echo $TESTDIRS | awk '{print $1}'` if test "x$TESTDIRS" = x ; then LIST=`scandirs results/$ref_outp` +elif test $xx = 'start_from' ; then + xx=`echo $TESTDIRS | awk '{print $2}'` + LIST=`scandirs results/$ref_outp | sed -n "/$xx/,$ p"` else #- expand group of experiments: LIST=" " @@ -1199,6 +1213,7 @@ builddir="build" if test ! -d $dir/$builddir ; then mkdir $dir/$builddir ; fi rundir="run" + pfxdir="tr_$rundir" if test ! -d $dir/$rundir ; then rundir=$builddir fi @@ -1214,7 +1229,7 @@ echo -n ' --- dir:' $dir/$rundir ': ' run_clean $dir/$rundir fi - trdir=`( cd $dir ; find . -type d -name "tr_run.*" -print | sed 's/^.\///')` + trdir=`( cd $dir ; find . -type d -name "$pfxdir.*" -print | sed 's/^.\///')` ttd=`echo $trdir | wc -w` if test $ttd != 0 ; then echo ' --- rm dir:' $trdir @@ -1339,11 +1354,11 @@ locDIR=$DRESULTS"/"$dir"."$ex mkdir $locDIR CDIR=`pwd`"/$locDIR" - test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex" - run_clean $dir/tr_run.$ex - linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir - runmodel $dir/tr_run.$ex && run=Y \ - && results=`testoutput_run $dir tr_run.$ex $refExOut` + test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex" + run_clean $dir/$pfxdir.$ex + linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir + runmodel $dir/$pfxdir.$ex && run=Y \ + && results=`testoutput_run $dir $pfxdir.$ex $refExOut` fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` fres="$fres.$ex" echo 1>&2 @@ -1356,11 +1371,11 @@ echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt" if test "x$ADM" = xt ; then head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt" - grep -A3 'Seconds in section "ALL' $dir/tr_run.$ex/$OUTPUTFILE \ + grep -A3 'Seconds in section "ALL' $dir/$pfxdir.$ex/$OUTPUTFILE \ >> $locDIR"/summary.txt" fi if test "x$POSTCLEAN" = xt ; then - run_clean $dir/tr_run.$ex + run_clean $dir/$pfxdir.$ex fi done