--- MITgcm/verification/testreport 2004/12/01 16:59:42 1.52 +++ MITgcm/verification/testreport 2004/12/11 02:48:45 1.59 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.52 2004/12/01 16:59:42 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.59 2004/12/11 02:48:45 edhill Exp $ # $Name: $ # @@ -520,7 +520,7 @@ int main( int argc, char** argv ) { int linnum,best,lncnt; double a,b,abave,relerr; - best = -16; + best = -22; lncnt = 0; while( 1 & (lncnt+=1) < 999 ) { scanf("%d", &linnum); @@ -529,13 +529,9 @@ abave = 0.5*(fabs(a)+fabs(b)); if (abave > 0.0) { relerr=fabs(a-b)/abave; - if (relerr > 0.0) { - linnum = (int)log10(relerr); - best = (best > linnum) ? best : linnum; - } - } - else { - if (best == -16 && abave != 0) best = -22; + if (relerr > 0.0) { linnum = (int)log10(relerr); } + else { linnum = -16 ; } + best = (best > linnum) ? best : linnum; } } if (lncnt == 999) best=-29; @@ -543,14 +539,15 @@ return 0; } EOF - cc -o tmp_cmpnum tmp_cmpnum.c -lm + $CC -o tmp_cmpnum tmp_cmpnum.c -lm if [ -x ./tmp_cmpnum ]; then echo "OK" return 0 else echo - echo "ERROR: failed to compile comparison code" + echo "ERROR: failed to compile comparison code -- please specify" + echo " a C compiler using the CC environment variable." exit 1 fi } @@ -639,7 +636,12 @@ HAVE_MPACK= MPACK="$MPACKDIR/mpack" COMMAND= -MAKE=make +if test "x$MAKE" = x ; then + MAKE=make +fi +if test "x$CC" = x ; then + CC=cc +fi JOBS= MPI=f DELDIR= @@ -881,7 +883,6 @@ fout= if test "x$ADM" = x ; then fout=$dir"/results/output.txt" - check_for_add_mon_output $fout else fout=$dir"/results_ad/output.txt_adm" fi @@ -889,6 +890,9 @@ echo "can't read \"$fout\" -- skipping $dir" continue fi + if test "x$ADM" = x ; then + check_for_add_mon_output $fout + fi # Check for additional types of monitor output @@ -966,8 +970,6 @@ echo "DATE='$DATE'" >> $CDIR"/summary.txt" echo "tdir='$dir'" >> $CDIR"/summary.txt" - OLD_COMMAND=$COMMAND - COMMAND="./mitgcmuv > output.txt" for ex in $extra_runs ; do test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex" mkdir "$dir/tr_run.$ex" @@ -1000,7 +1002,6 @@ echo "DATE='$DATE'" >> $CDIR"/summary.txt" echo "tdir='$dir'" >> $CDIR"/summary.txt" done - COMMAND=$OLD_COMMAND else fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` fres=$fres"$results $dir"