--- MITgcm/verification/testreport 2013/06/05 17:44:31 1.183 +++ MITgcm/verification/testreport 2013/07/19 18:49:33 1.188 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.183 2013/06/05 17:44:31 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.188 2013/07/19 18:49:33 jmc Exp $ # $Name: $ # @@ -327,6 +327,7 @@ 'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North-av" $2 $refoutp ; yy=$? ;; 'HthMxS') testoutput_var $1 "thSI_IceH_max_S" "thSIc H South-max" $2 $refoutp ; yy=$? ;; 'HthMxN') testoutput_var $1 "thSI_IceH_max_N" "thSIc H North-max" $2 $refoutp ; yy=$? ;; + 'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;; *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;; esac if test $xx = $sVar @@ -469,6 +470,7 @@ rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime rm -rf mnc_test_* rm -f *_MIT_CE_000.opt0000 costfunction*0000 + rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9] echo successful exit 0 ) @@ -537,13 +539,17 @@ fi fi if test $KIND = 1 -a -f taf_ftl.log ; then - head -1 taf_ftl.log >> $CDIR"/summary.txt" + head -1 taf_ftl.log >> $CDIR"/summary.txt" fi if test $KIND = 2 -a -f taf_ad.log ; then - head -1 taf_ad.log >> $CDIR"/summary.txt" - nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` - nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` - echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ + head -1 taf_ad.log >> $CDIR"/summary.txt" + nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` + nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` + if test -f taf_output ; then + n2er=`grep -c 'TAF *.* ERROR ' taf_output` + nerr=`expr $nerr + $n2er` + fi + echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ >> $CDIR"/summary.txt" fi if test $mk_fail != 0 ; then return $mk_fail ; fi @@ -790,6 +796,23 @@ # output do not exist or is older than executable: rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi + #- Divided Adjoint Run: + # get the number of additional runs (add_DIVA_runs) from file "run_ADM_DIVA" + if test $KIND = 2 -a -f run_ADM_DIVA ; then + adm_diva_nb=`sed -n '/^ *add_DIVA_runs\>.*=/p' run_ADM_DIVA | sed 's/ //g'` + echo " Divided Adjoint Run: $adm_diva_nb" >> $RUNLOG + eval "let $adm_diva_nb" + if [ $add_DIVA_runs -ge 1 ] ; then + rm -f costf* divided.ctrl snapshot* + echo -n "(add_DIVA_runs=$add_DIVA_runs) ... " + for ii in `seq 1 $add_DIVA_runs` ; do + ( eval $COMMAND ) >> $RUNLOG 2>&1 + echo " additional DIVA run # $ii : done" >> $RUNLOG + mv -f $OUTPUTFILE ${OUTPUTFILE}.diva_${ii} + done + fi + fi + #- special DIVA processing ends here ( eval $COMMAND ) >> $RUNLOG 2>&1 RETVAL=$? ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` @@ -914,6 +937,13 @@ fi fi printf ' %s' $nm + if test $KIND = 2 ; then + #-- apppend taf repport summary: + tafrep=`grep -c '^ TAF reports ' $CDIR/summary.txt` + if test $tafrep = 1 ; then + grep '^ TAF reports ' $CDIR/summary.txt | awk '{printf " (e=%i, w=%i)",$3,$6}' + fi + fi printf '\n' } @@ -1605,8 +1635,7 @@ 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" + fres=`formatresults $dir.$ex ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` echo 1>&2 echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /> $SUMMARY echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"