/[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.32 by edhill, Sun Dec 7 07:06:13 2003 UTC revision 1.49 by edhill, Tue Nov 23 21:25:24 2004 UTC
# Line 13  usage() Line 13  usage()
13      echo "  (-help|-h)               print usage"      echo "  (-help|-h)               print usage"
14      echo "  (-mpi)                   use MPI input files"      echo "  (-mpi)                   use MPI input files"
15      echo "  (-ieee|-noieee)          if possible, use IEEE compiler flags"      echo "  (-ieee|-noieee)          if possible, use IEEE compiler flags"
16      echo "                             (DEF=\"noieee\")"      echo "                             (DEF=\"-ieee\")"
17      echo "  (-optfile=|-of=)STRING   list of optfiles to use"      echo "  (-optfile=|-of=)STRING   list of optfiles to use"
18      echo "  (-a|-addr) STRING        list of email recipients"      echo "  (-a|-addr) STRING        list of email recipients"
19      echo "                             (DEF=\"edhill@mitgcm.org\")"      echo "                             (DEF=\"edhill@mitgcm.org\")"
# Line 27  usage() Line 27  usage()
27      echo "                             (DEF=\"make output.txt\")"      echo "                             (DEF=\"make output.txt\")"
28      echo "  (-m|-make) STRING        command to use for \"make\""      echo "  (-m|-make) STRING        command to use for \"make\""
29      echo "                             (DEF=\"make\")"      echo "                             (DEF=\"make\")"
30        echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
31      echo "  (-clean)                 *ONLY* run \"make CLEAN\""      echo "  (-clean)                 *ONLY* run \"make CLEAN\""
32      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
33      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
34      echo "  (-noclean|-nc)           skip the \"make clean\" stage"      echo "  (-noclean|-nc)           skip the \"make clean\" stage"
35      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"
36        echo "  (-deldir|-dd)            on success, delete the output directory"
37      echo      echo
38      echo "and where STRING follows a whitespace-delimited format"      echo "and where STRING follows a whitespace-delimited format"
39      echo "such as:"      echo "such as:"
# Line 44  usage() Line 46  usage()
46  #  build the mpack utility  #  build the mpack utility
47  build_mpack()  build_mpack()
48  {  {
49      echo -n "building the mpack utility...  "      printf "building the mpack utility...  "
50      if test ! -x "$MPACKDIR/mpack" ; then      if test ! -x "$MPACKDIR/mpack" ; then
51          if test ! -d $MPACKDIR ; then          if test ! -d $MPACKDIR ; then
52              echo              echo
# Line 54  build_mpack() Line 56  build_mpack()
56              echo              echo
57              HAVE_MPACK=f              HAVE_MPACK=f
58          fi          fi
59          echo -n "building mpack...  "          printf "building mpack...  "
60          if test "x$CC" = x ; then          if test "x$CC" = x ; then
61              export CC=cc              export CC=cc
62          fi          fi
# Line 77  build_mpack() Line 79  build_mpack()
79    
80  testoutput_for_prop()  testoutput_for_prop()
81  {  {
82      # testoutput_for_prop dir s1 label subdir      # testoutput_for_prop dir s1 label subdir extension
83      #      #
84      #  compares files in $dir/$subdir/output.txt and $dir/results/output.txt      #  compares files in $dir/$subdir/output.txt and $dir/results/output.txt
85      #  using search strings s1 and text label      #  using search strings s1 and text label
# Line 99  testoutput_for_prop() Line 101  testoutput_for_prop()
101          return 99          return 99
102      fi      fi
103      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
104          echo testoutput_for_prop: grep "$2" $1/results/output.txt 1>&2          echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 1>&2
105      fi      fi
106      grep "$2" $1/results/output.txt | sed 's/.*=//' | cat -n > tmp2.txt      grep "$2" $1/results/output.txt$5 | sed 's/.*=//' | cat -n > tmp2.txt
107      lncnt=`wc -l tmp2.txt | awk '{print $1}' `      lncnt=`wc -l tmp2.txt | awk '{print $1}' `
108      if [ $lncnt -lt 3 ]; then      if [ $lncnt -lt 3 ]; then
109          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
# Line 169  testoutput_ad() Line 171  testoutput_ad()
171      rm -f t[01][56].txt t[56].txt      rm -f t[01][56].txt t[56].txt
172  }  }
173    
174    check_for_add_mon_output()
175    {
176        # Check for additional types of monitor output
177        if test "x$1" = x ; then
178            return
179        fi
180    
181        ptr_add="trcstat_ptracerXX_min trcstat_ptracerXX_max"
182        ptr_add="$ptr_add trcstat_ptracerXX_mean trcstat_ptracerXX_sd"
183        for ii in 1 2 3 4 5 ; do
184            for jj in $ptr_add ; do
185                name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"`
186                tst=`grep $name $1 | wc -l | awk '{print $1}'`
187                if test ! "x$tst" = x0 ; then
188                    eval "HAVE_PTR0"$ii"=t"
189                fi
190            done
191            #  eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"'
192        done
193    }
194    
195  testoutput()  testoutput()
196  {  {
197      # testoutput directory subdir      # testoutput directory subdir extension
198      #      #
199      #  test output in "directory"      #  test output in "directory"
200      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
201          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
202              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2
203          fi          fi
204          testoutput_for_prop $1 "cg2d_init_res" "cg2d init. residual" $2; cg2dres=$?          testoutput_for_prop $1 "cg2d_init_res" "cg2d init. residual" $2 $3; cg2dres=$?
205          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
206              echo testoutput: cg2dres=$cg2dres 1>&2              echo testoutput: cg2dres=$cg2dres 1>&2
207          fi          fi
208          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2; tmin=$?          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2 $3; tmin=$?
209          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2; tmax=$?          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2 $3; tmax=$?
210          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2; tmean=$?          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2 $3; tmean=$?
211          testoutput_for_prop $1 "dynstat_theta_sd" "theta s.d." $2; tsd=$?          testoutput_for_prop $1 "dynstat_theta_sd" "theta s.d." $2 $3; tsd=$?
212          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2; smin=$?          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2 $3; smin=$?
213          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2; smax=$?          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2 $3; smax=$?
214          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2; smean=$?          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2 $3; smean=$?
215          testoutput_for_prop $1 "dynstat_salt_sd" "salt s.d." $2; ssd=$?          testoutput_for_prop $1 "dynstat_salt_sd" "salt s.d." $2 $3; ssd=$?
216          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2; umin=$?          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2 $3; umin=$?
217          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2; umax=$?          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2 $3; umax=$?
218          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2; umean=$?          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2 $3; umean=$?
219          testoutput_for_prop $1 "dynstat_uvel_sd" "U s.d." $2; usd=$?          testoutput_for_prop $1 "dynstat_uvel_sd" "U s.d." $2 $3; usd=$?
220          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2; vmin=$?          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2 $3; vmin=$?
221          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2; vmax=$?          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$?
222          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2; vmean=$?          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$?
223          testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2; vsd=$?          testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2 $3; vsd=$?
224          dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \  
225              $umin $umax $umean $usd $vmin $vmax $vmean $vsd          for ii in 1 2 3 4 5 ; do
226                testoutput_for_prop $1 "trcstat_ptracer0"$ii"_min"  "p0"$ii"_min"  $2 $3
227                RETVAL=$? ; eval `echo "p0"$ii"_min="$RETVAL`
228                testoutput_for_prop $1 "trcstat_ptracer0"$ii"_max"  "p0"$ii"_max"  $2 $3
229                RETVAL=$? ; eval `echo "p0"$ii"_max="$RETVAL`
230                testoutput_for_prop $1 "trcstat_ptracer0"$ii"_mean" "p0"$ii"_mean" $2 $3
231                RETVAL=$? ; eval `echo "p0"$ii"_mean="$RETVAL`
232                testoutput_for_prop $1 "trcstat_ptracer0"$ii"_sd"   "p0"$ii"_sd"   $2 $3
233                RETVAL=$? ; eval `echo "p0"$ii"_sd="$RETVAL`
234            done
235    
236            allargs="$cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd"
237            allargs="$allargs $umin $umax $umean $usd $vmin $vmax $vmean $vsd"
238            allargs="$allargs $p01_min $p01_max $p01_mean $p01_sd"
239            allargs="$allargs $p02_min $p02_max $p02_mean $p02_sd"
240            allargs="$allargs $p03_min $p03_max $p03_mean $p03_sd"
241            allargs="$allargs $p04_min $p04_max $p04_mean $p04_sd"
242            allargs="$allargs $p05_min $p05_max $p05_mean $p05_sd"
243    
244            eval "dashnum $allargs"
245    
246      else      else
247          testoutput_ad $1 $2 "precision_grdchk_result"          testoutput_ad $1 $2 "precision_grdchk_result"
248      fi      fi
# Line 211  genmakemodel() Line 254  genmakemodel()
254      if test "x$NOGENMAKE" = xt ; then      if test "x$NOGENMAKE" = xt ; then
255          echo "genmake skipped!"          echo "genmake skipped!"
256      else      else
257          GENMAKE2="$BASH ../../../tools/genmake2"          if test "x$BASH" = x ; then
258                GENMAKE2="../../../tools/genmake2"
259            else
260                GENMAKE2="$BASH ../../../tools/genmake2 -bash $BASH"
261            fi
262          (          (
263              cd $1;              cd $1;
264              command="$GENMAKE2  -ds -m $MAKE"              command="$GENMAKE2  -ds -m $MAKE"
# Line 230  genmakemodel() Line 277  genmakemodel()
277              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
278              $command > make.log 2>&1              $command > make.log 2>&1
279              RETVAL=$?              RETVAL=$?
280              cp Makefile $CDIR              #  Reduce the size of the testing emails!
281                head -100 Makefile > $CDIR/Makefile_head
282              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
283                  tail make.log                  tail make.log
284                  echo "genmakemodel: genmake failed" 1>&2                  echo "genmakemodel: genmake failed" 1>&2
# Line 302  makemodel() Line 350  makemodel()
350          if test -r Makefile ; then          if test -r Makefile ; then
351              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
352              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
353                  $MAKE >> make.log 2>&1                  if test "x$JOBS" = x ; then
354                        $MAKE >> make.log 2>&1
355                    else
356                        $MAKE -j $JOBS >> make.log 2>&1
357                    fi
358              else              else
359                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.log 2>&1
360              fi              fi
# Line 329  symlink_mpifiles() Line 381  symlink_mpifiles()
381      code_dir=$2      code_dir=$2
382      BUILD_DIR=$dir/$3      BUILD_DIR=$dir/$3
383      CODE_DIR=$dir/$code_dir      CODE_DIR=$dir/$code_dir
384        
385      # These are files that should replace their counter-part when using -mpi      # These are files that should replace their counter-part when using -mpi
386      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`
387    
# Line 344  symlink_mpifiles() Line 396  symlink_mpifiles()
396              RETVAL=$?              RETVAL=$?
397              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
398                  if ! test -f $BUILD_DIR/$i ; then                  if ! test -f $BUILD_DIR/$i ; then
399                  #echo Linking $name to $i                      #echo Linking $name to $i
400                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)
401                  fi                  fi
402              fi              fi
403          done          done
404      else      else
405      # NO: We undo any _mpi symbolically linked files          # NO: We undo any _mpi symbolically linked files
406          for ii in $MPI_FILES ; do          for ii in $MPI_FILES ; do
407              i=`echo $ii | sed 's:^\./::'`              i=`echo $ii | sed 's:^\./::'`
408              name=`echo $i | sed 's:_mpi::' `              name=`echo $i | sed 's:_mpi::' `
409              if test -L $BUILD_DIR/$name ; then              if test -L $BUILD_DIR/$name ; then
410                  linktarg=`(cd $BUILD_DIR; readlink $name)`                  cmp $BUILD_DIR/$name "../$code_dir/$name"_mpi > /dev/null 2>&1
411                  if test $linktarg = "../$code_dir/$name"_mpi ; then                  RETVAL=$?
412                  #echo Un-linking $name from $linktarg                  if test "x$RETVAL" = x0 ; then
413                        #echo Un-linking $name from $linktarg
414                      rm -f $BUILD_DIR/$name                      rm -f $BUILD_DIR/$name
415                  fi                  fi
416              fi              fi
# Line 409  runmodel() Line 462  runmodel()
462          cd $1          cd $1
463          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
464          # make output.txt          # make output.txt
465          $COMMAND >> run.log 2>&1          echo
466            rm -f run.log
467            # echo "COMMAND='$COMMAND'"
468            # echo "pwd='"`pwd`"'"
469            ( eval $COMMAND ) > run.log 2>&1
470          RETVAL=$?          RETVAL=$?
471          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
472                tail run.log
473              echo successful 1>&2              echo successful 1>&2
474              if test "x$ADM" = x ; then              # === Reduce the size of the testing emails!
475                  cp output.txt $CDIR"/output.txt"              # if test "x$ADM" = x ; then
476              else              #   cp output.txt $CDIR"/output.txt"
477                  cp output.txt_adm $CDIR"/output.txt_adm"              # else
478              fi              #   cp output.txt_adm $CDIR"/output.txt_adm"
479                # fi
480                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
481              return 0              return 0
482          else          else
483              tail run.log              tail run.log
484              echo failed 1>&2              echo failed 1>&2
485              cp run.log $CDIR"/run.log"              cp run.log $CDIR"/run.log"
486                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
487              return 1              return 1
488          fi          fi
489      )      )
# Line 432  createcodelet() Line 493  createcodelet()
493  {  {
494      # create codelet for comparing model output      # create codelet for comparing model output
495    
496      echo -n "creating the comparison code...  "      printf "creating the comparison code...  "
497      cat > tmp_cmpnum.c <<EOF      cat > tmp_cmpnum.c <<EOF
498  #include <stdio.h>  #include <stdio.h>
499  #include <math.h>  #include <math.h>
500  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
501    int linnum,best;    int linnum,best,lncnt;
502    double a,b,diff;    double a,b,diff;
503    best = -16;    best = -16;
504    while( 1 )  {    lncnt = 0;
505      while( 1 & (lncnt+=1) < 999 )  {
506      scanf("%d", &linnum);      scanf("%d", &linnum);
507      if (linnum == -1)  break;      if (linnum == -1)  break;
508      scanf("%lf", &a);  scanf("%lf", &b);      scanf("%lf", &a);  scanf("%lf", &b);
# Line 456  int main( int argc, char** argv )  { Line 518  int main( int argc, char** argv )  {
518        }        }
519      }      }
520    }    }
521      if (lncnt == 999) best=-29;
522    printf("%d\n", -best);    printf("%d\n", -best);
523    return 0;    return 0;
524  }  }
# Line 536  clean=0 Line 599  clean=0
599  expts=''  expts=''
600  # ieee=1  # ieee=1
601    
602  IEEE=  IEEE=true
603  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
604      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
605  fi  fi
# Line 557  HAVE_MPACK= Line 620  HAVE_MPACK=
620  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
621  COMMAND=  COMMAND=
622  MAKE=make  MAKE=make
623    JOBS=
624  MPI=f  MPI=f
625    DELDIR=
626    
627  ADM=  ADM=
628    
629  echo -n "parsing options...  "  # Additional monitor types
630    # HAVE_PTR01=
631    # HAVE_PTR02=
632    # HAVE_PTR03=
633    # HAVE_PTR04=
634    # HAVE_PTR05=
635    
636    printf "parsing options...  "
637    
638  ac_prev=  ac_prev=
639  for ac_option ; do  for ac_option ; do
# Line 610  for ac_option ; do Line 682  for ac_option ; do
682          -make=* | --make=*)          -make=* | --make=*)
683              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
684    
685            -j) ac_prev=JOBS ;;
686            -j=*) JOBS=$ac_optarg ;;
687    
688          -clean | --clean)          -clean | --clean)
689              CLEANUP=t ;;              CLEANUP=t ;;
690    
# Line 633  for ac_option ; do Line 708  for ac_option ; do
708          -debug) debug=1 ;;          -debug) debug=1 ;;
709          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
710    
711            -deldir | -dd) DELDIR=t ;;
712    
713          -*)          -*)
714              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
715              usage              usage
# Line 666  if test "x$ADM" = xt -a "x$COMMAND" = x Line 743  if test "x$ADM" = xt -a "x$COMMAND" = x
743  fi  fi
744    
745  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
746      COMMAND="make output.txt"      COMMAND="$MAKE output.txt"
747  fi  fi
748    
749  echo "OK"  echo "OK"
# Line 699  if test "x$RETVAL" != x0 ; then Line 776  if test "x$RETVAL" != x0 ; then
776      exit 1      exit 1
777  fi  fi
778  SUMMARY="$DRESULTS/summary.txt"  SUMMARY="$DRESULTS/summary.txt"
779  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
780  start_date=`date`  start_date=`date`
781  echo $start_date > $SUMMARY  echo $start_date > $SUMMARY
782    
# Line 731  fi Line 808  fi
808  echo  echo
809  echo >> $SUMMARY  echo >> $SUMMARY
810  if test "x$ADM" = x ; then  if test "x$ADM" = x ; then
811      cat << EOF | tee -a $SUMMARY      line_0="            ----T-----  ----S-----  ----U-----  ----V-----"
812                  T           S           U           V      line_1="G D M    c        m  s        m  s        m  s        m  s"
813  G D M    c        m  s        m  s        m  s        m  s      line_2="E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  ."
814  E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .      line_3="N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d"
815  N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d      line_4="2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  ."
816  2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .      for ii in 1 2 3 4 5 ; do
817            #  tst=`eval 'echo $HAVE_PTR0'$ii`
818  EOF          #  if test "x$tst" = xt ; then
819            line_0="$line_0  --PTR 0"$ii"--"
820            line_1="$line_1        m  s"
821            line_2="$line_2  m  m  e  ."
822            line_3="$line_3  i  a  a  d"
823            line_4="$line_4  n  x  n  ."
824            #  fi
825        done
826        echo "$line_0" | tee -a $SUMMARY
827        echo "$line_1" | tee -a $SUMMARY
828        echo "$line_2" | tee -a $SUMMARY
829        echo "$line_3" | tee -a $SUMMARY
830        echo "$line_4" | tee -a $SUMMARY
831        echo " "       | tee -a $SUMMARY
832  else  else
833      echo "ADJOINT=true" >> $SUMMARY      echo "ADJOINT=true" >> $SUMMARY
834      echo >> $SUMMARY      echo >> $SUMMARY
# Line 778  for dir in $TESTDIRS ; do Line 868  for dir in $TESTDIRS ; do
868          continue          continue
869      fi      fi
870    
871        # Check for additional types of monitor output
872        check_for_add_mon_output  $fout
873    
874      builddir="input"      builddir="input"
875      rundir="input"      rundir="input"
876      use_seperate_build=0      use_seperate_build=0
# Line 788  for dir in $TESTDIRS ; do Line 881  for dir in $TESTDIRS ; do
881          linkdata $use_seperate_build $dir/$rundir          linkdata $use_seperate_build $dir/$rundir
882      fi      fi
883            
884        #  Check whether there are "extra runs" for this testdir
885        extra_runs=
886        if test "x$ADM" = x -a "x$use_seperate_build" = x1 ; then
887            ex_run_dirs=`( cd $dir ; echo input.* )`
888            echo "ex_run_dirs='$ex_run_dirs'"
889            for exd in $ex_run_dirs ; do
890                name=`echo $exd | sed -e 's/input.//g'`
891                outf="$dir/results/output.txt.$name"
892                if test -f $outf -a -r $outf ; then
893                    extra_runs="$extra_runs $name"
894                fi
895            done
896        fi
897    
898      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
899          code_dir=code          code_dir=code
900          CODE_DIR=$dir/code          CODE_DIR=$dir/code
# Line 830  for dir in $TESTDIRS ; do Line 937  for dir in $TESTDIRS ; do
937      echo      echo
938      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
939          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
940            echo
941            echo "$fres" >> $SUMMARY
942            echo "fresults='$fres'" > $CDIR"/summary.txt"
943            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
944            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
945            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
946            echo "tdir='$dir'" >> $CDIR"/summary.txt"
947    
948            OLD_COMMAND=$COMMAND
949            COMMAND="./mitgcmuv > output.txt"
950            for ex in $extra_runs ; do
951                test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
952                mkdir "$dir/tr_run.$ex"
953                links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
954                (
955                    cd "$dir/tr_run.$ex"
956                    for i in $links; do
957                        ln -s ../input/$i $i
958                    done
959                )
960                links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
961                (
962                    cd "$dir/tr_run.$ex"
963                    for i in $links; do
964                        test -e $i  &&  rm -f $i
965                        ln -s ../input.$ex/$i $i
966                    done
967                    ln -s ../$builddir/mitgcmuv mitgcmuv
968                )
969                runmodel $dir/tr_run.$ex && run=Y \
970                    && results=`testoutput $dir tr_run.$ex "."$ex`
971                fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
972                fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
973                fres="$fres.$ex"
974                echo
975                echo "$fres" >> $SUMMARY
976                echo "fresults='$fres'" > $CDIR"/summary.txt"
977                echo "MACH='$MACH'" >> $CDIR"/summary.txt"
978                echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
979                echo "DATE='$DATE'" >> $CDIR"/summary.txt"
980                echo "tdir='$dir'" >> $CDIR"/summary.txt"
981            done
982            COMMAND=$OLD_COMMAND
983      else      else
984          fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`          fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
985          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
986            echo
987            echo "$fres" >> $SUMMARY
988            echo "fresults='$fres'" > $CDIR"/summary.txt"
989            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
990            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
991            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
992            echo "tdir='$dir'" >> $CDIR"/summary.txt"
993      fi      fi
     echo  
     echo "$fres" >> $SUMMARY  
     echo "fresults='$fres'" > $CDIR"/summary.txt"  
     echo "MACH='$MACH'" >> $CDIR"/summary.txt"  
     echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"  
     echo "DATE='$DATE'" >> $CDIR"/summary.txt"  
     echo "tdir='$dir'" >> $CDIR"/summary.txt"  
994            
995      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
996            
997  done  done
998    
999  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
1000  echo $start_date >> $SUMMARY  echo $start_date >> $SUMMARY
1001  echo -n "End time:    " >> $SUMMARY  printf "End time:    " >> $SUMMARY
1002  date >> $SUMMARY  date >> $SUMMARY
1003    
1004  #  If addresses were supplied and mpack built successfully, then try  #  If addresses were supplied and mpack built successfully, then try
# Line 859  else Line 1009  else
1009      if test "x$HAVE_MPACK" = xt ; then      if test "x$HAVE_MPACK" = xt ; then
1010          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \
1011              && gzip $DRESULTS".tar" \              && gzip $DRESULTS".tar" \
1012              && $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES              && $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES
1013          RETVAL=$?          RETVAL=$?
1014          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
1015              echo              echo
# Line 889  if test "x$CLEANUP" != xt ; then Line 1039  if test "x$CLEANUP" != xt ; then
1039      cat $SUMMARY > tr_out.txt      cat $SUMMARY > tr_out.txt
1040  fi  fi
1041    
1042    if test "x$DELDIR" = xt ; then
1043        rm -rf $DRESULTS
1044    fi
1045    

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.22