/[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.182 by jmc, Tue Apr 9 20:51:50 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                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;
331            esac            esac
332            if test $xx = $sVar            if test $xx = $sVar
# Line 534  makemodel() Line 536  makemodel()
536              mk_fail=2              mk_fail=2
537          fi          fi
538      fi      fi
539        if test $KIND = 1 -a -f taf_ftl.log ; then
540                head -1 taf_ftl.log >> $CDIR"/summary.txt"
541        fi
542      if test $KIND = 2 -a -f taf_ad.log ; then      if test $KIND = 2 -a -f taf_ad.log ; then
543              head -1 taf_ad.log >> $CDIR"/summary.txt"              head -1 taf_ad.log >> $CDIR"/summary.txt"
544              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`
# Line 802  runmodel() Line 807  runmodel()
807            fi            fi
808          fi          fi
809          rm -f run.log_tmp          rm -f run.log_tmp
810          #- in all cases where OutputFile exists, report SIZE (and AD time)          #- in all cases where OutputFile exists, report SIZE and time
811          if test -f $OUTPUTFILE ; then          if test -f $OUTPUTFILE ; then
812            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
813                  | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
814            if test $KIND = 2 ; then            grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
815              grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
           fi  
816          fi          fi
817          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
818          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
# Line 1278  else Line 1282  else
1282  fi  fi
1283    
1284  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
1285  if test -x tr_cmpnum ; then  if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then
1286      echo "skipping comparison code build"      echo "skipping comparison code build"
1287  else  else
1288      createcodelet      createcodelet
# Line 1294  fi Line 1298  fi
1298  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
1299  CMDLINE=$0  CMDLINE=$0
1300  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
1301      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else
1302                          else CMDLINE="$CMDLINE '$xx'" ; fi        nb=`echo $xx | grep -c '='`
1303          if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'"
1304          else yy=`echo "$xx'" | sed "s/=/='/"` ;
1305                                 CMDLINE="$CMDLINE $yy" ; fi
1306        fi
1307  done  done
1308  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done
1309  MACH=`hostname`  MACH=`hostname`
# Line 1342  if test "x$OPTFILE" != xNONE ; then Line 1350  if test "x$OPTFILE" != xNONE ; then
1350          echo >> $SUMMARY          echo >> $SUMMARY
1351          echo "  OPTFILE=$OPTFILE" >> $SUMMARY          echo "  OPTFILE=$OPTFILE" >> $SUMMARY
1352      else      else
1353          echo | tee $SUMMARY          echo | tee -a $SUMMARY
1354          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY
1355          exit 1          exit 1
1356      fi      fi
1357  else  else
# Line 1370  if test $KIND = 0 ; then Line 1378  if test $KIND = 0 ; then
1378  else  else
1379      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`
1380    if test $KIND = 1 ; then    if test $KIND = 1 ; then
1381      echo "TANGLIN=true" >> $SUMMARY     #echo "TANGLIN=true" >> $SUMMARY
1382        echo "TangLin generated by TAF" >> $SUMMARY
1383      elif test $KIND = 3 ; then
1384        echo "TangLin generated by OpenAD" >> $SUMMARY
1385      elif test $KIND = 2 ; then
1386       #echo "ADJOINT=true" >> $SUMMARY
1387        echo "Adjoint generated by TAF" >> $SUMMARY
1388      else
1389        echo "Adjoint generated by OpenAD" >> $SUMMARY
1390      fi
1391      if test $KIND = 1 -o $KIND = 3 ; then
1392      line_1="G D M    C  T  F"      line_1="G D M    C  T  F"
1393      line_2="e p a R  o  L  D"      line_2="e p a R  o  L  D"
1394    else    else
     echo "ADJOINT=true" >> $SUMMARY  
1395      line_1="G D M    C  A  F"      line_1="G D M    C  A  F"
1396      line_2="e p a R  o  d  D"      line_2="e p a R  o  d  D"
1397    fi    fi
# Line 1382  else Line 1399  else
1399      line_4="2 d e n  t  r  r"      line_4="2 d e n  t  r  r"
1400      echo >> $SUMMARY      echo >> $SUMMARY
1401  fi  fi
1402    if test "x$CLEANUP" != xt ; then
1403      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1404      echo "$line_1" | tee -a $SUMMARY      echo "$line_1" | tee -a $SUMMARY
1405      echo "$line_2" | tee -a $SUMMARY      echo "$line_2" | tee -a $SUMMARY
1406      echo "$line_3" | tee -a $SUMMARY      echo "$line_3" | tee -a $SUMMARY
1407      echo "$line_4" | tee -a $SUMMARY      echo "$line_4" | tee -a $SUMMARY
1408      echo ""        | tee -a $SUMMARY      echo ""        | tee -a $SUMMARY
1409    fi
1410  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
1411    
1412  #  ...and each test directory...  #  ...and each test directory...
# Line 1597  for dir in $TESTDIRS ; do Line 1616  for dir in $TESTDIRS ; do
1616              fi              fi
1617          done          done
1618    
1619      if test -f $DRESULTS"/"genmake_state ; then : ; else      if test ! -f $DRESULTS"/"genmake_state ; then
1620          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1621              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/^# //'`
1622              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 1625  for dir in $TESTDIRS ; do
1625              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1626                  eval $mkOpt                  eval $mkOpt
1627                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\
1628                          $SUMMARY > tr_0.tmp_log                          $SUMMARY > tmp.tr_log
1629                  RETVAL=$?                  RETVAL=$?
1630                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY
1631                          cp tr_0.tmp_log $SUMMARY                          cp tmp.tr_log $SUMMARY
1632                  else rm -f tr_0.tmp_log                  else rm -f tmp.tr_log
1633                  fi                  fi
1634              fi              fi
1635              gmkLog=$dir/$builddir/genmake.log              gmkLog=$dir/$builddir/genmake.log
1636              grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1              if test -r $gmkLog ; then
1637              RETVAL=$?                  grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
1638              if test "x$RETVAL" = x0 ; then                  RETVAL=$?
1639                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  if test "x$RETVAL" = x0 ; then
1640                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1641                          | grep -v '^... compiler version ' > tr_1.tmp_log                    echo "extract compiler version:"   >> $DRESULTS/genmake_state
1642                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state                    sed -n '/Get compiler version/,/<-- compiler version/p' \
1643                  sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                       $gmkLog | grep -v '^... compiler version ' > tmp.tr_log
1644                          >> $DRESULTS/genmake_state                    sed -n '1p' tmp.tr_log >> $DRESULTS/genmake_state
1645                  rm -f tr_1.tmp_log                    sed -n '2,/^$/p' tmp.tr_log | sed '/^$/d' | sed 's/^./ &/' \
1646                                             >> $DRESULTS/genmake_state
1647                      rm -f tmp.tr_log
1648                    fi
1649                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1650                    echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state
1651                    sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state
1652                    sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state
1653              fi              fi
1654          fi          fi
1655      fi      fi
# Line 1685  fi Line 1711  fi
1711  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then
1712      rm -rf $DRESULTS      rm -rf $DRESULTS
1713  fi  fi
1714    echo "======== End of testreport execution ========"

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

  ViewVC Help
Powered by ViewVC 1.1.22