/[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.106 by jmc, Tue Oct 23 19:36:15 2007 UTC revision 1.109 by jmc, Thu Dec 13 18:28:41 2007 UTC
# Line 15  usage() Line 15  usage()
15      echo "  (-mpi)                   compile and run using MPI"      echo "  (-mpi)                   compile and run using MPI"
16      echo "  (-ieee|-noieee)          if possible, use IEEE compiler flags"      echo "  (-ieee|-noieee)          if possible, use IEEE compiler flags"
17      echo "                             (DEF=\"-ieee\")"      echo "                             (DEF=\"-ieee\")"
18        echo "  (-gsl)                   compile with \"-gsl\" flag"
19      echo "  (-of=|-optfile=)STRING   list of optfiles to use"      echo "  (-of=|-optfile=)STRING   list of optfiles to use"
20      echo "  (-a|-addr) STRING        list of email recipients"      echo "  (-a|-addr) STRING        list of email recipients"
21      echo "                             (DEF=\"edhill@mitgcm.org\")"      echo "                             (DEF=\"\" no email is sent)"
22      echo "  (-t|-tdir) STRING        list of group and/or exp. dirs to test"      echo "  (-t|-tdir) STRING        list of group and/or exp. dirs to test"
23      echo "                             (recognized groups: basic, tutorials)"      echo "                             (recognized groups: basic, tutorials)"
24      echo "                             (DEF=\"\" which test all)"      echo "                             (DEF=\"\" which test all)"
# Line 174  testoutput_var() Line 175  testoutput_var()
175      return $digits_of_similarity      return $digits_of_similarity
176  }  }
177    
 dashnum()  
 {  
     # dashnum n1 n2 n3 ...  
     #  
     #  print numbers using %3i format or "--" if number = 99  
   
     for num in $@ ; do  
         if [ $num = 99 ]; then  
             printf ' --'  
         else  
             printf '%3i' $num  
         fi  
     done  
 }  
   
178  check_for_add_mon_output()  check_for_add_mon_output()
179  {  {
180      # Check for additional types of monitor output      # Check for additional types of monitor output
# Line 342  genmakemodel() Line 328  genmakemodel()
328              if test "x$IEEE" != x ; then              if test "x$IEEE" != x ; then
329                  command="$command -ieee"                  command="$command -ieee"
330              fi              fi
331                if test "x$GSL" = xt ; then
332                    command="$command -gsl"
333                fi
334              if test "x$MPI" = xt ; then              if test "x$MPI" = xt ; then
335                  command="$command -mpi"                  command="$command -mpi"
336              fi              fi
# Line 414  run_clean() Line 403  run_clean()
403              find . -type l -exec rm {} \;              find . -type l -exec rm {} \;
404              rm -f $EXECUTABLE *.txt STD* *diagnostics.log datetime              rm -f $EXECUTABLE *.txt STD* *diagnostics.log datetime
405              rm -rf mnc_test_*              rm -rf mnc_test_*
406                rm -f *_MIT_CE_000.opt0000 costfunction*0000
407              echo successful 1>&2              echo successful 1>&2
408              exit 0              exit 0
409          )          )
# Line 542  linkdata() Line 532  linkdata()
532                      if test -h eedata ; then rm -f eedata ; fi                      if test -h eedata ; then rm -f eedata ; fi
533                  fi                  fi
534              fi              fi
535                prevDir='NONE'
536              for ldir in $* ; do              for ldir in $* ; do
537                  if test -d "../"$ldir ; then                  if test -d "../"$ldir -a $ldir != $prevDir ; then
538                      printf 'ldir='${ldir} 1>&2                      printf 'ldir='${ldir} 1>&2
539                      files=`( cd "../"$ldir ; ls -1 | grep -v CVS )`                      files=`( cd "../"$ldir ; ls -1 | grep -v CVS )`
540                      for i in $files ; do                      for i in $files ; do
# Line 559  linkdata() Line 550  linkdata()
550                      fi                      fi
551                      printf ' ; ' 1>&2                      printf ' ; ' 1>&2
552                  fi                  fi
553                    prevDir=$ldir
554              done              done
555          )          )
556      fi      fi
# Line 730  scandirs() Line 722  scandirs()
722  debug=0  debug=0
723  verbose=1  verbose=1
724  clean=0  clean=0
 expts=''  
 # ieee=1  
725    
726  IEEE=true  IEEE=true
727  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
728      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
729  fi  fi
730    GSL=f
731    
732  CLEANUP=f  CLEANUP=f
733  QUICK=f  QUICK=f
# Line 867  for ac_option ; do Line 857  for ac_option ; do
857    
858          -ieee) IEEE=true ;;          -ieee) IEEE=true ;;
859          -noieee) IEEE= ;;          -noieee) IEEE= ;;
860            -gsl) GSL=t ;;
861    
862          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
863          -debug) debug=1 ;;          -debug) debug=1 ;;
# Line 903  fi Line 894  fi
894  #- setting for forward or ADM testing  #- setting for forward or ADM testing
895  if test "x$ADM" = xt ; then  if test "x$ADM" = xt ; then
896      code_dir=code_ad      code_dir=code_ad
897      input_dirs='input_ad input'      inputdir=input_ad
898      ref_outp="output_adm.txt"      ref_outp="output_adm.txt"
899      EXECUTABLE="mitgcmuv_ad"      EXECUTABLE="mitgcmuv_ad"
900  else  else
901      code_dir=code      code_dir=code
902      input_dirs='input'      inputdir=input
903      ref_outp="output.txt"      ref_outp="output.txt"
904      EXECUTABLE="mitgcmuv"      EXECUTABLE="mitgcmuv"
905  fi  fi
# Line 1142  for dir in $TESTDIRS ; do Line 1133  for dir in $TESTDIRS ; do
1133    
1134      #  Check whether there are "extra runs" for this testdir      #  Check whether there are "extra runs" for this testdir
1135      extra_runs=      extra_runs=
1136      if test "x$ADM" = x ; then      ex_run_dirs=`( cd $dir ; echo $inputdir.* )`
1137          ex_run_dirs=`( cd $dir ; echo input.* )`      #echo "ex_run_dirs='$ex_run_dirs'"
1138          #echo "ex_run_dirs='$ex_run_dirs'"      for exd in $ex_run_dirs ; do
1139          for exd in $ex_run_dirs ; do          name=`echo $exd | sed -e "s/$inputdir\.//"`
1140              name=`echo $exd | sed -e 's/input.//g'`          refExOut=`echo $ref_outp | sed "s/\./.${name}./"`
1141              outf="$dir/results/output.$name.txt"          outf="$dir/results/$refExOut"
1142              if test -f $outf -a -r $outf ; then          if test -f $outf -a -r $outf ; then
1143                  if test "x$MULTI_THREAD" = "xt" ; then              if test "x$MULTI_THREAD" = "xt" ; then
1144                      if test -r $dir"/"$exd"/eedata.mth" ; then                  if test -r $dir"/"$exd"/eedata.mth" ; then
                         extra_runs="$extra_runs $name"  
                     #else echo $dir"/"$exd"/eedata.mth: not found"  
                     fi  
                 else  
1145                      extra_runs="$extra_runs $name"                      extra_runs="$extra_runs $name"
1146                    #else echo $dir"/"$exd"/eedata.mth: not found"
1147                  fi                  fi
1148                else
1149                    extra_runs="$extra_runs $name"
1150              fi              fi
1151          done          fi
1152      fi      done
1153    
1154      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1155      echo      echo
# Line 1188  for dir in $TESTDIRS ; do Line 1178  for dir in $TESTDIRS ; do
1178              && symlink_mpifiles $dir $code_dir $builddir \              && symlink_mpifiles $dir $code_dir $builddir \
1179              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
1180              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
1181              && linkdata $dir/$rundir $input_dirs \              && linkdata $dir/$rundir $inputdir input \
1182              && runmodel $dir/$rundir && run=Y \              && runmodel $dir/$rundir && run=Y \
1183              && results=`testoutput_run $dir $rundir $ref_outp`              && results=`testoutput_run $dir $rundir $ref_outp`
1184      fi      fi
1185            
1186      echo      echo
 # --> same processing for adjoint & forward test  
1187          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1188          echo          echo
1189          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
# Line 1204  for dir in $TESTDIRS ; do Line 1193  for dir in $TESTDIRS ; do
1193          echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"          echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
1194          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1195          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
1196            if test "x$ADM" = xt ; then
1197                head -1 $dir/$builddir/taf_ad.log >> $CDIR"/summary.txt"
1198                grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \
1199                                    >> $CDIR"/summary.txt"
1200            fi
1201    
1202          for ex in $extra_runs ; do          for ex in $extra_runs ; do
1203              unset run              unset run
# Line 1216  for dir in $TESTDIRS ; do Line 1210  for dir in $TESTDIRS ; do
1210              CDIR=`pwd`"/$rel_CDIR"              CDIR=`pwd`"/$rel_CDIR"
1211              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"
1212              run_clean $dir/tr_run.$ex              run_clean $dir/tr_run.$ex
1213              linkdata $dir/tr_run.$ex input.$ex input              linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir input
1214              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
1215              && results=`testoutput_run $dir tr_run.$ex $refExOut`              && results=`testoutput_run $dir tr_run.$ex $refExOut`
1216              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
# Line 1229  for dir in $TESTDIRS ; do Line 1223  for dir in $TESTDIRS ; do
1223              echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"              echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
1224              echo "DATE='$DATE'" >> $CDIR"/summary.txt"              echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1225              echo "tdir='$dir.$ex'" >> $CDIR"/summary.txt"              echo "tdir='$dir.$ex'" >> $CDIR"/summary.txt"
1226                if test "x$ADM" = xt ; then
1227                    head -1 $dir/$builddir/taf_ad.log >> $CDIR"/summary.txt"
1228                    grep -A3 'Seconds in section "ALL' $dir/tr_run.$ex/$OUTPUTFILE \
1229                                       >> $CDIR"/summary.txt"
1230                fi
1231              if test "x$POSTCLEAN" = xt ; then              if test "x$POSTCLEAN" = xt ; then
1232                  run_clean $dir/tr_run.$ex                  run_clean $dir/tr_run.$ex
1233              fi              fi
1234          done          done
 # <-- same processing for adjoint & forward test  
     if test "x$ADM" = xt ; then  
         head -1 $dir/$builddir/taf_ad.log >> $CDIR"/summary.txt"  
         grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \  
                            >> $CDIR"/summary.txt"  
     fi  
1235    
1236      #postclean $dir/$builddir      #postclean $dir/$builddir
1237      if test "x$POSTCLEAN" = xt ; then      if test "x$POSTCLEAN" = xt ; then

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.109

  ViewVC Help
Powered by ViewVC 1.1.22