/[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.204 by jmc, Fri Nov 20 19:47:46 2015 UTC revision 1.211 by jmc, Wed Jan 11 23:21:21 2017 UTC
# Line 22  usage() Line 22  usage()
22      echo "  (-command|-c) STRING     command to run (e.g., if non-standard MPI setting)"      echo "  (-command|-c) STRING     command to run (e.g., if non-standard MPI setting)"
23      echo "                            DEF='mitgcmuv' or ='mpirun -np TR_NPROC mitgcmuv'"      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    optfile to use"
26      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"
27      echo "                            DEF=off => use IEEE numerics option (if available)"      echo "                            DEF=off => use IEEE numerics option (if available)"
28      echo "  (-devel)                 use optfile developement flags (if available)"      echo "  (-devel)                 use optfile developement flags (if available)"
# Line 63  usage() Line 63  usage()
63      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"
64      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"
65      echo "  (-obj)                   only produces objects (=norun & no executable)"      echo "  (-obj)                   only produces objects (=norun & no executable)"
66        echo "  (-src)                   only produces small '*.f' src files (not even obj)"
67        echo "                            + with: '-adm/-tlm', also makes taf outp src code"
68      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"
69      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
70      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
# Line 270  testoutput_run() Line 272  testoutput_run()
272          allargs=""          allargs=""
273          for xx in $listVar          for xx in $listVar
274          do          do
275            case $xx in           #ii=`echo $xx | sed 's/^pt[0-9][0-9]*..$/XXX/'`        #- any ptr number
276              ii=`echo $xx | sed 's/^pt[1-9]..$/XXX/'`              #- 1 to 9 ptr number
277              if test $ii != 'XXX' ; then
278              #- all except ptracer stats:
279                case $xx in
280             'PS')  if [ $debug -gt 0 ]             'PS')  if [ $debug -gt 0 ]
281                    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
282                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $refoutp ; yy=$?                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $refoutp ; yy=$?
# Line 297  testoutput_run() Line 303  testoutput_run()
303             'Vmx') testoutput_var $1 "dynstat_vvel_max"  "V maximum"       $2 $refoutp ; yy=$? ;;             'Vmx') testoutput_var $1 "dynstat_vvel_max"  "V maximum"       $2 $refoutp ; yy=$? ;;
304             'Vav') testoutput_var $1 "dynstat_vvel_mean" "V mean"          $2 $refoutp ; yy=$? ;;             'Vav') testoutput_var $1 "dynstat_vvel_mean" "V mean"          $2 $refoutp ; yy=$? ;;
305             'Vsd') testoutput_var $1 "dynstat_vvel_sd"   "V Std.Dev"       $2 $refoutp ; yy=$? ;;             'Vsd') testoutput_var $1 "dynstat_vvel_sd"   "V Std.Dev"       $2 $refoutp ; yy=$? ;;
         'pt1mn'|'pt2mn'|'pt3mn'|'pt4mn'|'pt5mn') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`  
            testoutput_var $1 "trcstat_ptracer0"$ii"_min"  "p0"$ii"_min"   $2 $refoutp ; yy=$? ;;  
         'pt1mx'|'pt2mx'|'pt3mx'|'pt4mx'|'pt5mx') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`  
            testoutput_var $1 "trcstat_ptracer0"$ii"_max"  "p0"$ii"_max"   $2 $refoutp ; yy=$? ;;  
         'pt1av'|'pt2av'|'pt3av'|'pt4av'|'pt5av') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`  
            testoutput_var $1 "trcstat_ptracer0"$ii"_mean" "p0"$ii"_mean" $2 $refoutp ; yy=$? ;;  
         'pt1sd'|'pt2sd'|'pt3sd'|'pt4sd'|'pt5sd') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`  
            testoutput_var $1 "trcstat_ptracer0"$ii"_sd"   "p0"$ii"_StDv"  $2 $refoutp ; yy=$? ;;  
306           'Qntmn') testoutput_var $1 "forcing_qnet_min" "Qnet minimum"  $2 $refoutp ; yy=$? ;;           'Qntmn') testoutput_var $1 "forcing_qnet_min" "Qnet minimum"  $2 $refoutp ; yy=$? ;;
307           'Qntmx') testoutput_var $1 "forcing_qnet_max" "Qnet maximum"  $2 $refoutp ; yy=$? ;;           'Qntmx') testoutput_var $1 "forcing_qnet_max" "Qnet maximum"  $2 $refoutp ; yy=$? ;;
308           'Qntav') testoutput_var $1 "forcing_qnet_mean" "Qnet mean"       $2 $refoutp ; yy=$? ;;           'Qntav') testoutput_var $1 "forcing_qnet_mean" "Qnet mean"       $2 $refoutp ; yy=$? ;;
# Line 339  testoutput_run() Line 337  testoutput_run()
337           'sboAp') testoutput_var $1 "sbo_zoamp"         "SBO AM-P"        $2 $refoutp ; yy=$? ;;           '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
341              else
342              #- ptracers stats:
343                nn=`echo $xx | sed 's/pt//' | sed 's/..$//'`
344                ii=`echo $xx | sed 's/^pt[0-9]*//'`
345                case $ii in
346                'mn') testoutput_var $1 "trcstat_ptracer0"$nn"_min"  "p0"$nn"_min"  $2 $refoutp ; yy=$? ;;
347                'mx') testoutput_var $1 "trcstat_ptracer0"$nn"_max"  "p0"$nn"_max"  $2 $refoutp ; yy=$? ;;
348                'av') testoutput_var $1 "trcstat_ptracer0"$nn"_mean" "p0"$nn"_mean" $2 $refoutp ; yy=$? ;;
349                'sd') testoutput_var $1 "trcstat_ptracer0"$nn"_sd"   "p0"$nn"_StDv" $2 $refoutp ; yy=$? ;;
350                esac
351              fi
352            if test $xx = $sVar            if test $xx = $sVar
353            then allargs="$allargs > $yy <"            then allargs="$allargs > $yy <"
354            else allargs="$allargs $yy"            else allargs="$allargs $yy"
# Line 543  makemodel() Line 552  makemodel()
552                      echo successful                      echo successful
553                  fi                  fi
554              fi              fi
555              printf 'make ... '              printf "make $TARG ... "
556              $MAKE_CMD $TARG >> make.tr_log 2>&1              $MAKE_CMD $TARG >> make.tr_log 2>&1
557              RETVAL=$?              RETVAL=$?
558              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
# Line 1163  for ac_option ; do Line 1172  for ac_option ; do
1172    
1173          -norun | --norun | -nr | --nr) NORUN=t ;;          -norun | --norun | -nr | --nr) NORUN=t ;;
1174          -obj | --obj ) TARG='obj' ; NORUN=t ;;          -obj | --obj ) TARG='obj' ; NORUN=t ;;
1175            -src | --src ) TARG='small_f' ; NORUN=t ;;
1176          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;
1177          -quick | --quick | -q | --q) QUICK=t ;;          -quick | --quick | -q | --q) QUICK=t ;;
1178          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;
# Line 1248  fi Line 1258  fi
1258    
1259  #- setting for forward or ADM testing  #- setting for forward or ADM testing
1260  if test $KIND = 1 ; then  if test $KIND = 1 ; then
1261      TARG=ftlall      if test "x$TARG" = xsmall_f ; then TARG=ftltaf ; else TARG=ftlall ; fi
1262      code_dir=code_ad      code_dir=code_ad
1263      inputdir=input_ad      inputdir=input_ad
1264      ref_outp="output_tlm.txt"      ref_outp="output_tlm.txt"
1265      EXECUTABLE="mitgcmuv_ftl"      EXECUTABLE="mitgcmuv_ftl"
1266  elif test $KIND = 2 ; then  elif test $KIND = 2 ; then
1267      if test "x$TARG" = xobj ; then TARG=adobj ; else TARG=adall ; fi      if test "x$TARG" = x        ; then TARG=adall ; fi
1268        if test "x$TARG" = xobj     ; then TARG=adobj ; fi
1269        if test "x$TARG" = xsmall_f ; then TARG=adtaf ; fi
1270      code_dir=code_ad      code_dir=code_ad
1271      inputdir=input_ad      inputdir=input_ad
1272      ref_outp="output_adm.txt"      ref_outp="output_adm.txt"
# Line 1318  done Line 1330  done
1330  if test $count = 1 ; then echo "" ; echo -n " ... " ; fi  if test $count = 1 ; then echo "" ; echo -n " ... " ; fi
1331  #echo 'TESTDIRS='${TESTDIRS}'<'  #echo 'TESTDIRS='${TESTDIRS}'<'
1332    
 if test "x$OPTFILE" = xNONE -a "x$MITGCM_OF" != x ; then  
     OPTFILE=$MITGCM_OF  
 fi  
   
1333  LOC_MFILE='tr_mpi_mfile'  LOC_MFILE='tr_mpi_mfile'
1334  RUNLOG="run.tr_log"  RUNLOG="run.tr_log"
1335  if test "x$MPI" = x0 ; then  if test "x$MPI" = x0 ; then
# Line 1329  if test "x$MPI" = x0 ; then Line 1337  if test "x$MPI" = x0 ; then
1337    if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi    if test "x$COMMAND" = x ; then COMMAND="./$EXECUTABLE > $OUTPUTFILE" ; fi
1338  else  else
1339    OUTPUTFILE="STDOUT.0000"    OUTPUTFILE="STDOUT.0000"
1340    if test "x$COMMAND" = x ; then COMMAND="mpirun -v -np TR_NPROC ./$EXECUTABLE" ; fi    if test "x$COMMAND" = x ; then COMMAND="mpirun -np TR_NPROC ./$EXECUTABLE" ; fi
1341  fi  fi
1342    
1343  echo "OK (COMMAND='$COMMAND')"  echo "OK (COMMAND='$COMMAND')"
# Line 1657  for dir in $TESTDIRS ; do Line 1665  for dir in $TESTDIRS ; do
1665              && symlink_mpifiles $dir $code_dir $builddir \              && symlink_mpifiles $dir $code_dir $builddir \
1666              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
1667              && makemodel $dir/$builddir && make=Y              && makemodel $dir/$builddir && make=Y
1668                echo
1669      else      else
1670          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
1671              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
# Line 1667  for dir in $TESTDIRS ; do Line 1676  for dir in $TESTDIRS ; do
1676              && linkdata $dir/$rundir $inputdir \              && linkdata $dir/$rundir $inputdir \
1677              && runmodel $dir/$rundir && run=Y \              && runmodel $dir/$rundir && run=Y \
1678              && results=`testoutput_run $dir $rundir $ref_outp`              && results=`testoutput_run $dir $rundir $ref_outp`
1679                echo 1>&2
1680      fi      fi
1681      #echo "results='$results'"      #echo "results='$results'"
1682    
1683          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
         echo 1>&2  
1684          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
1685          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
1686    
# Line 1693  for dir in $TESTDIRS ; do Line 1702  for dir in $TESTDIRS ; do
1702              linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir              linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir
1703              runmodel $dir/$pfxdir.$ex && run=Y \              runmodel $dir/$pfxdir.$ex && run=Y \
1704              && results=`testoutput_run $dir $pfxdir.$ex $refExOut`              && results=`testoutput_run $dir $pfxdir.$ex $refExOut`
             fres=`formatresults $dir.$ex ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`  
1705              echo 1>&2              echo 1>&2
1706    
1707                fres=`formatresults $dir.$ex ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1708              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
1709              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
1710              if test "x$POSTCLEAN" = x2 ; then              if test "x$POSTCLEAN" = x2 ; then

Legend:
Removed from v.1.204  
changed lines
  Added in v.1.211

  ViewVC Help
Powered by ViewVC 1.1.22