/[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.188 by jmc, Fri Jul 19 18:49:33 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`
547              nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log`          nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log`
548              echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \          if test -f taf_output ; then
549                n2er=`grep -c 'TAF *.* ERROR ' taf_output`
550                nerr=`expr $nerr + $n2er`
551            fi
552            echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \
553                                  >> $CDIR"/summary.txt"                                  >> $CDIR"/summary.txt"
554      fi      fi
555      if test $mk_fail != 0 ; then return $mk_fail ; fi      if test $mk_fail != 0 ; then return $mk_fail ; fi
# Line 785  runmodel() Line 796  runmodel()
796              # output do not exist or is older than executable:              # output do not exist or is older than executable:
797              rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG              rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG
798              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
799            #- Divided Adjoint Run:
800            #  get the number of additional runs (add_DIVA_runs) from file "run_ADM_DIVA"
801                if test $KIND = 2 -a -f run_ADM_DIVA ; then
802                  adm_diva_nb=`sed -n '/^ *add_DIVA_runs\>.*=/p' run_ADM_DIVA | sed 's/ //g'`
803                  echo " Divided Adjoint Run: $adm_diva_nb" >> $RUNLOG
804                  eval "let $adm_diva_nb"
805                  if [ $add_DIVA_runs -ge 1 ] ; then
806                    rm -f costf* divided.ctrl snapshot*
807                    echo -n "(add_DIVA_runs=$add_DIVA_runs) ... "
808                    for ii in `seq 1 $add_DIVA_runs` ; do
809                      ( eval $COMMAND ) >> $RUNLOG 2>&1
810                      echo " additional DIVA run # $ii : done" >> $RUNLOG
811                      mv -f $OUTPUTFILE ${OUTPUTFILE}.diva_${ii}
812                    done
813                  fi
814                fi
815            #- special DIVA processing ends here
816              ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
817              RETVAL=$?              RETVAL=$?
818              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`
# Line 802  runmodel() Line 830  runmodel()
830            fi            fi
831          fi          fi
832          rm -f run.log_tmp          rm -f run.log_tmp
833          #- in all cases where OutputFile exists, report SIZE (and AD time)          #- in all cases where OutputFile exists, report SIZE and time
834          if test -f $OUTPUTFILE ; then          if test -f $OUTPUTFILE ; then
835            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \            grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
836                  | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
837            if test $KIND = 2 ; then            grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
838              grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"                  | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
           fi  
839          fi          fi
840          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
841          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
# Line 910  formatresults() Line 937  formatresults()
937          fi          fi
938      fi      fi
939      printf '  %s' $nm      printf '  %s' $nm
940        if test $KIND = 2 ; then
941            #-- apppend taf repport summary:
942            tafrep=`grep -c '^ TAF reports ' $CDIR/summary.txt`
943            if test $tafrep = 1 ; then
944                grep '^ TAF reports ' $CDIR/summary.txt | awk '{printf "  (e=%i, w=%i)",$3,$6}'
945            fi
946        fi
947      printf '\n'      printf '\n'
948    
949  }  }
# Line 1278  else Line 1312  else
1312  fi  fi
1313    
1314  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
1315  if test -x tr_cmpnum ; then  if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then
1316      echo "skipping comparison code build"      echo "skipping comparison code build"
1317  else  else
1318      createcodelet      createcodelet
# Line 1294  fi Line 1328  fi
1328  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
1329  CMDLINE=$0  CMDLINE=$0
1330  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
1331      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"      if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else
1332                          else CMDLINE="$CMDLINE '$xx'" ; fi        nb=`echo $xx | grep -c '='`
1333          if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'"
1334          else yy=`echo "$xx'" | sed "s/=/='/"` ;
1335                                 CMDLINE="$CMDLINE $yy" ; fi
1336        fi
1337  done  done
1338  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done  #for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done
1339  MACH=`hostname`  MACH=`hostname`
# Line 1342  if test "x$OPTFILE" != xNONE ; then Line 1380  if test "x$OPTFILE" != xNONE ; then
1380          echo >> $SUMMARY          echo >> $SUMMARY
1381          echo "  OPTFILE=$OPTFILE" >> $SUMMARY          echo "  OPTFILE=$OPTFILE" >> $SUMMARY
1382      else      else
1383          echo | tee $SUMMARY          echo | tee -a $SUMMARY
1384          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY          echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY
1385          exit 1          exit 1
1386      fi      fi
1387  else  else
# Line 1370  if test $KIND = 0 ; then Line 1408  if test $KIND = 0 ; then
1408  else  else
1409      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`      line_0=`printf '%s %2i' 'default   ' $MATCH_CRIT`
1410    if test $KIND = 1 ; then    if test $KIND = 1 ; then
1411      echo "TANGLIN=true" >> $SUMMARY     #echo "TANGLIN=true" >> $SUMMARY
1412        echo "TangLin generated by TAF" >> $SUMMARY
1413      elif test $KIND = 3 ; then
1414        echo "TangLin generated by OpenAD" >> $SUMMARY
1415      elif test $KIND = 2 ; then
1416       #echo "ADJOINT=true" >> $SUMMARY
1417        echo "Adjoint generated by TAF" >> $SUMMARY
1418      else
1419        echo "Adjoint generated by OpenAD" >> $SUMMARY
1420      fi
1421      if test $KIND = 1 -o $KIND = 3 ; then
1422      line_1="G D M    C  T  F"      line_1="G D M    C  T  F"
1423      line_2="e p a R  o  L  D"      line_2="e p a R  o  L  D"
1424    else    else
     echo "ADJOINT=true" >> $SUMMARY  
1425      line_1="G D M    C  A  F"      line_1="G D M    C  A  F"
1426      line_2="e p a R  o  d  D"      line_2="e p a R  o  d  D"
1427    fi    fi
# Line 1382  else Line 1429  else
1429      line_4="2 d e n  t  r  r"      line_4="2 d e n  t  r  r"
1430      echo >> $SUMMARY      echo >> $SUMMARY
1431  fi  fi
1432    if test "x$CLEANUP" != xt ; then
1433      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1434      echo "$line_1" | tee -a $SUMMARY      echo "$line_1" | tee -a $SUMMARY
1435      echo "$line_2" | tee -a $SUMMARY      echo "$line_2" | tee -a $SUMMARY
1436      echo "$line_3" | tee -a $SUMMARY      echo "$line_3" | tee -a $SUMMARY
1437      echo "$line_4" | tee -a $SUMMARY      echo "$line_4" | tee -a $SUMMARY
1438      echo ""        | tee -a $SUMMARY      echo ""        | tee -a $SUMMARY
1439    fi
1440  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
1441    
1442  #  ...and each test directory...  #  ...and each test directory...
# Line 1496  for dir in $TESTDIRS ; do Line 1545  for dir in $TESTDIRS ; do
1545      #  Check whether there are "extra runs" for this testdir      #  Check whether there are "extra runs" for this testdir
1546      extra_runs=      extra_runs=
1547      if test "x$NORUN" = xf ; then      if test "x$NORUN" = xf ; then
1548          ex_run_dirs=`( cd $dir ; echo $inputdir.* )`          ex_run_dirs=`( cd $dir ; ls -d $inputdir.* 2> /dev/null )`
1549      fi      fi
1550      #echo "ex_run_dirs='$ex_run_dirs'"      #echo "ex_run_dirs='$ex_run_dirs'"
1551      for exd in $ex_run_dirs ; do      for exd in $ex_run_dirs ; do
1552          name=`echo $exd | sed -e "s/$inputdir\.//"`          name=`echo $exd | sed -e "s/$inputdir\.//"`
1553          refExOut=`echo $ref_outp | sed "s/\./.${name}./"`          refExOut=`echo $ref_outp | sed "s/\./.${name}./"`
1554          outf="$dir/results/$refExOut"          outf="$dir/results/$refExOut"
         #if test -f $outf -a -r $outf ; then  
1555          if test -r $outf -o -r ${outf}.gz ; then          if test -r $outf -o -r ${outf}.gz ; then
1556            if test "x$MULTI_THREAD" = "xt" ; then            if test "x$MULTI_THREAD" = "xt" ; then
1557              if test -r $dir"/"$exd"/eedata.mth" ; then              if test -r $dir"/"$exd"/eedata.mth" ; then
# Line 1587  for dir in $TESTDIRS ; do Line 1635  for dir in $TESTDIRS ; do
1635              linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir              linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir
1636              runmodel $dir/$pfxdir.$ex && run=Y \              runmodel $dir/$pfxdir.$ex && run=Y \
1637              && results=`testoutput_run $dir $pfxdir.$ex $refExOut`              && results=`testoutput_run $dir $pfxdir.$ex $refExOut`
1638              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir.$ex ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
             fres="$fres.$ex"  
1639              echo 1>&2              echo 1>&2
1640              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
1641              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
# Line 1597  for dir in $TESTDIRS ; do Line 1644  for dir in $TESTDIRS ; do
1644              fi              fi
1645          done          done
1646    
1647      if test -f $DRESULTS"/"genmake_state ; then : ; else      if test ! -f $DRESULTS"/"genmake_state ; then
1648          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1649              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/^# //'`
1650              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 1653  for dir in $TESTDIRS ; do
1653              if test "x$OPTFILE" = xNONE ; then              if test "x$OPTFILE" = xNONE ; then
1654                  eval $mkOpt                  eval $mkOpt
1655                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\                  sed "/^No \"OPTFILE\" was specified ; genmake2/a\  OPTFILE=${OPTFILE}"\
1656                          $SUMMARY > tr_0.tmp_log                          $SUMMARY > tmp.tr_log
1657                  RETVAL=$?                  RETVAL=$?
1658                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY                  if test "x$RETVAL" = x0 ; then rm -f $SUMMARY
1659                          cp tr_0.tmp_log $SUMMARY                          cp tmp.tr_log $SUMMARY
1660                  else rm -f tr_0.tmp_log                  else rm -f tmp.tr_log
1661                  fi                  fi
1662              fi              fi
1663              gmkLog=$dir/$builddir/genmake.log              gmkLog=$dir/$builddir/genmake.log
1664              grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1              if test -r $gmkLog ; then
1665              RETVAL=$?                  grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
1666              if test "x$RETVAL" = x0 ; then                  RETVAL=$?
1667                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  if test "x$RETVAL" = x0 ; then
1668                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1669                          | grep -v '^... compiler version ' > tr_1.tmp_log                    echo "extract compiler version:"   >> $DRESULTS/genmake_state
1670                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state                    sed -n '/Get compiler version/,/<-- compiler version/p' \
1671                  sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                       $gmkLog | grep -v '^... compiler version ' > tmp.tr_log
1672                          >> $DRESULTS/genmake_state                    sed -n '1p' tmp.tr_log >> $DRESULTS/genmake_state
1673                  rm -f tr_1.tmp_log                    sed -n '2,/^$/p' tmp.tr_log | sed '/^$/d' | sed 's/^./ &/' \
1674                                             >> $DRESULTS/genmake_state
1675                      rm -f tmp.tr_log
1676                    fi
1677                    echo -n "from '$gmkLog', " >> $DRESULTS/genmake_state
1678                    echo "get NETCDF & LAPACK settings:" >> $DRESULTS/genmake_state
1679                    sed -n '/set HAVE_NETCDF=/p' $gmkLog >> $DRESULTS/genmake_state
1680                    sed -n '/set HAVE_LAPACK=/p' $gmkLog >> $DRESULTS/genmake_state
1681              fi              fi
1682          fi          fi
1683      fi      fi
# Line 1685  fi Line 1739  fi
1739  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then
1740      rm -rf $DRESULTS      rm -rf $DRESULTS
1741  fi  fi
1742    echo "======== End of testreport execution ========"

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

  ViewVC Help
Powered by ViewVC 1.1.22