/[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.7 by edhill, Wed Sep 10 04:02:39 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
24        echo "and where STRING follows a whitespace-delimited format"
25        echo "such as:"
26        echo "  -t 'exp0 exp2 exp3' "
27        echo "  -addr='abc@123.com testing@home.org'"
28      echo      echo
29      exit 1      exit 1
30  }  }
# Line 31  build_mpack() Line 41  build_mpack()
41              exit 1              exit 1
42          fi          fi
43          echo -n "building mpack...  "          echo -n "building mpack...  "
44          ( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1          ( cd $MPACKDIR && ./configure && make ) > build_mpack.out 2>&1
45          RETVAL=$?          RETVAL=$?
46          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
47              echo              echo
# Line 167  genmakemodel() Line 177  genmakemodel()
177          cd $1;          cd $1;
178          printf 'genmake ... ' 1>&2          printf 'genmake ... ' 1>&2
179          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1
180          $GENMAKE2 -make $MAKE -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1          $GENMAKE2  -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1
181          RETVAL=$?          RETVAL=$?
182          for i in gm_state gm_optfile gm_local Makefile ; do          for i in gm_state gm_optfile gm_local Makefile ; do
183              if test -r $i ; then              if test -r $i ; then
# Line 190  makeclean() Line 200  makeclean()
200      # makeclean directory      # makeclean directory
201      (      (
202          cd $1;          cd $1;
203          rm -f output.txt          if test -e output.txt ; then
204                rm -f output.txt
205            fi
206          printf 'make CLEAN ... ' 2>&1          printf 'make CLEAN ... ' 2>&1
207          if test -r Makefile ; then          if test -r Makefile ; then
208              $MAKE CLEAN >> make.log 2>&1              make CLEAN >> make.log 2>&1
209              RETVAL=$?              RETVAL=$?
210              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
211                  tail make.log                  tail make.log
# Line 213  makedependmodel() Line 225  makedependmodel()
225      (      (
226          cd $1;          cd $1;
227          printf 'make depend ... ' 1>&2          printf 'make depend ... ' 1>&2
228          $MAKE depend >> make.log 2>&1          make depend >> make.log 2>&1
229          RETVAL=$?          RETVAL=$?
230          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
231              tail make.log              tail make.log
# Line 233  makemodel() Line 245  makemodel()
245          cd $1;          cd $1;
246          if test -r Makefile ; then          if test -r Makefile ; then
247              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
248              $MAKE >> make.log 2>&1              make >> make.log 2>&1
249              RETVAL=$?              RETVAL=$?
250              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
251                  tail make.log                  tail make.log
# Line 259  linkdata() Line 271  linkdata()
271    
272  runmodel()  runmodel()
273  {  {
274      # runmodel directory exe      # runmodel directory
275      #      #
276      #  runs the model "exe" in "directory" (exe is relative to directory)      #  runs "$COMMAND" in "directory"
277        #  (where "$COMMAND" is relative to "directory")
278      (      (
279          cd $1          cd $1
280          if [ -x $2 ]; then          printf 'runmodel: ' 1>&2
281              if [ $quick -eq 0 ]; then          # make output.txt
282                  rm -f output.txt          $COMMAND
283              fi          RETVAL=$?
284              printf 'runmodel: ' 1>&2          if test "x$RETVAL" = x0 ; then
285              $MAKE output.txt              cp output.txt $CDIR"/output.txt"
286              RETVAL=$?              return 0
287              if test "x$RETVAL" = x0 ; then          else
288                  cp output.txt $CDIR"/output.txt"              return 1
                 return 0  
             else  
                 return 1  
             fi  
289          fi          fi
290      )      )
291  }  }
# Line 385  scandirs() Line 394  scandirs()
394  #  Default properties  #  Default properties
395  debug=0  debug=0
396  verbose=1  verbose=1
 quick=0  
397  clean=0  clean=0
 ieee=1  
398  expts=''  expts=''
399    # ieee=1
400    # quick=0
401    
402  BASH=  BASH=
403  OPTFILES=  OPTFILES=
# Line 396  ADDRESSES=edhill@mitgcm.org Line 405  ADDRESSES=edhill@mitgcm.org
405  TESTDIRS=  TESTDIRS=
406  MPACKDIR="../tools/mpack-1.6"  MPACKDIR="../tools/mpack-1.6"
407  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
408  MAKE=make  COMMAND="make output.txt"
409    MPI=f
410    
411  echo -n "parsing options...  "  echo -n "parsing options...  "
412    
# Line 437  for ac_option ; do Line 447  for ac_option ; do
447          -bash=* | --bash=*)          -bash=* | --bash=*)
448              BASH=$ac_optarg ;;              BASH=$ac_optarg ;;
449    
450          -make | --make | -m | --m)          -command | --command | -c | --c)
451              ac_prev=MAKE ;;              ac_prev=COMMAND ;;
452          -make=* | --make=*)          -command=* | --command=*)
453              MAKE=$ac_optarg ;;              COMMAND=$ac_optarg ;;
454    
455          -quick) quick=1 ;;          -mpi) MPI=t ;;
456          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
457          -debug) debug=1 ;;          -debug) debug=1 ;;
458          -clean) clean=1 ;;          -clean) clean=1 ;;
         -noieee) ieee=0 ;;  
459          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
460    
461          -*)          -*)
# Line 528  for OPTFILE in $OPTFILES ; do Line 537  for OPTFILE in $OPTFILES ; do
537                  | tee -a $SUMMARY                  | tee -a $SUMMARY
538              continue              continue
539          fi          fi
540            
541            #  Is this an MPI run?
542            if test "x$MPI" = xt ; then
543                if test ! -r $dir"/code/CPP_EEOPTIONS.h_mpi" -o ! -r $dir"/code/SIZE.h_mpi" ; then
544                    echo | tee -a $SUMMARY
545                    echo "can't read \"$dir/code/CPP_EEOPTIONS.h_mpi\" or \"$dir/code/SIZE.h_mpi\"" \
546                        | tee -a $SUMMARY
547                    continue
548                else
549                    cp $dir"/code/CPP_EEOPTIONS.h_mpi" $dir"/code/CPP_EEOPTIONS.h"
550                    cp $dir"/code/SIZE.h_mpi" $dir"/code/SIZE.h"
551                fi
552            else
553                if test -r $dir"/code/CPP_EEOPTIONS.h_nompi" ; then
554                    cp $dir"/code/CPP_EEOPTIONS.h_nompi" $dir"/code/CPP_EEOPTIONS.h"
555                fi
556                if test -r $dir"/code/SIZE.h_nompi" ; then
557                    cp $dir"/code/SIZE.h_nompi" $dir"/code/SIZE.h"
558                fi
559            fi
560    
561          #  Create an output dir for each OPTFILE/tdir combination          #  Create an output dir for each OPTFILE/tdir combination
562          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR
563          mkdir $CDIR          mkdir $CDIR
# Line 558  for OPTFILE in $OPTFILES ; do Line 587  for OPTFILE in $OPTFILES ; do
587              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
588              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
589              && linkdata $seperatebuilddir $dir/$rundir \              && linkdata $seperatebuilddir $dir/$rundir \
590              && runmodel $dir/$builddir mitgcmuv && run=Y \              && runmodel $dir/$builddir && run=Y \
591              && results=`testoutput $dir $rundir`              && results=`testoutput $dir $rundir`
592          echo          echo
593          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.7

  ViewVC Help
Powered by ViewVC 1.1.22