/[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.100 by jmc, Mon Sep 17 15:35:46 2007 UTC revision 1.104 by jmc, Tue Oct 2 14:24:42 2007 UTC
# Line 189  dashnum() Line 189  dashnum()
189      done      done
190  }  }
191    
 testoutput_ad()  
 {  
     grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $5}' > t05.txt  
     grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $5}' > t15.txt  
     grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $6}' > t06.txt  
     grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $6}' > t16.txt  
     join t05.txt t15.txt > t5.txt  
     join t06.txt t16.txt > t6.txt  
     echo "-1" >> t5.txt  
     echo "-1" >> t6.txt  
     digits_5=`./tr_cmpnum < t5.txt`  
     digits_6=`./tr_cmpnum < t6.txt`  
     dashnum $digits_5 $digits_6  
     rm -f t[01][56].txt t[56].txt  
 }  
   
192  check_for_add_mon_output()  check_for_add_mon_output()
193  {  {
194      # Check for additional types of monitor output      # Check for additional types of monitor output
# Line 235  testoutput_run() Line 219  testoutput_run()
219      # testoutput_run directory subdir reference_output      # testoutput_run directory subdir reference_output
220      #      #
221      #  test output from 1 run in "directory"      #  test output from 1 run in "directory"
222  #   if test "x$ADM" = x ; then  # --> same processing for adjoint & forward test
223          # default list of output variables to be checked:          # default list of output variables to be checked:
224          #  1rst : main variable used to decide if it pass or FAIL          #  1rst : main variable used to decide if it pass or FAIL
225          #  others : number of matching digits to be printed in summary.txt          #  others : number of matching digits to be printed in summary.txt
# Line 270  testoutput_run() Line 254  testoutput_run()
254                    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
255                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?
256                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;
257             'Cost') testoutput_var $1 "ADM  precision_derivative_cost" "ADM Cost" $2 $3; yy=$? ;;            'Cost') testoutput_var $1 "ADM  precision_derivative_cost" "ADM Cost" $2 $3; yy=$? ;;
258             'Grad') testoutput_var $1 "ADM  precision_derivative_grad" "ADM Grad" $2 $3; yy=$? ;;            'Grad') testoutput_var $1 "ADM  precision_derivative_grad" "ADM Grad" $2 $3; yy=$? ;;
259             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;
260             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;
261             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;
# Line 296  testoutput_run() Line 280  testoutput_run()
280             testoutput_var $1 "trcstat_ptracer0"$ii"_mean" "p0"$ii"_mean" $2 $3; yy=$? ;;             testoutput_var $1 "trcstat_ptracer0"$ii"_mean" "p0"$ii"_mean" $2 $3; yy=$? ;;
281          'pt1sd'|'pt2sd'|'pt3sd'|'pt4sd'|'pt5sd') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`          'pt1sd'|'pt2sd'|'pt3sd'|'pt4sd'|'pt5sd') ii=`echo $xx | sed 's/pt//' | sed 's/..$//'`
282             testoutput_var $1 "trcstat_ptracer0"$ii"_sd"   "p0"$ii"_StDv"  $2 $3; yy=$? ;;             testoutput_var $1 "trcstat_ptracer0"$ii"_sd"   "p0"$ii"_StDv"  $2 $3; yy=$? ;;
283             'Qntmn') testoutput_var $1 "extforcing_qnet_min" "Qnet minimum"  $2 $3; yy=$? ;;
284             'Qntmx') testoutput_var $1 "extforcing_qnet_max" "Qnet maximum"  $2 $3; yy=$? ;;
285             'Qntav') testoutput_var $1 "extforcing_qnet_mean" "Qnet mean"    $2 $3; yy=$? ;;
286             'Qntsd') testoutput_var $1 "extforcing_qnet_sd"  "Qnet Std.Dev"  $2 $3; yy=$? ;;
287             'aSImn') testoutput_var $1 "seaice_area_min"   "SIce Area min"   $2 $3; yy=$? ;;
288             'aSImx') testoutput_var $1 "seaice_area_max"   "SIce Area max"   $2 $3; yy=$? ;;
289             'aSIav') testoutput_var $1 "seaice_area_mean"  "SIce Area mean"  $2 $3; yy=$? ;;
290             'aSIsd') testoutput_var $1 "seaice_area_sd"    "SIce Area StDv"  $2 $3; yy=$? ;;
291             'hSImn') testoutput_var $1 "seaice_heff_min"   "SIce Heff min"   $2 $3; yy=$? ;;
292             'hSImx') testoutput_var $1 "seaice_heff_max"   "SIce Hell max"   $2 $3; yy=$? ;;
293             'hSIav') testoutput_var $1 "seaice_heff_mean"  "SIce Hell mean"  $2 $3; yy=$? ;;
294             'hSIsd') testoutput_var $1 "seaice_heff_sd"    "SIce Hell StDv"  $2 $3; yy=$? ;;
295            'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $3; yy=$? ;;
296            'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South"  $2 $3; yy=$? ;;
297            'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North"  $2 $3; yy=$? ;;
298            'HthSiG') testoutput_var $1 "thSI_IceH_ave_G" "thSIc H Global"    $2 $3; yy=$? ;;
299            'HthSiS') testoutput_var $1 "thSI_IceH_ave_S" "thSIc H South"     $2 $3; yy=$? ;;
300            'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North"     $2 $3; yy=$? ;;
301                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;                *) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;;
302            esac            esac
303            if test $xx = $sVar            if test $xx = $sVar
# Line 312  testoutput_run() Line 314  testoutput_run()
314          else          else
315            echo $allargs            echo $allargs
316          fi          fi
317    # <-- same processing for adjoint & forward test
 #   else  
 #       testoutput_ad $1 $2 "precision_grdchk_result"  
 #   fi  
318  }  }
319    
320  genmakemodel()  genmakemodel()
# Line 911  else Line 910  else
910  fi  fi
911    
912  if test "x$TESTDIRS" = x ; then  if test "x$TESTDIRS" = x ; then
913  #   if test "x$ADM" = xt ; then      LIST=`scandirs results/$ref_outp`
 #       LIST=`scandirs results_ad/$ref_outp`  
 #   else  
         LIST=`scandirs results/$ref_outp`  
 #   fi  
914  else  else
915      #- expand group of experiments:      #- expand group of experiments:
916      LIST=" "      LIST=" "
# Line 967  if test "x$MPI" = xt ; then Line 962  if test "x$MPI" = xt ; then
962      OUTPUTFILE="STDOUT.0000"      OUTPUTFILE="STDOUT.0000"
963  fi  fi
964    
 #echo "OK"  
965  echo "OK (COMMAND= $COMMAND )"  echo "OK (COMMAND= $COMMAND )"
966    
967  # set the Default List of output variables to be checked:  # set the Default List of output variables to be checked:
# Line 981  if test "x$ADM" = x ; then Line 975  if test "x$ADM" = x ; then
975      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`
976      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`
977  else  else
978      DEF_CHECK_LIST='Cost Cost Grad'      DEF_CHECK_LIST='Grad Cost Grad'
979      EMPTY_RESULTS='.. ..'      EMPTY_RESULTS='.. ..'
980      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`
981  fi  fi
# Line 1078  else Line 1072  else
1072      echo "ADJOINT=true" >> $SUMMARY      echo "ADJOINT=true" >> $SUMMARY
1073      echo >> $SUMMARY      echo >> $SUMMARY
1074      if [ $MATCH_CRIT -lt 10 ] ;      if [ $MATCH_CRIT -lt 10 ] ;
1075      then line_0="default  "$MATCH_CRIT ;      then line_0="default     "$MATCH_CRIT ;
1076      else line_0="default "$MATCH_CRIT ; fi      else line_0="default    "$MATCH_CRIT ; fi
1077      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1078      cat << EOF | tee -a $SUMMARY      cat << EOF | tee -a $SUMMARY
1079  G D M    C  G  G D M    C  G
# Line 1112  for dir in $TESTDIRS ; do Line 1106  for dir in $TESTDIRS ; do
1106    
1107      #  Verify that the testdir exists and contains previous      #  Verify that the testdir exists and contains previous
1108      #  results in the correct location--or skip this directory!      #  results in the correct location--or skip this directory!
1109      fout=      fout=$dir"/results/"$ref_outp
     if test "x$ADM" = x ; then  
         fout=$dir"/results/"$ref_outp  
     else  
         fout=$dir"/results_ad/"$ref_outp  
     fi  
1110      if test ! -r $fout ; then      if test ! -r $fout ; then
1111          echo "can't read \"$fout\" -- skipping $dir"          echo "can't read \"$fout\" -- skipping $dir"
1112          continue          continue
# Line 1200  for dir in $TESTDIRS ; do Line 1189  for dir in $TESTDIRS ; do
1189      fi      fi
1190            
1191      echo      echo
1192  #   if test "x$ADM" = x ; then  # --> same processing for adjoint & forward test
1193          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1194          echo          echo
1195          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
# Line 1237  for dir in $TESTDIRS ; do Line 1226  for dir in $TESTDIRS ; do
1226                  run_clean $dir/tr_run.$ex                  run_clean $dir/tr_run.$ex
1227              fi              fi
1228          done          done
1229  #   else  # <-- same processing for adjoint & forward test
 #       fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`  
 #       fres=$fres"$results   $dir"  
 #       echo  
 #       echo "$fres" >> $SUMMARY  
 #       touch $CDIR"/summary.txt"  
 #       echo "fresults='$fres'" >> $CDIR"/summary.txt"  
 #       echo "MACH='$MACH'" >> $CDIR"/summary.txt"  
 #       echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"  
 #       echo "DATE='$DATE'" >> $CDIR"/summary.txt"  
 #       echo "tdir='$dir'" >> $CDIR"/summary.txt"  
 #   fi  
1230      if test "x$ADM" = xt ; then      if test "x$ADM" = xt ; then
1231          grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \          grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \
1232                             >> $CDIR"/summary.txt"                             >> $CDIR"/summary.txt"
# Line 1299  fi Line 1277  fi
1277  rm -f tr_cmpnum.c tr_cmpnum  rm -f tr_cmpnum.c tr_cmpnum
1278    
1279  if test "x$CLEANUP" != xt ; then  if test "x$CLEANUP" != xt ; then
1280      cat $SUMMARY | sed 's/  \.  \.  \.  \.  \.  \.  \.  \.  \.  \.  \.  \.//'      cat $SUMMARY | sed 's/ \.  \.  \.  \.  \.  \.  \.  \.  \.  \.  \.  \. //'
1281      if test -e tr_out.txt ; then      if test -e tr_out.txt ; then
1282          mv tr_out.txt tr_out.txt.old          mv tr_out.txt tr_out.txt.old
1283      fi      fi
1284      cat $SUMMARY | sed '/^[YN] [YN] [YN] [YN]/ s/  \.//g' > tr_out.txt      cat $SUMMARY | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' > tr_out.txt
1285  fi  fi
1286    
1287  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.104

  ViewVC Help
Powered by ViewVC 1.1.22