--- MITgcm/verification/testreport 2013/08/20 17:43:43 1.193 +++ MITgcm/verification/testreport 2014/11/11 15:45:57 1.198 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.193 2013/08/20 17:43:43 jahn Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.198 2014/11/11 15:45:57 jmc Exp $ # $Name: $ # @@ -19,7 +19,8 @@ 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 " (-command|-c) STRING command to run (needed for MPI run)" + echo " (-command|-c) STRING command to run (e.g., if non-standard MPI setting)" + echo " DEF='mitgcmuv' or ='mpirun -np TR_NPROC mitgcmuv'" echo " ---- testing options : ----" echo " (-optfile|-of) STRING list of optfiles to use" echo " (-fast) use optfile default for compiler flags (no '-ieee')" @@ -330,6 +331,10 @@ '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=$? ;; + 'sbo_M') testoutput_var $1 "sbo_mass" "SBO mass" $2 $refoutp ; yy=$? ;; + 'sboFW') testoutput_var $1 "sbo_mass_fw" "SBO m-FW" $2 $refoutp ; yy=$? ;; + 'sboAc') testoutput_var $1 "sbo_zoamc" "SBO AM-C" $2 $refoutp ; yy=$? ;; + 'sboAp') testoutput_var $1 "sbo_zoamp" "SBO AM-P" $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 @@ -367,12 +372,10 @@ if test "x$MKDEPEND" != x ; then command="$command -makedepend=$MKDEPEND" fi - if test $KIND = 1 -o $KIND = 2 ; then - command="$command --mods=../code_ad" - elif test $KIND = 4 ; then - command="$command -adof ../../../tools/adjoint_options/adjoint_oad -mods ../code_oad" + if test $KIND = 4 ; then + command="$command -oad -mods=../$code_dir" else - command="$command -mods=../code" + command="$command -mods=../$code_dir" fi if test "x$OPTFILE" != xNONE ; then command="$command -optfile=$OPTFILE" @@ -429,7 +432,7 @@ makeclean() { # makeclean directory - if test "x$NODEPEND" = xf ; then rm -f $1/make.tr_log ; fi + if test "x$NOGENMAKE" = xf ; then rm -f $1/make.tr_log ; fi if test "x$NOCLEAN" = xt ; then echo "make Clean skipped!" else @@ -1293,15 +1296,15 @@ LOC_MFILE='tr_mpi_mfile' RUNLOG="run.tr_log" -OUTPUTFILE=$ref_outp -if test "x$COMMAND" = x ; then - COMMAND="./$EXECUTABLE > $OUTPUTFILE" -fi -if test "x$MPI" != x0 ; then - OUTPUTFILE="STDOUT.0000" +if test "x$MPI" = x0 ; then + OUTPUTFILE=$ref_outp + if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi +else + OUTPUTFILE="STDOUT.0000" + if test "x$COMMAND" = x ; then COMMAND="mpirun -v -np TR_NPROC ./$EXECUTABLE" ; fi fi -echo "OK (COMMAND= $COMMAND )" +echo "OK (COMMAND='$COMMAND')" TMP=./tr_$$ #- try to put temporary files in system-local /tmp dir @@ -1360,7 +1363,6 @@ CMDLINE="$CMDLINE $yy" ; fi fi done -#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done MACH=`hostname` UNAMEA=`uname -a` DATE=`date +%Y%m%d` @@ -1368,7 +1370,8 @@ if test "x$OUTDIR" != x ; then BASE="tr_"$OUTDIR"_"$DATE"_" else - short_name=`hostname | sed 's/\..*$//'` + #short_name=`hostname | sed 's/\..*$//'` + short_name=`hostname -s | tr '[:upper:]' '[:lower:]'` BASE="tr_"$short_name"_"$DATE"_" fi DNUM=0