/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Diff of /MITgcm/verification/testreport

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.194 by jmc, Thu Aug 22 19:34:15 2013 UTC revision 1.199 by mlosch, Wed Feb 18 16:11:31 2015 UTC
# Line 19  usage() Line 19  usage()
19      echo "  (-mpi)                   use MPI to compile and run on 2 processors"      echo "  (-mpi)                   use MPI to compile and run on 2 processors"
20      echo "  (-MPI)  NUMBER           use MPI to compile and run on max NUMBER procs"      echo "  (-MPI)  NUMBER           use MPI to compile and run on max NUMBER procs"
21      echo "  (-mfile|-mf) STRING      MPI: file with list of possible machines to run on"      echo "  (-mfile|-mf) STRING      MPI: file with list of possible machines to run on"
22      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)"
23        echo "                            DEF='mitgcmuv' or ='mpirun -np TR_NPROC mitgcmuv'"
24      echo " ---- testing options : ----"      echo " ---- testing options : ----"
25      echo "  (-optfile|-of) STRING    list of optfiles to use"      echo "  (-optfile|-of) STRING    list of optfiles to use"
26      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"
# Line 330  testoutput_run() Line 331  testoutput_run()
331          'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North-av"  $2 $refoutp ; yy=$? ;;          'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North-av"  $2 $refoutp ; yy=$? ;;
332          'HthMxS') testoutput_var $1 "thSI_IceH_max_S" "thSIc H South-max" $2 $refoutp ; yy=$? ;;          'HthMxS') testoutput_var $1 "thSI_IceH_max_S" "thSIc H South-max" $2 $refoutp ; yy=$? ;;
333          'HthMxN') testoutput_var $1 "thSI_IceH_max_N" "thSIc H North-max" $2 $refoutp ; yy=$? ;;          'HthMxN') testoutput_var $1 "thSI_IceH_max_N" "thSIc H North-max" $2 $refoutp ; yy=$? ;;
334             'sbo_M') testoutput_var $1 "sbo_mass"          "SBO mass"        $2 $refoutp ; yy=$? ;;
335             'sboFW') testoutput_var $1 "sbo_mass_fw"       "SBO m-FW"        $2 $refoutp ; yy=$? ;;
336             'sboAc') testoutput_var $1 "sbo_zoamc"         "SBO AM-C"        $2 $refoutp ; yy=$? ;;
337             'sboAp') testoutput_var $1 "sbo_zoamp"         "SBO AM-P"        $2 $refoutp ; yy=$? ;;
338          'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;;          'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;;
339                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;
340            esac            esac
# Line 367  genmakemodel() Line 372  genmakemodel()
372              if test "x$MKDEPEND" != x ; then              if test "x$MKDEPEND" != x ; then
373                  command="$command -makedepend=$MKDEPEND"                  command="$command -makedepend=$MKDEPEND"
374              fi              fi
375              if test $KIND = 1 -o $KIND = 2 ; then              if test $KIND = 4 ; then
376                  command="$command --mods=../code_ad"                  command="$command -oad -mods=../$code_dir"
             elif test $KIND = 4 ; then  
                 command="$command -adof ../../../tools/adjoint_options/adjoint_oad -mods ../code_oad"  
377              else              else
378                  command="$command -mods=../code"                  command="$command -mods=../$code_dir"
379              fi              fi
380              if test "x$OPTFILE" != xNONE ; then              if test "x$OPTFILE" != xNONE ; then
381                  command="$command -optfile=$OPTFILE"                  command="$command -optfile=$OPTFILE"
# Line 1293  fi Line 1296  fi
1296    
1297  LOC_MFILE='tr_mpi_mfile'  LOC_MFILE='tr_mpi_mfile'
1298  RUNLOG="run.tr_log"  RUNLOG="run.tr_log"
1299  OUTPUTFILE=$ref_outp  if test "x$MPI" = x0 ; then
1300  if test "x$COMMAND" = x ; then    OUTPUTFILE=$ref_outp
1301      COMMAND="./$EXECUTABLE > $OUTPUTFILE"    if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi
1302  fi  else
1303  if test "x$MPI" != x0 ; then    OUTPUTFILE="STDOUT.0000"
1304      OUTPUTFILE="STDOUT.0000"    if test "x$COMMAND" = x ; then COMMAND="mpirun -v -np TR_NPROC ./$EXECUTABLE" ; fi
1305  fi  fi
1306    
1307  echo "OK (COMMAND= $COMMAND )"  echo "OK (COMMAND='$COMMAND')"
1308    
1309  TMP=./tr_$$  TMP=./tr_$$
1310  #- try to put temporary files in system-local /tmp dir  #- try to put temporary files in system-local /tmp dir
# Line 1360  for xx in "$@" ; do nw=`echo $xx | wc -w Line 1363  for xx in "$@" ; do nw=`echo $xx | wc -w
1363                               CMDLINE="$CMDLINE $yy" ; fi                               CMDLINE="$CMDLINE $yy" ; fi
1364      fi      fi
1365  done  done
 #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done  
1366  MACH=`hostname`  MACH=`hostname`
1367  UNAMEA=`uname -a`  UNAMEA=`uname -a`
1368  DATE=`date +%Y%m%d`  DATE=`date +%Y%m%d`
# Line 1368  BASE="tr_"$MACH"_"$DATE"_" Line 1370  BASE="tr_"$MACH"_"$DATE"_"
1370  if test "x$OUTDIR" != x ; then  if test "x$OUTDIR" != x ; then
1371      BASE="tr_"$OUTDIR"_"$DATE"_"      BASE="tr_"$OUTDIR"_"$DATE"_"
1372  else  else
1373      short_name=`hostname | sed 's/\..*$//'`     #short_name=`hostname -s | tr '[:upper:]' '[:lower:]'`
1374       # hostname -s is not universal (does work on AIX system)
1375       short_name=`hostname | sed 's/\..*$//' | tr '[:upper:]' '[:lower:]'`
1376      
1377      BASE="tr_"$short_name"_"$DATE"_"      BASE="tr_"$short_name"_"$DATE"_"
1378  fi  fi
1379  DNUM=0  DNUM=0
# Line 1674  for dir in $TESTDIRS ; do Line 1679  for dir in $TESTDIRS ; do
1679          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1680              mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'`              mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'`
1681              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state
1682              sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state  #           sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state
1683    # bsd-sed cannot do the above code
1684                cat $dir/$builddir/Makefile | \
1685                    sed  -n '/^# executed by:/{N
1686                                               p
1687                                               }' >> $DRESULTS/genmake_state
1688              echo " $mkOpt" >> $DRESULTS/genmake_state              echo " $mkOpt" >> $DRESULTS/genmake_state
1689              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1690                  eval $mkOpt                  eval $mkOpt
1691                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\  #               sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\
1692                          $SUMMARY > tmp.tr_log  #                       $SUMMARY > tmp.tr_log
1693    # bsd-sed requires a newline after "a\":
1694                    sed "/^No \"OPTFILE\" was specified ; genmake2/a\\
1695                             OPTFILE=${OPTFILE}" $SUMMARY > tmp.tr_log
1696                  RETVAL=$?                  RETVAL=$?
1697                  if test "x$RETVAL" = x0 ; then                  if test "x$RETVAL" = x0 ; then
1698                      cp -f tmp.tr_log $SUMMARY                      cp -f tmp.tr_log $SUMMARY

Legend:
Removed from v.1.194  
changed lines
  Added in v.1.199

  ViewVC Help
Powered by ViewVC 1.1.22