/[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.180 by jmc, Tue Sep 4 19:27:52 2012 UTC
# Line 534  makemodel() Line 534  makemodel()
534              mk_fail=2              mk_fail=2
535          fi          fi
536      fi      fi
537        if test $KIND = 1 -a -f taf_ftl.log ; then
538                head -1 taf_ftl.log >> $CDIR"/summary.txt"
539        fi
540      if test $KIND = 2 -a -f taf_ad.log ; then      if test $KIND = 2 -a -f taf_ad.log ; then
541              head -1 taf_ad.log >> $CDIR"/summary.txt"              head -1 taf_ad.log >> $CDIR"/summary.txt"
542              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`              nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`
# Line 802  runmodel() Line 805  runmodel()
805            fi            fi
806          fi          fi
807          rm -f run.log_tmp          rm -f run.log_tmp
808          #- in all cases where OutputFile exists, report SIZE (and AD time)          #- in all cases where OutputFile exists, report SIZE and time
809          if test -f $OUTPUTFILE ; then          if test -f $OUTPUTFILE ; then
810            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
811                  | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
812            if test $KIND = 2 ; then            grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
813              grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
           fi  
814          fi          fi
815          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
816          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
# Line 1278  else Line 1280  else
1280  fi  fi
1281    
1282  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
1283  if test -x tr_cmpnum ; then  if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then
1284      echo "skipping comparison code build"      echo "skipping comparison code build"
1285  else  else
1286      createcodelet      createcodelet
# Line 1294  fi Line 1296  fi
1296  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
1297  CMDLINE=$0  CMDLINE=$0
1298  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
1299      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else
1300                          else CMDLINE="$CMDLINE '$xx'" ; fi        nb=`echo $xx | grep -c '='`
1301          if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'"
1302          else yy=`echo "$xx'" | sed "s/=/='/"` ;
1303                                 CMDLINE="$CMDLINE $yy" ; fi
1304        fi
1305  done  done
1306  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done
1307  MACH=`hostname`  MACH=`hostname`
# Line 1342  if test "x$OPTFILE" != xNONE ; then Line 1348  if test "x$OPTFILE" != xNONE ; then
1348          echo >> $SUMMARY          echo >> $SUMMARY
1349          echo "  OPTFILE=$OPTFILE" >> $SUMMARY          echo "  OPTFILE=$OPTFILE" >> $SUMMARY
1350      else      else
1351          echo | tee $SUMMARY          echo | tee -a $SUMMARY
1352          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY
1353          exit 1          exit 1
1354      fi      fi
1355  else  else
# Line 1382  else Line 1388  else
1388      line_4="2 d e n  t  r  r"      line_4="2 d e n  t  r  r"
1389      echo >> $SUMMARY      echo >> $SUMMARY
1390  fi  fi
1391    if test "x$CLEANUP" != xt ; then
1392      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1393      echo "$line_1" | tee -a $SUMMARY      echo "$line_1" | tee -a $SUMMARY
1394      echo "$line_2" | tee -a $SUMMARY      echo "$line_2" | tee -a $SUMMARY
1395      echo "$line_3" | tee -a $SUMMARY      echo "$line_3" | tee -a $SUMMARY
1396      echo "$line_4" | tee -a $SUMMARY      echo "$line_4" | tee -a $SUMMARY
1397      echo ""        | tee -a $SUMMARY      echo ""        | tee -a $SUMMARY
1398    fi
1399  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
1400    
1401  #  ...and each test directory...  #  ...and each test directory...
# Line 1597  for dir in $TESTDIRS ; do Line 1605  for dir in $TESTDIRS ; do
1605              fi              fi
1606          done          done
1607    
1608      if test -f $DRESULTS"/"genmake_state ; then : ; else      if test ! -f $DRESULTS"/"genmake_state ; then
1609          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1610              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/^# //'`
1611              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 1614  for dir in $TESTDIRS ; do
1614              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1615                  eval $mkOpt                  eval $mkOpt
1616                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\
1617                          $SUMMARY > tr_0.tmp_log                          $SUMMARY > tmp.tr_log
1618                  RETVAL=$?                  RETVAL=$?
1619                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY
1620                          cp tr_0.tmp_log $SUMMARY                          cp tmp.tr_log $SUMMARY
1621                  else rm -f tr_0.tmp_log                  else rm -f tmp.tr_log
1622                  fi                  fi
1623              fi              fi
1624              gmkLog=$dir/$builddir/genmake.log              gmkLog=$dir/$builddir/genmake.log
1625              grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1              if test -r $gmkLog ; then
1626              RETVAL=$?                  grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
1627              if test "x$RETVAL" = x0 ; then                  RETVAL=$?
1628                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  if test "x$RETVAL" = x0 ; then
1629                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1630                          | grep -v '^... compiler version ' > tr_1.tmp_log                    echo "extract compiler version:"   >> $DRESULTS/genmake_state
1631                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state                    sed -n '/Get compiler version/,/<-- compiler version/p' \
1632                  sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                       $gmkLog | grep -v '^... compiler version ' > tmp.tr_log
1633                          >> $DRESULTS/genmake_state                    sed -n '1p' tmp.tr_log >> $DRESULTS/genmake_state
1634                  rm -f tr_1.tmp_log                    sed -n '2,/^$/p' tmp.tr_log | sed '/^$/d' | sed 's/^./ &/' \
1635                                             >> $DRESULTS/genmake_state
1636                      rm -f tmp.tr_log
1637                    fi
1638                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1639                    echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state
1640                    sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state
1641                    sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state
1642              fi              fi
1643          fi          fi
1644      fi      fi
# Line 1685  fi Line 1700  fi
1700  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then
1701      rm -rf $DRESULTS      rm -rf $DRESULTS
1702  fi  fi
1703    echo "======== End of testreport execution ========"

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

  ViewVC Help
Powered by ViewVC 1.1.22