--- MITgcm/verification/testreport 2011/05/18 22:03:57 1.163 +++ MITgcm/verification/testreport 2011/08/03 18:34:31 1.165 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.163 2011/05/18 22:03:57 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.165 2011/08/03 18:34:31 jmc Exp $ # $Name: $ # @@ -15,8 +15,9 @@ echo " (-mpi) use MPI to compile and run on 2 processors" echo " (-MPI) NUMBER use MPI to compile and run on max NUMBER procs" echo " (-mfile|-mf) STRING MPI: file with list of possible machines to run on" - echo " (-ieee/-noieee) if possible, use IEEE compiler flags" - echo " (DEF=\"-ieee\")" + echo " (-fast) use optfile default for compiler flags (no '-ieee')" + echo " DEF=off => use IEEE numerics option (if available)" + echo " (-devel) use optfile developement flags (if available)" echo " (-gsl) compile with \"-gsl\" flag" echo " (-use_r4|-ur4) if allowed, use real*4 type for '_RS' variable" echo " (-optfile|-of) STRING list of optfiles to use" @@ -47,8 +48,10 @@ echo " (-match) NUMBER Matching Criteria (number of digits)" echo " (DEF=\"$MATCH_CRIT\")" echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" + echo " (-ef) STRING used as genmake2 \"-extra_flag\" argument" echo " (-clean) *ONLY* run \"make CLEAN\" & clean run-dir" echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" + echo " (-obj) only produces objects (=norun & no executable)" echo " (-runonly|-ro) *ONLY* run stage (=\"-quick\" without make)" echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" echo " (-nogenmake|-ng) skip the genmake stage" @@ -338,8 +341,11 @@ if test "x$OPTFILE" != xNONE ; then command="$command -optfile=$OPTFILE" fi - if test "x$IEEE" != x ; then - command="$command -ieee" + if test $OptLev = 1 ; then + command="$command -ieee" + fi + if test $OptLev = 0 ; then + command="$command -devel" fi if test "x$GSL" = xt ; then command="$command -gsl" @@ -354,6 +360,9 @@ if test "x$USE_R4" = xt ; then command="$command -use_r4" fi + if test "x$EXTRFLG" != x ; then + command="$command -extra_flag $EXTRFLG" + fi if test "x$TS" = xt ; then command="$command -ts" fi @@ -480,9 +489,9 @@ $MAKE adAll >> make.tr_log 2>&1 else if test "x$JOBS" = x ; then - $MAKE >> make.tr_log 2>&1 + $MAKE $TARG >> make.tr_log 2>&1 else - $MAKE -j $JOBS >> make.tr_log 2>&1 + $MAKE -j $JOBS $TARG >> make.tr_log 2>&1 fi fi RETVAL=$? @@ -922,6 +931,7 @@ if test "x$MITGCM_IEEE" != x ; then IEEE=$MITGCM_IEEE fi +OptLev=1 GSL=f CLEANUP=f @@ -950,12 +960,14 @@ CC=cc fi JOBS= +TARG= MPI=0 MPI_MFILE= MULTI_THREAD=f OUTDIR= DELDIR= USE_R4= +EXTRFLG= ADM= OADM= @@ -1020,9 +1032,13 @@ -j | --j) ac_prev=JOBS ;; -j=* | --j=*) JOBS=$ac_optarg ;; + -ef | --ef) ac_prev=EXTRFLG ;; + -ef=* | --ef=*) EXTRFLG=$ac_optarg ;; + -clean | --clean) CLEANUP=t ; DELDIR=t ;; -norun | --norun | -nr | --nr) NORUN=t ;; + -obj | --obj ) TARG='obj' ; NORUN=t ;; -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;; -quick | --quick | -q | --q) QUICK=t ;; -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;; @@ -1044,8 +1060,12 @@ -adm | -ad) ADM=t ;; -oad) OADM=t; NODEPEND=t ;; - -ieee) IEEE=true ;; - -noieee) IEEE= ;; + -ieee) echo "Warning: ignore option '-ieee' (already the default)" + printf " ... " ;; + -noieee) echo "Warning: will use option '-fast' instead of '-noieee' (obsolete)" + printf " ... " ; OptLev=`expr $OptLev \* 2` ;; + -fast) OptLev=`expr $OptLev \* 2` ;; + -devel) OptLev=0 ;; -gsl) GSL=t ;; -verbose) verbose=2 ;;