/[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.5 by edhill, Sat Sep 6 02:45:07 2003 UTC revision 1.9 by edhill, Tue Sep 16 18:16:03 2003 UTC
# Line 10  usage() Line 10  usage()
10      echo      echo
11      echo "where possible OPTIONS are:"      echo "where possible OPTIONS are:"
12      echo "  (-help|-h)               print usage"      echo "  (-help|-h)               print usage"
13      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""      echo "  (-mpi)                   use MPI input files"
14        echo "  (-optfile=|-of=)STRING   list of optfiles to use"
15      echo "  (-a|-addr)STRING         list of email recipients"      echo "  (-a|-addr)STRING         list of email recipients"
16      echo "  (-t|-tdir)STRING         list of \"test\" dirs"      echo "                             (DEF=\"edhill@mitgcm.org\")"
17      echo "  (-b|-bash)STRING         the \"bash\" executable"      echo "  (-t|-tdir)STRING         list of test dirs to use"
18      echo "  (-m|-make)STRING         the \"make\" executable"      echo "                             (DEF=\"\" which builds all)"
19        echo "  (-b|-bash)STRING         location of \"bash\" executable"
20        echo "                             (DEF=\"\" for \"/bin/bash\")"
21        echo "  (-c|-command)STRING      command to run"
22        echo "                             (DEF=\"make output.txt\")"
23        echo "  (-m|-make)STRING         command to use for \"make\""
24        echo "                             (DEF=\"make\")"
25        echo
26        echo "and where STRING follows a whitespace-delimited format"
27        echo "such as:"
28        echo "  -t 'exp0 exp2 exp3' "
29        echo "  -addr='abc@123.com testing@home.org'"
30      echo      echo
31      exit 1      exit 1
32  }  }
# Line 167  genmakemodel() Line 179  genmakemodel()
179          cd $1;          cd $1;
180          printf 'genmake ... ' 1>&2          printf 'genmake ... ' 1>&2
181          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1
182          $GENMAKE2 -make $MAKE -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1          $GENMAKE2  -ds -m $MAKE --mods=../code "--optfile="$OPTFILE > make.log 2>&1
183          RETVAL=$?          RETVAL=$?
184          for i in gm_state gm_optfile gm_local Makefile ; do          for i in gm_state gm_optfile gm_local Makefile ; do
185              if test -r $i ; then              if test -r $i ; then
# Line 190  makeclean() Line 202  makeclean()
202      # makeclean directory      # makeclean directory
203      (      (
204          cd $1;          cd $1;
205          rm -f output.txt          if test -e output.txt ; then
206                rm -f output.txt
207            fi
208          printf 'make CLEAN ... ' 2>&1          printf 'make CLEAN ... ' 2>&1
209          if test -r Makefile ; then          if test -r Makefile ; then
210              $MAKE CLEAN >> make.log 2>&1              $MAKE CLEAN >> make.log 2>&1
# Line 259  linkdata() Line 273  linkdata()
273    
274  runmodel()  runmodel()
275  {  {
276      # runmodel directory exe      # runmodel directory
277      #      #
278      #  runs the model "exe" in "directory" (exe is relative to directory)      #  runs "$COMMAND" in "directory"
279        #  (where "$COMMAND" is relative to "directory")
280      (      (
281          cd $1          cd $1
282          if [ -x $2 ]; then          printf 'runmodel: ' 1>&2
283              if [ $quick -eq 0 ]; then          # make output.txt
284                  rm -f output.txt          $COMMAND
285              fi          RETVAL=$?
286              printf 'runmodel: ' 1>&2          if test "x$RETVAL" = x0 ; then
287              $MAKE output.txt              cp output.txt $CDIR"/output.txt"
288              RETVAL=$?              return 0
289              if test "x$RETVAL" = x0 ; then          else
290                  cp output.txt $CDIR"/output.txt"              return 1
                 return 0  
             else  
                 return 1  
             fi  
291          fi          fi
292      )      )
293  }  }
# Line 385  scandirs() Line 396  scandirs()
396  #  Default properties  #  Default properties
397  debug=0  debug=0
398  verbose=1  verbose=1
 quick=0  
399  clean=0  clean=0
 ieee=1  
400  expts=''  expts=''
401    # ieee=1
402    # quick=0
403    
404  BASH=  BASH=
405  OPTFILES=  OPTFILES=
# Line 396  ADDRESSES=edhill@mitgcm.org Line 407  ADDRESSES=edhill@mitgcm.org
407  TESTDIRS=  TESTDIRS=
408  MPACKDIR="../tools/mpack-1.6"  MPACKDIR="../tools/mpack-1.6"
409  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
410    COMMAND="make output.txt"
411  MAKE=make  MAKE=make
412    MPI=f
413    
414  echo -n "parsing options...  "  echo -n "parsing options...  "
415    
# Line 437  for ac_option ; do Line 450  for ac_option ; do
450          -bash=* | --bash=*)          -bash=* | --bash=*)
451              BASH=$ac_optarg ;;              BASH=$ac_optarg ;;
452    
453            -command | --command | -c | --c)
454                ac_prev=COMMAND ;;
455            -command=* | --command=*)
456                COMMAND=$ac_optarg ;;
457    
458          -make | --make | -m | --m)          -make | --make | -m | --m)
459              ac_prev=MAKE ;;              ac_prev=MAKE ;;
460          -make=* | --make=*)          -make=* | --make=*)
461              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
462    
463          -quick) quick=1 ;;          -mpi) MPI=t ;;
464          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
465          -debug) debug=1 ;;          -debug) debug=1 ;;
466          -clean) clean=1 ;;          -clean) clean=1 ;;
         -noieee) ieee=0 ;;  
467          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
468    
469          -*)          -*)
# Line 528  for OPTFILE in $OPTFILES ; do Line 545  for OPTFILE in $OPTFILES ; do
545                  | tee -a $SUMMARY                  | tee -a $SUMMARY
546              continue              continue
547          fi          fi
548            
549            #  Is this an MPI run?
550            if test "x$MPI" = xt ; then
551                if test ! -r $dir"/code/CPP_EEOPTIONS.h_mpi" -o ! -r $dir"/code/SIZE.h_mpi" ; then
552                    echo | tee -a $SUMMARY
553                    echo "can't read \"$dir/code/CPP_EEOPTIONS.h_mpi\" or \"$dir/code/SIZE.h_mpi\"" \
554                        | tee -a $SUMMARY
555                    continue
556                else
557                    cp $dir"/code/CPP_EEOPTIONS.h_mpi" $dir"/code/CPP_EEOPTIONS.h"
558                    cp $dir"/code/SIZE.h_mpi" $dir"/code/SIZE.h"
559                fi
560            else
561                if test -r $dir"/code/CPP_EEOPTIONS.h_nompi" ; then
562                    cp $dir"/code/CPP_EEOPTIONS.h_nompi" $dir"/code/CPP_EEOPTIONS.h"
563                fi
564                if test -r $dir"/code/SIZE.h_nompi" ; then
565                    cp $dir"/code/SIZE.h_nompi" $dir"/code/SIZE.h"
566                fi
567            fi
568    
569          #  Create an output dir for each OPTFILE/tdir combination          #  Create an output dir for each OPTFILE/tdir combination
570          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR
571          mkdir $CDIR          mkdir $CDIR
# Line 558  for OPTFILE in $OPTFILES ; do Line 595  for OPTFILE in $OPTFILES ; do
595              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
596              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
597              && linkdata $seperatebuilddir $dir/$rundir \              && linkdata $seperatebuilddir $dir/$rundir \
598              && runmodel $dir/$builddir mitgcmuv && run=Y \              && runmodel $dir/$builddir && run=Y \
599              && results=`testoutput $dir $rundir`              && results=`testoutput $dir $rundir`
600          echo          echo
601          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22