/[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.1 by edhill, Wed Aug 27 22:12:31 2003 UTC revision 1.4 by edhill, Wed Sep 3 20:02:47 2003 UTC
# Line 13  usage() Line 13  usage()
13      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""
14      echo "  (-a|-addr)STRING         list of email recipients"      echo "  (-a|-addr)STRING         list of email recipients"
15      echo "  (-t|-tdir)STRING         list of \"test\" dirs"      echo "  (-t|-tdir)STRING         list of \"test\" dirs"
16        echo "  (-b|-bash)STRING         location of \"bash\" executable"
17      echo      echo
18      exit 1      exit 1
19  }  }
# Line 160  testoutput() Line 161  testoutput()
161  genmakemodel()  genmakemodel()
162  {  {
163      # genmakemodel directory      # genmakemodel directory
164      GENMAKE2="../../../tools/genmake2"      GENMAKE2="$BASH ../../../tools/genmake2"
165      (      (
166          cd $1;          cd $1;
167          printf 'genmake ... ' 1>&2          printf 'genmake ... ' 1>&2
# Line 315  EOFA Line 316  EOFA
316          return 0          return 0
317      else      else
318          echo          echo
319          echo "createcodelet: failed to compile codelet" | tee          echo "createcodelet: failed to compile codelet"
320          exit 1          exit 1
321      fi      fi
322  }  }
# Line 388  clean=0 Line 389  clean=0
389  ieee=1  ieee=1
390  expts=''  expts=''
391    
392    BASH=
393  OPTFILES=  OPTFILES=
394  ADDRESSES=edhill@mitgcm.org  ADDRESSES=edhill@mitgcm.org
395  TESTDIRS=  TESTDIRS=
# Line 413  for ac_option ; do Line 415  for ac_option ; do
415          -help | --help | -h | --h)          -help | --help | -h | --h)
416              usage ;;              usage ;;
417                    
418          -optfile | --optfile | -f | --f)          -optfile | --optfile | -of | --of)
419              ac_prev=OPTFILES ;;              ac_prev=OPTFILES ;;
420          -optfile=* | --optfile=*)          -optfile=* | --optfile=* | -of=* | --of=*)
421              OPTFILES=$ac_optarg ;;              OPTFILES=$ac_optarg ;;
422                    
423          -addr | --addr | -a | --a)          -addr | --addr | -a | --a)
# Line 428  for ac_option ; do Line 430  for ac_option ; do
430          -tdir=* | --tdir=*)          -tdir=* | --tdir=*)
431              TESTDIRS=$ac_optarg ;;              TESTDIRS=$ac_optarg ;;
432    
433            -bash | --bash | -b | --b)
434                ac_prev=BASH ;;
435            -bash=* | --bash=*)
436                BASH=$ac_optarg ;;
437    
438          -quick) quick=1 ;;          -quick) quick=1 ;;
439          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
440          -debug) debug=1 ;;          -debug) debug=1 ;;
# Line 463  build_mpack Line 470  build_mpack
470    
471  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
472  MACH=`hostname`  MACH=`hostname`
473    UNAMEA=`uname -a`
474  DATE=`date +%Y%m%d`  DATE=`date +%Y%m%d`
475  BASE=$MACH"_"$DATE"_"  BASE=$MACH"_"$DATE"_"
476  DNUM=0  DNUM=0
# Line 504  for OPTFILE in $OPTFILES ; do Line 512  for OPTFILE in $OPTFILES ; do
512            
513      #  ...and each test directory...      #  ...and each test directory...
514      for dir in $TESTDIRS ; do      for dir in $TESTDIRS ; do
515    
516            #  Verify that the testdir exists and contains previous
517            #  results in the correct location--or skip this directory!
518            if test ! -r $dir"/results/output.txt" ; then
519                echo | tee -a $SUMMARY
520                echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \
521                    | tee -a $SUMMARY
522                continue
523            fi
524                    
525          #  Create an output dir for each OPTFILE/tdir combination          #  Create an output dir for each OPTFILE/tdir combination
526          CDIR=$DRESULTS"/"$NDIR          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR
527          mkdir $CDIR          mkdir $CDIR
528          CDIR=`pwd`"/$CDIR"          CDIR=`pwd`"/$CDIR"
529    
# Line 528  for OPTFILE in $OPTFILES ; do Line 545  for OPTFILE in $OPTFILES ; do
545              builddir=input              builddir=input
546              rundir=input              rundir=input
547          fi          fi
548    
549          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
550              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
551              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
# Line 536  for OPTFILE in $OPTFILES ; do Line 554  for OPTFILE in $OPTFILES ; do
554              && runmodel $dir/$builddir mitgcmuv && run=Y \              && runmodel $dir/$builddir mitgcmuv && run=Y \
555              && results=`testoutput $dir $rundir`              && results=`testoutput $dir $rundir`
556          echo          echo
557          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
558                ${run:-N} $results
559          echo          echo
560          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results >> $SUMMARY          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
561                ${run:-N} $results >> $SUMMARY
562          ( cd $DRESULTS"/"$NDIR ; gzip * )          echo "fresults='" > $CDIR"/summary.txt"
563            formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
564                ${run:-N} $results >> $CDIR"/summary.txt"
565            echo "'" >> $CDIR"/summary.txt"
566            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
567            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
568            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
569            echo "tdir='$dir'" >> $CDIR"/summary.txt"
570    
571            (
572                cd $DRESULTS
573                tar -cf $NDIR".tar" $DRESULTS"_"$NDIR > /dev/null 2>&1
574                gzip $NDIR".tar"
575            )
576    
577          tar -cf $DRESULTS"/"$NDIR".tar" $DRESULTS"/"$NDIR          $MPACK -s MITgcm-test -m 1000000 $DRESULTS"/"$NDIR".tar.gz" $ADDRESSES
578          $MPACK -s MITgcm-test -m 1000000 $DRESULTS"/"$NDIR".tar" $ADDRESSES          RETVAL=$?
579            if test "x$RETVAL" != x0 ; then
580                echo "Warning: \"$MPACK\" failed -- please contact <edhill@mitgcm.org>"
581            else
582                rm -f $DRESULTS"/"$NDIR".tar*"
583            fi
584    
585          NDIR=$(( $NDIR + 1 ))          NDIR=$(( $NDIR + 1 ))
586                    
587      done      done
588  done  done
589    
590  # rm tmp_cmpnum.f a.out  rm tmp_cmpnum.f a.out
591    
 echo -------------------------------------------------------------------------------  
 echo  
 echo >> $SUMMARY  
 date >> $SUMMARY  
592  cat $SUMMARY  cat $SUMMARY
593    
 # tar -cf $DRESULTS".tar" $DRESULTS  
 #  
 # $MPACK -s MITgcm-test -m 1000000 $DRESULTS".tar" $ADDRESSES  
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22