/[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.161 by jmc, Sat Apr 30 22:20:17 2011 UTC revision 1.167 by jmc, Mon Sep 26 12:58:48 2011 UTC
# Line 15  usage() Line 15  usage()
15      echo "  (-mpi)                   use MPI to compile and run on 2 processors"      echo "  (-mpi)                   use MPI to compile and run on 2 processors"
16      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"
17      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"
18      echo "  (-ieee/-noieee)          if possible, use IEEE compiler flags"      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"
19      echo "                             (DEF=\"-ieee\")"      echo "                            DEF=off => use IEEE numerics option (if available)"
20        echo "  (-devel)                 use optfile developement flags (if available)"
21      echo "  (-gsl)                   compile with \"-gsl\" flag"      echo "  (-gsl)                   compile with \"-gsl\" flag"
22      echo "  (-use_r4|-ur4)           if allowed, use real*4 type for '_RS' variable"      echo "  (-use_r4|-ur4)           if allowed, use real*4 type for '_RS' variable"
23      echo "  (-optfile|-of) STRING    list of optfiles to use"      echo "  (-optfile|-of) STRING    list of optfiles to use"
# Line 47  usage() Line 48  usage()
48      echo "  (-match) NUMBER          Matching Criteria (number of digits)"      echo "  (-match) NUMBER          Matching Criteria (number of digits)"
49      echo "                             (DEF=\"$MATCH_CRIT\")"      echo "                             (DEF=\"$MATCH_CRIT\")"
50      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
51        echo "  (-ef) STRING             used as genmake2 \"-extra_flag\" argument"
52      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"
53      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"
54        echo "  (-obj)                   only produces objects (=norun & no executable)"
55      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"
56      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
57      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
# Line 248  testoutput_run() Line 251  testoutput_run()
251                    then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi                    then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi
252                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?
253                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;
254            'Cost') testoutput_var $1 "ADM  precision_derivative_cost" "ADM Cost" $2 $3; yy=$? ;;            'Cost') testoutput_var $1 "ADM  ref_cost_function" "ADM CostFct" $2 $3; yy=$? ;;
255            'Grad') testoutput_var $1 "ADM  precision_derivative_grad" "ADM Grad" $2 $3; yy=$? ;;           'AdGrd') testoutput_var $1 "ADM  adjoint_gradient"  "ADM Ad Grad" $2 $3; yy=$? ;;
256             'FDGrd') testoutput_var $1 "ADM  finite-diff_grad"  "ADM FD Grad" $2 $3; yy=$? ;;
257             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;
258             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;
259             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;
# Line 338  genmakemodel() Line 342  genmakemodel()
342              if test "x$OPTFILE" != xNONE ; then              if test "x$OPTFILE" != xNONE ; then
343                  command="$command -optfile=$OPTFILE"                  command="$command -optfile=$OPTFILE"
344              fi              fi
345              if test "x$IEEE" != x ; then              if test $OptLev = 1 ; then
346                  command="$command -ieee"                  command="$command -ieee"
347                fi
348                if test $OptLev = 0 ; then
349                    command="$command -devel"
350              fi              fi
351              if test "x$GSL" = xt ; then              if test "x$GSL" = xt ; then
352                  command="$command -gsl"                  command="$command -gsl"
# Line 354  genmakemodel() Line 361  genmakemodel()
361              if test "x$USE_R4" = xt ; then              if test "x$USE_R4" = xt ; then
362                  command="$command -use_r4"                  command="$command -use_r4"
363              fi              fi
364                if test "x$EXTRFLG" != x ; then
365                    command="$command -extra_flag $EXTRFLG"
366                fi
367              if test "x$TS" = xt ; then              if test "x$TS" = xt ; then
368                  command="$command -ts"                  command="$command -ts"
369              fi              fi
# Line 480  makemodel() Line 490  makemodel()
490                  $MAKE adAll >> make.tr_log 2>&1                  $MAKE adAll >> make.tr_log 2>&1
491              else              else
492                  if test "x$JOBS" = x ; then                  if test "x$JOBS" = x ; then
493                      $MAKE >> make.tr_log 2>&1                      $MAKE $TARG >> make.tr_log 2>&1
494                  else                  else
495                      $MAKE -j $JOBS >> make.tr_log 2>&1                      $MAKE -j $JOBS $TARG >> make.tr_log 2>&1
496                  fi                  fi
497              fi              fi
498              RETVAL=$?              RETVAL=$?
499              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
500                  tail make.tr_log                  tail make.tr_log
501                  echo failed                  echo failed
502                  cp make.tr_log genmake.log genmake.tr_log $CDIR                  cp genmake.log genmake.tr_log $CDIR
503                    tail -$NBLINES_MKLOG make.tr_log > $CDIR"/make.tr_log_tail"
504                  rm -f $EXECUTABLE                  rm -f $EXECUTABLE
505                  mk_fail=1                  mk_fail=1
506              else              else
# Line 726  runmodel() Line 737  runmodel()
737          else          else
738            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then
739              # output do not exist or is older than executable:              # output do not exist or is older than executable:
740              rm -f $RUNLOG ; touch $RUNLOG              rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG
741              if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi              if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi
742              ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
743              RETVAL=$?              RETVAL=$?
# Line 915  check_eedata() Line 926  check_eedata()
926  #  Default properties  #  Default properties
927  debug=0  debug=0
928  verbose=1  verbose=1
929    NBLINES_MKLOG=16000
930    
931  IEEE=true  IEEE=true
932  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
933      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
934  fi  fi
935    OptLev=1
936  GSL=f  GSL=f
937    
938  CLEANUP=f  CLEANUP=f
# Line 948  if test "x$CC" = x ; then Line 961  if test "x$CC" = x ; then
961      CC=cc      CC=cc
962  fi  fi
963  JOBS=  JOBS=
964    TARG=
965  MPI=0  MPI=0
966  MPI_MFILE=  MPI_MFILE=
967  MULTI_THREAD=f  MULTI_THREAD=f
968  OUTDIR=  OUTDIR=
969  DELDIR=  DELDIR=
970  USE_R4=  USE_R4=
971    EXTRFLG=
972    
973  ADM=  ADM=
974  OADM=  OADM=
# Line 1018  for ac_option ; do Line 1033  for ac_option ; do
1033          -j | --j) ac_prev=JOBS ;;          -j | --j) ac_prev=JOBS ;;
1034          -j=* | --j=*) JOBS=$ac_optarg ;;          -j=* | --j=*) JOBS=$ac_optarg ;;
1035    
1036            -ef | --ef) ac_prev=EXTRFLG ;;
1037            -ef=* | --ef=*) EXTRFLG=$ac_optarg ;;
1038    
1039          -clean | --clean) CLEANUP=t ; DELDIR=t ;;          -clean | --clean) CLEANUP=t ; DELDIR=t ;;
1040    
1041          -norun | --norun | -nr | --nr) NORUN=t ;;          -norun | --norun | -nr | --nr) NORUN=t ;;
1042            -obj | --obj ) TARG='obj' ; NORUN=t ;;
1043          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;
1044          -quick | --quick | -q | --q) QUICK=t ;;          -quick | --quick | -q | --q) QUICK=t ;;
1045          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;
# Line 1042  for ac_option ; do Line 1061  for ac_option ; do
1061          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
1062          -oad) OADM=t; NODEPEND=t ;;          -oad) OADM=t; NODEPEND=t ;;
1063    
1064          -ieee) IEEE=true ;;          -ieee)   echo "Warning: ignore option '-ieee' (already the default)"
1065          -noieee) IEEE= ;;                   printf " ... " ;;
1066            -noieee) echo "Warning: will use option '-fast' instead of '-noieee' (obsolete)"
1067                     printf " ... " ; OptLev=`expr $OptLev \* 2` ;;
1068            -fast)  OptLev=`expr $OptLev \* 2` ;;
1069            -devel) OptLev=0 ;;
1070          -gsl) GSL=t ;;          -gsl) GSL=t ;;
1071    
1072          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
# Line 1180  if test "x$ADM" = x -a "x$OADM" = x; the Line 1203  if test "x$ADM" = x -a "x$OADM" = x; the
1203      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`
1204      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`
1205  else  else
1206      DEF_CHECK_LIST='Grad Cost Grad'      DEF_CHECK_LIST='AdGrd Cost AdGrd FDGrd'
1207      EMPTY_RESULTS='.. ..'      EMPTY_RESULTS='.. ..'
1208      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`
1209  fi  fi
# Line 1267  if test "x$ADM" = x -a "x$OADM" = x; the Line 1290  if test "x$ADM" = x -a "x$OADM" = x; the
1290      else line_0="default "$MATCH_CRIT ; fi      else line_0="default "$MATCH_CRIT ; fi
1291         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"
1292      line_1="G D M    c        m  s        m  s        m  s        m  s"      line_1="G D M    c        m  s        m  s        m  s        m  s"
1293      line_2="E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  ."      line_2="e p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  ."
1294      line_3="N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d"      line_3="n n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d"
1295      line_4="2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  ."      line_4="2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  ."
1296      for ii in $PTRACERS_NUM ; do      for ii in $PTRACERS_NUM ; do
1297          line_0="$line_0  --PTR 0"$ii"--"          line_0="$line_0  --PTR 0"$ii"--"
# Line 1291  else Line 1314  else
1314      else line_0="default    "$MATCH_CRIT ; fi      else line_0="default    "$MATCH_CRIT ; fi
1315      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1316      cat << EOF | tee -a $SUMMARY      cat << EOF | tee -a $SUMMARY
1317  G D M    C  G  G D M    C  A  F
1318  E p a R  o  r  e p a R  o  d  D
1319  N n k u  s  a  n n k u  s  G  G
1320  2 d e n  t  d  2 d e n  t  r  r
1321    
1322  EOF  EOF
1323  fi  fi
# Line 1524  for dir in $TESTDIRS ; do Line 1547  for dir in $TESTDIRS ; do
1547              if test "x$RETVAL" = x0 ; then              if test "x$RETVAL" = x0 ; then
1548                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state
1549                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \
1550                         | grep -v '^... compiler version ' > tr_1.tmp_log                          | grep -v '^... compiler version ' > tr_1.tmp_log
1551                  sed -n '1,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state
1552                    sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \
1553                          >> $DRESULTS/genmake_state                          >> $DRESULTS/genmake_state
1554                  rm -f tr_1.tmp_log                  rm -f tr_1.tmp_log
1555              fi              fi

Legend:
Removed from v.1.161  
changed lines
  Added in v.1.167

  ViewVC Help
Powered by ViewVC 1.1.22