/[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.175 by jmc, Wed Aug 15 23:19:21 2012 UTC revision 1.185 by jmc, Sun Jul 7 00:33:19 2013 UTC
# Line 322  testoutput_run() Line 322  testoutput_run()
322          'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $refoutp ; yy=$? ;;          'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $refoutp ; yy=$? ;;
323          'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South"  $2 $refoutp ; yy=$? ;;          'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South"  $2 $refoutp ; yy=$? ;;
324          'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North"  $2 $refoutp ; yy=$? ;;          'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North"  $2 $refoutp ; yy=$? ;;
325          'HthSiG') testoutput_var $1 "thSI_IceH_ave_G" "thSIc H Global"    $2 $refoutp ; yy=$? ;;          'HthSiG') testoutput_var $1 "thSI_IceH_ave_G" "thSIc H Glob-ave"  $2 $refoutp ; yy=$? ;;
326          'HthSiS') testoutput_var $1 "thSI_IceH_ave_S" "thSIc H South"     $2 $refoutp ; yy=$? ;;          'HthSiS') testoutput_var $1 "thSI_IceH_ave_S" "thSIc H South-av"  $2 $refoutp ; yy=$? ;;
327          'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North"     $2 $refoutp ; yy=$? ;;          'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North-av"  $2 $refoutp ; yy=$? ;;
328            'HthMxS') testoutput_var $1 "thSI_IceH_max_S" "thSIc H South-max" $2 $refoutp ; yy=$? ;;
329            'HthMxN') testoutput_var $1 "thSI_IceH_max_N" "thSIc H North-max" $2 $refoutp ; yy=$? ;;
330            'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;;
331                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;
332            esac            esac
333            if test $xx = $sVar            if test $xx = $sVar
# Line 467  run_clean() Line 470  run_clean()
470              rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime              rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime
471              rm -rf mnc_test_*              rm -rf mnc_test_*
472              rm -f *_MIT_CE_000.opt0000 costfunction*0000              rm -f *_MIT_CE_000.opt0000 costfunction*0000
473                rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9]
474              echo successful              echo successful
475              exit 0              exit 0
476          )          )
# Line 534  makemodel() Line 538  makemodel()
538              mk_fail=2              mk_fail=2
539          fi          fi
540      fi      fi
541        if test $KIND = 1 -a -f taf_ftl.log ; then
542                head -1 taf_ftl.log >> $CDIR"/summary.txt"
543        fi
544      if test $KIND = 2 -a -f taf_ad.log ; then      if test $KIND = 2 -a -f taf_ad.log ; then
545              head -1 taf_ad.log >> $CDIR"/summary.txt"              head -1 taf_ad.log >> $CDIR"/summary.txt"
546              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`
# Line 802  runmodel() Line 809  runmodel()
809            fi            fi
810          fi          fi
811          rm -f run.log_tmp          rm -f run.log_tmp
812          #- in all cases where OutputFile exists, report SIZE (and AD time)          #- in all cases where OutputFile exists, report SIZE and time
813          if test -f $OUTPUTFILE ; then          if test -f $OUTPUTFILE ; then
814            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
815                  | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
816            if test $KIND = 2 ; then            grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
817              grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
           fi  
818          fi          fi
819          if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi          if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
820          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
# Line 1278  else Line 1284  else
1284  fi  fi
1285    
1286  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
1287  if test -x tr_cmpnum ; then  if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then
1288      echo "skipping comparison code build"      echo "skipping comparison code build"
1289  else  else
1290      createcodelet      createcodelet
# Line 1294  fi Line 1300  fi
1300  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
1301  CMDLINE=$0  CMDLINE=$0
1302  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
1303      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else
1304                          else CMDLINE="$CMDLINE '$xx'" ; fi        nb=`echo $xx | grep -c '='`
1305          if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'"
1306          else yy=`echo "$xx'" | sed "s/=/='/"` ;
1307                                 CMDLINE="$CMDLINE $yy" ; fi
1308        fi
1309  done  done
1310  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done
1311  MACH=`hostname`  MACH=`hostname`
# Line 1342  if test "x$OPTFILE" != xNONE ; then Line 1352  if test "x$OPTFILE" != xNONE ; then
1352          echo >> $SUMMARY          echo >> $SUMMARY
1353          echo "  OPTFILE=$OPTFILE" >> $SUMMARY          echo "  OPTFILE=$OPTFILE" >> $SUMMARY
1354      else      else
1355          echo | tee $SUMMARY          echo | tee -a $SUMMARY
1356          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY
1357          exit 1          exit 1
1358      fi      fi
1359  else  else
# Line 1370  if test $KIND = 0 ; then Line 1380  if test $KIND = 0 ; then
1380  else  else
1381      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`
1382    if test $KIND = 1 ; then    if test $KIND = 1 ; then
1383      echo "TANGLIN=true" >> $SUMMARY     #echo "TANGLIN=true" >> $SUMMARY
1384        echo "TangLin generated by TAF" >> $SUMMARY
1385      elif test $KIND = 3 ; then
1386        echo "TangLin generated by OpenAD" >> $SUMMARY
1387      elif test $KIND = 2 ; then
1388       #echo "ADJOINT=true" >> $SUMMARY
1389        echo "Adjoint generated by TAF" >> $SUMMARY
1390      else
1391        echo "Adjoint generated by OpenAD" >> $SUMMARY
1392      fi
1393      if test $KIND = 1 -o $KIND = 3 ; then
1394      line_1="G D M    C  T  F"      line_1="G D M    C  T  F"
1395      line_2="e p a R  o  L  D"      line_2="e p a R  o  L  D"
1396    else    else
     echo "ADJOINT=true" >> $SUMMARY  
1397      line_1="G D M    C  A  F"      line_1="G D M    C  A  F"
1398      line_2="e p a R  o  d  D"      line_2="e p a R  o  d  D"
1399    fi    fi
# Line 1382  else Line 1401  else
1401      line_4="2 d e n  t  r  r"      line_4="2 d e n  t  r  r"
1402      echo >> $SUMMARY      echo >> $SUMMARY
1403  fi  fi
1404    if test "x$CLEANUP" != xt ; then
1405      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1406      echo "$line_1" | tee -a $SUMMARY      echo "$line_1" | tee -a $SUMMARY
1407      echo "$line_2" | tee -a $SUMMARY      echo "$line_2" | tee -a $SUMMARY
1408      echo "$line_3" | tee -a $SUMMARY      echo "$line_3" | tee -a $SUMMARY
1409      echo "$line_4" | tee -a $SUMMARY      echo "$line_4" | tee -a $SUMMARY
1410      echo ""        | tee -a $SUMMARY      echo ""        | tee -a $SUMMARY
1411    fi
1412  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
1413    
1414  #  ...and each test directory...  #  ...and each test directory...
# Line 1496  for dir in $TESTDIRS ; do Line 1517  for dir in $TESTDIRS ; do
1517      #  Check whether there are "extra runs" for this testdir      #  Check whether there are "extra runs" for this testdir
1518      extra_runs=      extra_runs=
1519      if test "x$NORUN" = xf ; then      if test "x$NORUN" = xf ; then
1520          ex_run_dirs=`( cd $dir ; echo $inputdir.* )`          ex_run_dirs=`( cd $dir ; ls -d $inputdir.* 2> /dev/null )`
1521      fi      fi
1522      #echo "ex_run_dirs='$ex_run_dirs'"      #echo "ex_run_dirs='$ex_run_dirs'"
1523      for exd in $ex_run_dirs ; do      for exd in $ex_run_dirs ; do
1524          name=`echo $exd | sed -e "s/$inputdir\.//"`          name=`echo $exd | sed -e "s/$inputdir\.//"`
1525          refExOut=`echo $ref_outp | sed "s/\./.${name}./"`          refExOut=`echo $ref_outp | sed "s/\./.${name}./"`
1526          outf="$dir/results/$refExOut"          outf="$dir/results/$refExOut"
         #if test -f $outf -a -r $outf ; then  
1527          if test -r $outf -o -r ${outf}.gz ; then          if test -r $outf -o -r ${outf}.gz ; then
1528            if test "x$MULTI_THREAD" = "xt" ; then            if test "x$MULTI_THREAD" = "xt" ; then
1529              if test -r $dir"/"$exd"/eedata.mth" ; then              if test -r $dir"/"$exd"/eedata.mth" ; then
# Line 1597  for dir in $TESTDIRS ; do Line 1617  for dir in $TESTDIRS ; do
1617              fi              fi
1618          done          done
1619    
1620      if test -f $DRESULTS"/"genmake_state ; then : ; else      if test ! -f $DRESULTS"/"genmake_state ; then
1621          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1622              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/^# //'`
1623              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state
# Line 1606  for dir in $TESTDIRS ; do Line 1626  for dir in $TESTDIRS ; do
1626              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1627                  eval $mkOpt                  eval $mkOpt
1628                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\
1629                          $SUMMARY > tr_0.tmp_log                          $SUMMARY > tmp.tr_log
1630                  RETVAL=$?                  RETVAL=$?
1631                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY
1632                          cp tr_0.tmp_log $SUMMARY                          cp tmp.tr_log $SUMMARY
1633                  else rm -f tr_0.tmp_log                  else rm -f tmp.tr_log
1634                  fi                  fi
1635              fi              fi
1636              gmkLog=$dir/$builddir/genmake.log              gmkLog=$dir/$builddir/genmake.log
1637              grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1              if test -r $gmkLog ; then
1638              RETVAL=$?                  grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
1639              if test "x$RETVAL" = x0 ; then                  RETVAL=$?
1640                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  if test "x$RETVAL" = x0 ; then
1641                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1642                          | grep -v '^... compiler version ' > tr_1.tmp_log                    echo "extract compiler version:"   >> $DRESULTS/genmake_state
1643                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state                    sed -n '/Get compiler version/,/<-- compiler version/p' \
1644                  sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                       $gmkLog | grep -v '^... compiler version ' > tmp.tr_log
1645                          >> $DRESULTS/genmake_state                    sed -n '1p' tmp.tr_log >> $DRESULTS/genmake_state
1646                  rm -f tr_1.tmp_log                    sed -n '2,/^$/p' tmp.tr_log | sed '/^$/d' | sed 's/^./ &/' \
1647                                             >> $DRESULTS/genmake_state
1648                      rm -f tmp.tr_log
1649                    fi
1650                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1651                    echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state
1652                    sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state
1653                    sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state
1654              fi              fi
1655          fi          fi
1656      fi      fi
# Line 1685  fi Line 1712  fi
1712  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then
1713      rm -rf $DRESULTS      rm -rf $DRESULTS
1714  fi  fi
1715    echo "======== End of testreport execution ========"

Legend:
Removed from v.1.175  
changed lines
  Added in v.1.185

  ViewVC Help
Powered by ViewVC 1.1.22