/[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.58 by edhill, Fri Dec 10 17:36:43 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 "  (-ptracers|-ptr) STRING  specify which ptracers to test"
31        echo "                             (DEF=\"1 2 3 4 5\")"
32        echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
33      echo "  (-clean)                 *ONLY* run \"make CLEAN\""      echo "  (-clean)                 *ONLY* run \"make CLEAN\""
34      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
35      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
36      echo "  (-noclean|-nc)           skip the \"make clean\" stage"      echo "  (-noclean|-nc)           skip the \"make clean\" stage"
37      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"
38        echo "  (-deldir|-dd)            on success, delete the output directory"
39      echo      echo
40      echo "and where STRING follows a whitespace-delimited format"      echo "and where STRING can be a whitespace-delimited list"
41      echo "such as:"      echo "such as:"
42        echo
43      echo "  -t 'exp0 exp2 exp3' "      echo "  -t 'exp0 exp2 exp3' "
44      echo "  -addr='abc@123.com testing@home.org'"      echo "  -addr='abc@123.com testing@home.org'"
45      echo      echo
46        echo "provided that the expression is properly quoted within the current"
47        echo "shell (note the use of single quotes to protect white space)."
48        echo
49      exit 1      exit 1
50  }  }
51    
52  #  build the mpack utility  #  build the mpack utility
53  build_mpack()  build_mpack()
54  {  {
55      echo -n "building the mpack utility...  "      printf "building the mpack utility...  "
56      if test ! -x "$MPACKDIR/mpack" ; then      if test ! -x "$MPACKDIR/mpack" ; then
57          if test ! -d $MPACKDIR ; then          if test ! -d $MPACKDIR ; then
58              echo              echo
# Line 54  build_mpack() Line 62  build_mpack()
62              echo              echo
63              HAVE_MPACK=f              HAVE_MPACK=f
64          fi          fi
65          echo -n "building mpack...  "          printf "building mpack...  "
66          if test "x$CC" = x ; then          if test "x$CC" = x ; then
67              export CC=cc              export CC=cc
68          fi          fi
# Line 77  build_mpack() Line 85  build_mpack()
85    
86  testoutput_for_prop()  testoutput_for_prop()
87  {  {
88      # testoutput_for_prop dir s1 label subdir      # testoutput_for_prop dir s1 label subdir extension
89      #      #
90      #  compares files in $dir/$subdir/output.txt and $dir/results/output.txt      #  compares files in $dir/$subdir/output.txt and $dir/results/output.txt
91      #  using search strings s1 and text label      #  using search strings s1 and text label
# Line 99  testoutput_for_prop() Line 107  testoutput_for_prop()
107          return 99          return 99
108      fi      fi
109      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
110          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
111      fi      fi
112      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
113      lncnt=`wc -l tmp2.txt | awk '{print $1}' `      lncnt=`wc -l tmp2.txt | awk '{print $1}' `
114      if [ $lncnt -lt 3 ]; then      if [ $lncnt -lt 3 ]; then
115          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
# Line 169  testoutput_ad() Line 177  testoutput_ad()
177      rm -f t[01][56].txt t[56].txt      rm -f t[01][56].txt t[56].txt
178  }  }
179    
180    check_for_add_mon_output()
181    {
182        # Check for additional types of monitor output
183        if test "x$1" = x ; then
184            return
185        fi
186    
187        for ii in $PTRACERS_NUM ; do
188            eval "HAVE_PTR0"$ii"=f"
189        done
190    
191        ptr_add="trcstat_ptracerXX_min trcstat_ptracerXX_max"
192        ptr_add="$ptr_add trcstat_ptracerXX_mean trcstat_ptracerXX_sd"
193        for ii in $PTRACERS_NUM ; do
194            for jj in $ptr_add ; do
195                name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"`
196                tst=`grep $name $1 | wc -l | awk '{print $1}'`
197                if test ! "x$tst" = x0 ; then
198                    eval "HAVE_PTR0"$ii"=t"
199                fi
200            done
201            #  eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"'
202        done
203    }
204    
205  testoutput()  testoutput()
206  {  {
207      # testoutput directory subdir      # testoutput directory subdir extension
208      #      #
209      #  test output in "directory"      #  test output in "directory"
210      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
211          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
212              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2
213          fi          fi
214          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=$?
215          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
216              echo testoutput: cg2dres=$cg2dres 1>&2              echo testoutput: cg2dres=$cg2dres 1>&2
217          fi          fi
218          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2; tmin=$?          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2 $3; tmin=$?
219          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2; tmax=$?          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2 $3; tmax=$?
220          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2; tmean=$?          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2 $3; tmean=$?
221          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=$?
222          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2; smin=$?          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2 $3; smin=$?
223          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2; smax=$?          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2 $3; smax=$?
224          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2; smean=$?          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2 $3; smean=$?
225          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=$?
226          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2; umin=$?          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2 $3; umin=$?
227          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2; umax=$?          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2 $3; umax=$?
228          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2; umean=$?          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2 $3; umean=$?
229          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=$?
230          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2; vmin=$?          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2 $3; vmin=$?
231          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2; vmax=$?          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$?
232          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2; vmean=$?          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$?
233          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=$?
234          dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \  
235              $umin $umax $umean $usd $vmin $vmax $vmean $vsd          #  This is for PTRACERS
236            for ii in $PTRACERS_NUM ; do
237                eval `echo "p0"$ii"_min=99"`
238                eval `echo "p0"$ii"_max=99"`
239                eval `echo "p0"$ii"_mean=99"`
240                eval `echo "p0"$ii"_sd=99"`
241                tst=`eval 'echo "$HAVE_PTR0'$ii'"'`
242                #echo 'tst = '$tst
243                if test "x$tst" = xt ; then
244                    a="trcstat_ptracer0"
245                    testoutput_for_prop $1 "$a"$ii"_min"  "p0"$ii"_min"  $2 $3
246                    RETVAL=$? ; eval `echo "p0"$ii"_min="$RETVAL`
247                    testoutput_for_prop $1 "$a"$ii"_max"  "p0"$ii"_max"  $2 $3
248                    RETVAL=$? ; eval `echo "p0"$ii"_max="$RETVAL`
249                    testoutput_for_prop $1 "$a"$ii"_mean" "p0"$ii"_mean" $2 $3
250                    RETVAL=$? ; eval `echo "p0"$ii"_mean="$RETVAL`
251                    testoutput_for_prop $1 "$a"$ii"_sd"   "p0"$ii"_sd"   $2 $3
252                    RETVAL=$? ; eval `echo "p0"$ii"_sd="$RETVAL`
253                fi
254            done
255    
256            allargs="$cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd"
257            allargs="$allargs $umin $umax $umean $usd $vmin $vmax $vmean $vsd"
258            allargs="$allargs $p01_min $p01_max $p01_mean $p01_sd"
259            allargs="$allargs $p02_min $p02_max $p02_mean $p02_sd"
260            allargs="$allargs $p03_min $p03_max $p03_mean $p03_sd"
261            allargs="$allargs $p04_min $p04_max $p04_mean $p04_sd"
262            allargs="$allargs $p05_min $p05_max $p05_mean $p05_sd"
263    
264            eval "dashnum $allargs"
265    
266      else      else
267          testoutput_ad $1 $2 "precision_grdchk_result"          testoutput_ad $1 $2 "precision_grdchk_result"
268      fi      fi
# Line 211  genmakemodel() Line 274  genmakemodel()
274      if test "x$NOGENMAKE" = xt ; then      if test "x$NOGENMAKE" = xt ; then
275          echo "genmake skipped!"          echo "genmake skipped!"
276      else      else
277          GENMAKE2="$BASH ../../../tools/genmake2"          if test "x$BASH" = x ; then
278                GENMAKE2="../../../tools/genmake2"
279            else
280                GENMAKE2="$BASH ../../../tools/genmake2 -bash $BASH"
281            fi
282          (          (
283              cd $1;              cd $1;
284              command="$GENMAKE2  -ds -m $MAKE"              command="$GENMAKE2  -ds -m $MAKE"
# Line 230  genmakemodel() Line 297  genmakemodel()
297              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
298              $command > make.log 2>&1              $command > make.log 2>&1
299              RETVAL=$?              RETVAL=$?
300              cp Makefile $CDIR              #  Reduce the size of the testing emails!
301                head -100 Makefile > $CDIR/Makefile_head
302              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
303                  tail make.log                  tail make.log
304                  echo "genmakemodel: genmake failed" 1>&2                  echo "genmakemodel: genmake failed" 1>&2
# Line 302  makemodel() Line 370  makemodel()
370          if test -r Makefile ; then          if test -r Makefile ; then
371              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
372              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
373                  $MAKE >> make.log 2>&1                  if test "x$JOBS" = x ; then
374                        $MAKE >> make.log 2>&1
375                    else
376                        $MAKE -j $JOBS >> make.log 2>&1
377                    fi
378              else              else
379                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.log 2>&1
380              fi              fi
# Line 329  symlink_mpifiles() Line 401  symlink_mpifiles()
401      code_dir=$2      code_dir=$2
402      BUILD_DIR=$dir/$3      BUILD_DIR=$dir/$3
403      CODE_DIR=$dir/$code_dir      CODE_DIR=$dir/$code_dir
404        
405      # These are files that should replace their counter-part when using -mpi      # These are files that should replace their counter-part when using -mpi
406      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`
407    
# Line 344  symlink_mpifiles() Line 416  symlink_mpifiles()
416              RETVAL=$?              RETVAL=$?
417              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
418                  if ! test -f $BUILD_DIR/$i ; then                  if ! test -f $BUILD_DIR/$i ; then
419                  #echo Linking $name to $i                      #echo Linking $name to $i
420                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)
421                  fi                  fi
422              fi              fi
423          done          done
424      else      else
425      # NO: We undo any _mpi symbolically linked files          # NO: We undo any _mpi symbolically linked files
426          for ii in $MPI_FILES ; do          for ii in $MPI_FILES ; do
427              i=`echo $ii | sed 's:^\./::'`              i=`echo $ii | sed 's:^\./::'`
428              name=`echo $i | sed 's:_mpi::' `              name=`echo $i | sed 's:_mpi::' `
429              if test -L $BUILD_DIR/$name ; then              if test -L $BUILD_DIR/$name ; then
430                  linktarg=`(cd $BUILD_DIR; readlink $name)`                  cmp $BUILD_DIR/$name "../$code_dir/$name"_mpi > /dev/null 2>&1
431                  if test $linktarg = "../$code_dir/$name"_mpi ; then                  RETVAL=$?
432                  #echo Un-linking $name from $linktarg                  if test "x$RETVAL" = x0 ; then
433                        #echo Un-linking $name from $linktarg
434                      rm -f $BUILD_DIR/$name                      rm -f $BUILD_DIR/$name
435                  fi                  fi
436              fi              fi
# Line 409  runmodel() Line 482  runmodel()
482          cd $1          cd $1
483          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
484          # make output.txt          # make output.txt
485          $COMMAND >> run.log 2>&1          echo
486            rm -f run.log
487            # echo "COMMAND='$COMMAND'"
488            # echo "pwd='"`pwd`"'"
489            ( eval $COMMAND ) > run.log 2>&1
490          RETVAL=$?          RETVAL=$?
491          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
492                tail run.log
493              echo successful 1>&2              echo successful 1>&2
494              if test "x$ADM" = x ; then              # === Reduce the size of the testing emails!
495                  cp output.txt $CDIR"/output.txt"              # if test "x$ADM" = x ; then
496              else              #   cp output.txt $CDIR"/output.txt"
497                  cp output.txt_adm $CDIR"/output.txt_adm"              # else
498              fi              #   cp output.txt_adm $CDIR"/output.txt_adm"
499                # fi
500                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
501              return 0              return 0
502          else          else
503              tail run.log              tail run.log
504              echo failed 1>&2              echo failed 1>&2
505              cp run.log $CDIR"/run.log"              cp run.log $CDIR"/run.log"
506                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
507              return 1              return 1
508          fi          fi
509      )      )
# Line 432  createcodelet() Line 513  createcodelet()
513  {  {
514      # create codelet for comparing model output      # create codelet for comparing model output
515    
516      echo -n "creating the comparison code...  "      printf "creating the comparison code...  "
517      cat > tmp_cmpnum.c <<EOF      cat > tmp_cmpnum.c <<EOF
518  #include <stdio.h>  #include <stdio.h>
519  #include <math.h>  #include <math.h>
520  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
521    int linnum,best;    int linnum,best,lncnt;
522    double a,b,diff;    double a,b,abave,relerr;
523    best = -16;    best = -22;
524    while( 1 )  {    lncnt = 0;
525      while( 1 & (lncnt+=1) < 999 )  {
526      scanf("%d", &linnum);      scanf("%d", &linnum);
527      if (linnum == -1)  break;      if (linnum == -1)  break;
528      scanf("%lf", &a);  scanf("%lf", &b);      scanf("%lf", &a);  scanf("%lf", &b);
529      diff = 0.5*(fabs(a)+fabs(b));      abave = 0.5*(fabs(a)+fabs(b));
530      if (diff > 1.e-12) {      if (abave > 0.0) {
531        diff=fabs(a-b)/diff;        relerr=fabs(a-b)/abave;
532        if (diff > 0.0) {        if (relerr > 0.0) { linnum = (int)log10(relerr); }
533          linnum = (int)log10(diff);        else { linnum = -16 ; }
534          best = (best > linnum) ? best : linnum;        best = (best > linnum) ? best : linnum;
       }  
       else {  
         if (best == -16 && diff != 0)  best = -22;  
       }  
535      }      }
536    }    }
537      if (lncnt == 999) best=-29;
538    printf("%d\n", -best);    printf("%d\n", -best);
539    return 0;    return 0;
540  }  }
541  EOF  EOF
542      cc -o tmp_cmpnum tmp_cmpnum.c -lm      $CC -o tmp_cmpnum tmp_cmpnum.c -lm
543    
544      if [ -x ./tmp_cmpnum ]; then      if [ -x ./tmp_cmpnum ]; then
545          echo "OK"          echo "OK"
546          return 0          return 0
547      else      else
548          echo          echo
549          echo "ERROR: failed to compile comparison code"          echo "ERROR: failed to compile comparison code -- please specify"
550            echo "  a C compiler using the CC environment variable."
551          exit 1          exit 1
552      fi      fi
553  }  }
# Line 536  clean=0 Line 616  clean=0
616  expts=''  expts=''
617  # ieee=1  # ieee=1
618    
619  IEEE=  IEEE=true
620  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
621      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
622  fi  fi
# Line 557  HAVE_MPACK= Line 637  HAVE_MPACK=
637  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
638  COMMAND=  COMMAND=
639  MAKE=make  MAKE=make
640    JOBS=
641  MPI=f  MPI=f
642    DELDIR=
643    
644  ADM=  ADM=
645    
646  echo -n "parsing options...  "  # Additional monitor types
647    PTRACERS_NUM="1 2 3 4 5"
648    
649    printf "parsing options...  "
650    
651  ac_prev=  ac_prev=
652  for ac_option ; do  for ac_option ; do
# Line 610  for ac_option ; do Line 695  for ac_option ; do
695          -make=* | --make=*)          -make=* | --make=*)
696              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
697    
698            -ptracers | --ptracers | -ptr | --ptr)
699                ac_prev=PTRACERS_NUM ;;
700            -ptracers=* | --ptracers=* | -ptr=* | --ptr=*)
701                PTRACERS_NUM=$ac_optarg ;;
702    
703            -j) ac_prev=JOBS ;;
704            -j=*) JOBS=$ac_optarg ;;
705    
706          -clean | --clean)          -clean | --clean)
707              CLEANUP=t ;;              CLEANUP=t ;;
708    
# Line 633  for ac_option ; do Line 726  for ac_option ; do
726          -debug) debug=1 ;;          -debug) debug=1 ;;
727          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
728    
729            -deldir | -dd) DELDIR=t ;;
730    
731          -*)          -*)
732              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
733              usage              usage
# Line 666  if test "x$ADM" = xt -a "x$COMMAND" = x Line 761  if test "x$ADM" = xt -a "x$COMMAND" = x
761  fi  fi
762    
763  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
764      COMMAND="make output.txt"      COMMAND="$MAKE output.txt"
765  fi  fi
766    
767  echo "OK"  echo "OK"
# Line 699  if test "x$RETVAL" != x0 ; then Line 794  if test "x$RETVAL" != x0 ; then
794      exit 1      exit 1
795  fi  fi
796  SUMMARY="$DRESULTS/summary.txt"  SUMMARY="$DRESULTS/summary.txt"
797  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
798  start_date=`date`  start_date=`date`
799  echo $start_date > $SUMMARY  echo $start_date > $SUMMARY
800    
# Line 731  fi Line 826  fi
826  echo  echo
827  echo >> $SUMMARY  echo >> $SUMMARY
828  if test "x$ADM" = x ; then  if test "x$ADM" = x ; then
829      cat << EOF | tee -a $SUMMARY      line_0="            ----T-----  ----S-----  ----U-----  ----V-----"
830                  T           S           U           V      line_1="G D M    c        m  s        m  s        m  s        m  s"
831  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  ."
832  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"
833  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  ."
834  2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .      for ii in $PTRACERS_NUM ; do
835            #  tst=`eval 'echo $HAVE_PTR0'$ii`
836  EOF          #  if test "x$tst" = xt ; then
837            line_0="$line_0  --PTR 0"$ii"--"
838            line_1="$line_1        m  s"
839            line_2="$line_2  m  m  e  ."
840            line_3="$line_3  i  a  a  d"
841            line_4="$line_4  n  x  n  ."
842            #  fi
843        done
844        echo "$line_0" | tee -a $SUMMARY
845        echo "$line_1" | tee -a $SUMMARY
846        echo "$line_2" | tee -a $SUMMARY
847        echo "$line_3" | tee -a $SUMMARY
848        echo "$line_4" | tee -a $SUMMARY
849        echo " "       | tee -a $SUMMARY
850  else  else
851      echo "ADJOINT=true" >> $SUMMARY      echo "ADJOINT=true" >> $SUMMARY
852      echo >> $SUMMARY      echo >> $SUMMARY
# Line 777  for dir in $TESTDIRS ; do Line 885  for dir in $TESTDIRS ; do
885          echo "can't read \"$fout\" -- skipping $dir"          echo "can't read \"$fout\" -- skipping $dir"
886          continue          continue
887      fi      fi
888        if test "x$ADM" = x ; then
889            check_for_add_mon_output  $fout
890        fi
891    
892        # Check for additional types of monitor output
893    
894      builddir="input"      builddir="input"
895      rundir="input"      rundir="input"
# Line 788  for dir in $TESTDIRS ; do Line 901  for dir in $TESTDIRS ; do
901          linkdata $use_seperate_build $dir/$rundir          linkdata $use_seperate_build $dir/$rundir
902      fi      fi
903            
904        #  Check whether there are "extra runs" for this testdir
905        extra_runs=
906        if test "x$ADM" = x -a "x$use_seperate_build" = x1 ; then
907            ex_run_dirs=`( cd $dir ; echo input.* )`
908            echo "ex_run_dirs='$ex_run_dirs'"
909            for exd in $ex_run_dirs ; do
910                name=`echo $exd | sed -e 's/input.//g'`
911                outf="$dir/results/output.txt.$name"
912                if test -f $outf -a -r $outf ; then
913                    extra_runs="$extra_runs $name"
914                fi
915            done
916        fi
917    
918      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
919          code_dir=code          code_dir=code
920          CODE_DIR=$dir/code          CODE_DIR=$dir/code
# Line 830  for dir in $TESTDIRS ; do Line 957  for dir in $TESTDIRS ; do
957      echo      echo
958      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
959          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
960            echo
961            echo "$fres" >> $SUMMARY
962            echo "fresults='$fres'" > $CDIR"/summary.txt"
963            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
964            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
965            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
966            echo "tdir='$dir'" >> $CDIR"/summary.txt"
967    
968            for ex in $extra_runs ; do
969                test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
970                mkdir "$dir/tr_run.$ex"
971                links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
972                (
973                    cd "$dir/tr_run.$ex"
974                    for i in $links; do
975                        ln -s ../input/$i $i
976                    done
977                )
978                links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
979                (
980                    cd "$dir/tr_run.$ex"
981                    for i in $links; do
982                        test -e $i  &&  rm -f $i
983                        ln -s ../input.$ex/$i $i
984                    done
985                    ln -s ../$builddir/mitgcmuv mitgcmuv
986                )
987                runmodel $dir/tr_run.$ex && run=Y \
988                    && results=`testoutput $dir tr_run.$ex "."$ex`
989                fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
990                fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
991                fres="$fres.$ex"
992                echo
993                echo "$fres" >> $SUMMARY
994                echo "fresults='$fres'" > $CDIR"/summary.txt"
995                echo "MACH='$MACH'" >> $CDIR"/summary.txt"
996                echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
997                echo "DATE='$DATE'" >> $CDIR"/summary.txt"
998                echo "tdir='$dir'" >> $CDIR"/summary.txt"
999            done
1000      else      else
1001          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}`
1002          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
1003            echo
1004            echo "$fres" >> $SUMMARY
1005            echo "fresults='$fres'" > $CDIR"/summary.txt"
1006            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
1007            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
1008            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1009            echo "tdir='$dir'" >> $CDIR"/summary.txt"
1010      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"  
1011            
1012      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1013            
1014  done  done
1015    
1016  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
1017  echo $start_date >> $SUMMARY  echo $start_date >> $SUMMARY
1018  echo -n "End time:    " >> $SUMMARY  printf "End time:    " >> $SUMMARY
1019  date >> $SUMMARY  date >> $SUMMARY
1020    
1021  #  If addresses were supplied and mpack built successfully, then try  #  If addresses were supplied and mpack built successfully, then try
# Line 859  else Line 1026  else
1026      if test "x$HAVE_MPACK" = xt ; then      if test "x$HAVE_MPACK" = xt ; then
1027          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \
1028              && gzip $DRESULTS".tar" \              && gzip $DRESULTS".tar" \
1029              && $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES              && $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES
1030          RETVAL=$?          RETVAL=$?
1031          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
1032              echo              echo
# Line 889  if test "x$CLEANUP" != xt ; then Line 1056  if test "x$CLEANUP" != xt ; then
1056      cat $SUMMARY > tr_out.txt      cat $SUMMARY > tr_out.txt
1057  fi  fi
1058    
1059    if test "x$DELDIR" = xt ; then
1060        rm -rf $DRESULTS
1061    fi
1062    

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

  ViewVC Help
Powered by ViewVC 1.1.22