/[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.109 by jmc, Thu Dec 13 18:28:41 2007 UTC revision 1.115 by jmc, Sun Apr 6 19:19:47 2008 UTC
# Line 19  usage() Line 19  usage()
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=\"\" no email is sent)"      echo "                             (DEF=\"\" no email is sent)"
22        echo "  (-mpd|-mpackdir) DIR     location of the mpack utility"
23        echo "                             (DEF=\"../tools/mpack-1.6\")"
24      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"
25      echo "                             (recognized groups: basic, tutorials)"      echo "                             (recognized groups: basic, tutorials)"
26      echo "                             (DEF=\"\" which test all)"      echo "                             (DEF=\"\" which test all)"
# Line 65  usage() Line 67  usage()
67  build_mpack()  build_mpack()
68  {  {
69      printf "building the mpack utility...  "      printf "building the mpack utility...  "
70      if test ! -x "$MPACKDIR/mpack" ; then      MPACK="$MPACKDIR/mpack"
71        if test ! -x $MPACK ; then
72          if test ! -d $MPACKDIR ; then          if test ! -d $MPACKDIR ; then
73              echo              echo
74              echo "Error: can't find \"$MPACKDIR\""              echo "Error: can't find \"$MPACKDIR\""
# Line 74  build_mpack() Line 77  build_mpack()
77              echo              echo
78              HAVE_MPACK=f              HAVE_MPACK=f
79          fi          fi
         printf "building mpack...  "  
80          if test "x$CC" = x ; then          if test "x$CC" = x ; then
81              export CC=cc              export CC=cc
82          fi          fi
83            printf "building mpack (using CC=$CC)...  "
84          ( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1          ( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1
85          RETVAL=$?          RETVAL=$?
86          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
# Line 88  build_mpack() Line 91  build_mpack()
91          else          else
92              rm -f tr_build_mpack.out              rm -f tr_build_mpack.out
93              HAVE_MPACK=t              HAVE_MPACK=t
94                echo "done"
95          fi          fi
96      else      else
97          HAVE_MPACK=t          HAVE_MPACK=t
98            echo "already exist"
99      fi      fi
     echo "OK"  
100  }  }
101    
102  testoutput_var()  testoutput_var()
# Line 474  symlink_mpifiles() Line 478  symlink_mpifiles()
478      CODE_DIR=$dir/$code_dir      CODE_DIR=$dir/$code_dir
479            
480      # These are files that should replace their counter-part when using -mpi      # These are files that should replace their counter-part when using -mpi
481      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi" -print)`
482    
483      #  Is this an MPI run?      #  Is this an MPI run?
484      if test "x$MPI" = xt ; then      if test "x$MPI" = xt ; then
# Line 625  createcodelet() Line 629  createcodelet()
629  {  {
630      # create codelet for comparing model output      # create codelet for comparing model output
631    
632      printf "creating the comparison code...  "      printf "creating the comparison code (using CC=$CC)...  "
633      cat > tr_cmpnum.c <<EOF      cat > tr_cmpnum.c <<EOF
634  #include <stdio.h>  #include <stdio.h>
635  #include <math.h>  #include <math.h>
# Line 743  TESTDIRS= Line 747  TESTDIRS=
747  SKIPDIRS=  SKIPDIRS=
748  MPACKDIR="../tools/mpack-1.6"  MPACKDIR="../tools/mpack-1.6"
749  HAVE_MPACK=  HAVE_MPACK=
750  MPACK="$MPACKDIR/mpack"  MPACK=
751  COMMAND=  COMMAND=
752  if test "x$MAKE" = x ; then  if test "x$MAKE" = x ; then
753      MAKE=make      MAKE=make
# Line 792  for ac_option ; do Line 796  for ac_option ; do
796              ac_prev=ADDRESSES ;;              ac_prev=ADDRESSES ;;
797          -addr=* | --addr=*)          -addr=* | --addr=*)
798              ADDRESSES=$ac_optarg ;;              ADDRESSES=$ac_optarg ;;
799            -mpackdir | --mpackdir | -mpd | --mpd)
800                ac_prev=MPACKDIR ;;
801            -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*)
802                MPACKDIR=$ac_optarg ;;
803    
804          -tdir | --tdir | -t | --t)          -tdir | --tdir | -t | --t)
805              ac_prev=TESTDIRS ;;              ac_prev=TESTDIRS ;;
# Line 978  fi Line 986  fi
986  #  create the FORTRAN comparison code  #  create the FORTRAN comparison code
987  createcodelet  createcodelet
988    
989  #  build the mpack utility  #  build the mpack utility (if ADDRESSES = NONE, do it to test the build)
990  if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then  if test "x$ADDRESSES" = x ; then
991      echo "skipping mpack build"      echo "skipping mpack build"
992  else  else
993      build_mpack      build_mpack
994  fi  fi
995    
996  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
997    CMDLINE=$0
998    for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done
999  MACH=`hostname`  MACH=`hostname`
1000  UNAMEA=`uname -a`  UNAMEA=`uname -a`
1001  DATE=`date +%Y%m%d`  DATE=`date +%Y%m%d`
# Line 1006  if test "x$RETVAL" != x0 ; then Line 1016  if test "x$RETVAL" != x0 ; then
1016      exit 1      exit 1
1017  fi  fi
1018  SUMMARY="$DRESULTS/summary.txt"  SUMMARY="$DRESULTS/summary.txt"
 printf "Start time:  " >> $SUMMARY  
1019  start_date=`date`  start_date=`date`
1020  echo $start_date > $SUMMARY  echo $start_date > $SUMMARY
1021    echo 'run:' $CMDLINE >> $SUMMARY
1022    echo 'on :' $UNAMEA  >> $SUMMARY
1023    
1024  of_path=  of_path=
1025  if test "x$OPTFILE" != xNONE ; then  if test "x$OPTFILE" != xNONE ; then
# Line 1095  for dir in $TESTDIRS ; do Line 1106  for dir in $TESTDIRS ; do
1106      #  Cleanup only!      #  Cleanup only!
1107      if test "x$CLEANUP" = xt ; then      if test "x$CLEANUP" = xt ; then
1108          if test -r $BUILD_DIR/Makefile ; then          if test -r $BUILD_DIR/Makefile ; then
1109              echo '  ------  clean dir:' $dir/build              echo '  ------  clean dir:' $dir/$builddir
1110              ( cd $BUILD_DIR ; make CLEAN )              ( cd $BUILD_DIR ; make CLEAN )
1111          fi          fi
1112          if test -d $dir/$rundir/CVS ; then          if test -d $dir/$rundir/CVS ; then
# Line 1244  for dir in $TESTDIRS ; do Line 1255  for dir in $TESTDIRS ; do
1255  done  done
1256    
1257  printf "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
1258  echo $start_date >> $SUMMARY  echo "$start_date" >> $SUMMARY
1259  printf "End time:    " >> $SUMMARY  printf "End time:    " >> $SUMMARY
1260  date >> $SUMMARY  date >> $SUMMARY
1261    

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

  ViewVC Help
Powered by ViewVC 1.1.22