/[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.40 by edhill, Tue Jul 6 19:53:34 2004 UTC revision 1.67 by jmc, Sun Feb 6 16:58:08 2005 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"
# Line 34  usage() Line 37  usage()
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"      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    
# Line 88  testoutput_for_prop() Line 95  testoutput_for_prop()
95      fi      fi
96      if [ -r $1/$4/output.txt ]; then      if [ -r $1/$4/output.txt ]; then
97          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt          grep "$2" $1/$4/output.txt | sed 's/.*=//' | cat -n > tmp1.txt
98          lncnt=`wc -l tmp1.txt | awk '{print $1}' `          lncntA=`wc -l tmp1.txt | awk '{print $1}' `
99          if [ $lncnt -lt 3 ]; then          if [ $lncntA -lt 3 ]; then
100              if [ $verbose -gt 0 ]; then              if [ $verbose -gt 0 ]; then
101                  echo Not enough lines of output when searching for "$2" 1>&2                  echo Not enough lines of output when searching for "$2" 1>&2
102              fi              fi
# Line 103  testoutput_for_prop() Line 110  testoutput_for_prop()
110          echo testoutput_for_prop: grep "$2" $1/results/output.txt$5 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$5 | 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}' `      lncntB=`wc -l tmp2.txt | awk '{print $1}' `
114      if [ $lncnt -lt 3 ]; then      if [ $lncntB -lt 3 ]; then
115          if [ $verbose -gt 0 ]; then          if [ $verbose -gt 0 ]; then
116              echo Not enough lines of output when searching for "$2" 1>&2              echo Not enough lines of output when searching for "$2" 1>&2
117          fi          fi
118          return 99          return 99
119      fi      fi
120        if [ $lncntA -ne $lncntB ]; then
121            if [ $verbose -gt 0 ]; then
122                echo Not same Nb of lines when searching for "$2" ":" $lncntA $lncntB 1>&2
123            fi
124            return 99
125        fi
126      if [ $debug -gt 0 ]; then      if [ $debug -gt 0 ]; then
127          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2          echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2
128      fi      fi
# Line 170  testoutput_ad() Line 183  testoutput_ad()
183      rm -f t[01][56].txt t[56].txt      rm -f t[01][56].txt t[56].txt
184  }  }
185    
186    check_for_add_mon_output()
187    {
188        # Check for additional types of monitor output
189        if test "x$1" = x ; then
190            return
191        fi
192    
193        for ii in $PTRACERS_NUM ; do
194            eval "HAVE_PTR0"$ii"=f"
195        done
196    
197        ptr_add="trcstat_ptracerXX_min trcstat_ptracerXX_max"
198        ptr_add="$ptr_add trcstat_ptracerXX_mean trcstat_ptracerXX_sd"
199        for ii in $PTRACERS_NUM ; do
200            for jj in $ptr_add ; do
201                name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"`
202                tst=`grep $name $1 | wc -l | awk '{print $1}'`
203                if test ! "x$tst" = x0 ; then
204                    eval "HAVE_PTR0"$ii"=t"
205                fi
206            done
207            #  eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"'
208        done
209    }
210    
211  testoutput()  testoutput()
212  {  {
213      # testoutput directory subdir extension      # testoutput directory subdir extension
# Line 199  testoutput() Line 237  testoutput()
237          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$?          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$?
238          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$?          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$?
239          testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2 $3; vsd=$?          testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2 $3; vsd=$?
240          dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \  
241              $umin $umax $umean $usd $vmin $vmax $vmean $vsd          #  This is for PTRACERS
242            for ii in $PTRACERS_NUM ; do
243                eval `echo "p0"$ii"_min=99"`
244                eval `echo "p0"$ii"_max=99"`
245                eval `echo "p0"$ii"_mean=99"`
246                eval `echo "p0"$ii"_sd=99"`
247                tst=`eval 'echo "$HAVE_PTR0'$ii'"'`
248                #echo 'tst = '$tst
249                if test "x$tst" = xt ; then
250                    a="trcstat_ptracer0"
251                    testoutput_for_prop $1 "$a"$ii"_min"  "p0"$ii"_min"  $2 $3
252                    RETVAL=$? ; eval `echo "p0"$ii"_min="$RETVAL`
253                    testoutput_for_prop $1 "$a"$ii"_max"  "p0"$ii"_max"  $2 $3
254                    RETVAL=$? ; eval `echo "p0"$ii"_max="$RETVAL`
255                    testoutput_for_prop $1 "$a"$ii"_mean" "p0"$ii"_mean" $2 $3
256                    RETVAL=$? ; eval `echo "p0"$ii"_mean="$RETVAL`
257                    testoutput_for_prop $1 "$a"$ii"_sd"   "p0"$ii"_sd"   $2 $3
258                    RETVAL=$? ; eval `echo "p0"$ii"_sd="$RETVAL`
259                fi
260            done
261    
262            allargs="$cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd"
263            allargs="$allargs $umin $umax $umean $usd $vmin $vmax $vmean $vsd"
264            allargs="$allargs $p01_min $p01_max $p01_mean $p01_sd"
265            allargs="$allargs $p02_min $p02_max $p02_mean $p02_sd"
266            allargs="$allargs $p03_min $p03_max $p03_mean $p03_sd"
267            allargs="$allargs $p04_min $p04_max $p04_mean $p04_sd"
268            allargs="$allargs $p05_min $p05_max $p05_mean $p05_sd"
269    
270            eval "dashnum $allargs"
271    
272      else      else
273          testoutput_ad $1 $2 "precision_grdchk_result"          testoutput_ad $1 $2 "precision_grdchk_result"
274      fi      fi
# Line 232  genmakemodel() Line 300  genmakemodel()
300              if test "x$IEEE" != x ; then              if test "x$IEEE" != x ; then
301                  command="$command -ieee"                  command="$command -ieee"
302              fi              fi
303                if test "x$MPI" = xt ; then
304                    command="$command -mpi"
305                fi
306              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
307              $command > make.log 2>&1              $command > make.log 2>&1
308              RETVAL=$?              RETVAL=$?
309              cp Makefile $CDIR              #  Reduce the size of the testing emails!
310                head -100 Makefile > $CDIR/Makefile_head
311              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
312                  tail make.log                  tail make.log
313                  echo "genmakemodel: genmake failed" 1>&2                  echo "genmakemodel: genmake failed" 1>&2
# Line 307  makemodel() Line 379  makemodel()
379          if test -r Makefile ; then          if test -r Makefile ; then
380              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
381              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
382                  $MAKE >> make.log 2>&1                  if test "x$JOBS" = x ; then
383                        $MAKE >> make.log 2>&1
384                    else
385                        $MAKE -j $JOBS >> make.log 2>&1
386                    fi
387              else              else
388                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.log 2>&1
389              fi              fi
# Line 334  symlink_mpifiles() Line 410  symlink_mpifiles()
410      code_dir=$2      code_dir=$2
411      BUILD_DIR=$dir/$3      BUILD_DIR=$dir/$3
412      CODE_DIR=$dir/$code_dir      CODE_DIR=$dir/$code_dir
413        
414      # These are files that should replace their counter-part when using -mpi      # These are files that should replace their counter-part when using -mpi
415      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`      MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`
416    
# Line 349  symlink_mpifiles() Line 425  symlink_mpifiles()
425              RETVAL=$?              RETVAL=$?
426              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
427                  if ! test -f $BUILD_DIR/$i ; then                  if ! test -f $BUILD_DIR/$i ; then
428                  #echo Linking $name to $i                      #echo Linking $name to $i
429                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)                      (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)
430                  fi                  fi
431              fi              fi
432          done          done
433      else      else
434      # NO: We undo any _mpi symbolically linked files          # NO: We undo any _mpi symbolically linked files
435          for ii in $MPI_FILES ; do          for ii in $MPI_FILES ; do
436              i=`echo $ii | sed 's:^\./::'`              i=`echo $ii | sed 's:^\./::'`
437              name=`echo $i | sed 's:_mpi::' `              name=`echo $i | sed 's:_mpi::' `
438              if test -L $BUILD_DIR/$name ; then              if test -L $BUILD_DIR/$name ; then
439                  linktarg=`(cd $BUILD_DIR; readlink $name)`                  cmp $BUILD_DIR/$name "../$code_dir/$name"_mpi > /dev/null 2>&1
440                  if test $linktarg = "../$code_dir/$name"_mpi ; then                  RETVAL=$?
441                  #echo Un-linking $name from $linktarg                  if test "x$RETVAL" = x0 ; then
442                        #echo Un-linking $name from $linktarg
443                      rm -f $BUILD_DIR/$name                      rm -f $BUILD_DIR/$name
444                  fi                  fi
445              fi              fi
# Line 382  linkdata() Line 459  linkdata()
459              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
460                  files=`( cd ../input ; ls -1 | grep -v CVS )`                  files=`( cd ../input ; ls -1 | grep -v CVS )`
461                  for i in $files ; do                  for i in $files ; do
462                      if test ! -d "../input/"$i ; then                      if test ! -d "../input/"$i -a ! -f $i ; then
463                          ln -sf "../input/"$i $i                          ln -sf "../input/"$i $i
464                      fi                      fi
465                  done                  done
# Line 415  runmodel() Line 492  runmodel()
492          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
493          # make output.txt          # make output.txt
494          echo          echo
495            rm -f run.log
496          # echo "COMMAND='$COMMAND'"          # echo "COMMAND='$COMMAND'"
497          # echo "pwd='"`pwd`"'"          # echo "pwd='"`pwd`"'"
498          ( eval $COMMAND ) >> run.log 2>&1          ( eval $COMMAND ) > run.log 2>&1
499          RETVAL=$?          RETVAL=$?
500          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
501                tail run.log
502              echo successful 1>&2              echo successful 1>&2
503              if test "x$ADM" = x ; then              # === Reduce the size of the testing emails!
504                  cp output.txt $CDIR"/output.txt"              # if test "x$ADM" = x ; then
505              else              #   cp output.txt $CDIR"/output.txt"
506                  cp output.txt_adm $CDIR"/output.txt_adm"              # else
507              fi              #   cp output.txt_adm $CDIR"/output.txt_adm"
508                # fi
509                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
510              return 0              return 0
511          else          else
512              tail run.log              tail run.log
513              echo failed 1>&2              echo failed 1>&2
514              cp run.log $CDIR"/run.log"              cp run.log $CDIR"/run.log"
515                if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
516              return 1              return 1
517          fi          fi
518      )      )
# Line 446  createcodelet() Line 528  createcodelet()
528  #include <math.h>  #include <math.h>
529  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
530    int linnum,best,lncnt;    int linnum,best,lncnt;
531    double a,b,diff;    double a,b,abave,relerr;
532    best = -16;    best = -22;
533    lncnt = 0;    lncnt = 0;
534    while( 1 & (lncnt+=1) < 999 )  {    while( 1 & (lncnt+=1) < 999 )  {
535      scanf("%d", &linnum);      scanf("%d", &linnum);
536      if (linnum == -1)  break;      if (linnum == -1)  break;
537      scanf("%lf", &a);  scanf("%lf", &b);      scanf("%lf", &a);  scanf("%lf", &b);
538      diff = 0.5*(fabs(a)+fabs(b));      abave = 0.5*(fabs(a)+fabs(b));
539      if (diff > 1.e-12) {      if (abave > 0.0) {
540        diff=fabs(a-b)/diff;        relerr=fabs(a-b)/abave;
541        if (diff > 0.0) {        if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); }
542          linnum = (int)log10(diff);        else { linnum = -16 ; }
543          best = (best > linnum) ? best : linnum;        best = (best > linnum) ? best : linnum;
       }  
       else {  
         if (best == -16 && diff != 0)  best = -22;  
       }  
544      }      }
545    }    }
546    if (lncnt == 999) best=-29;    if (lncnt == 999) best=-29;
# Line 470  int main( int argc, char** argv )  { Line 548  int main( int argc, char** argv )  {
548    return 0;    return 0;
549  }  }
550  EOF  EOF
551      cc -o tmp_cmpnum tmp_cmpnum.c -lm      $CC -o tmp_cmpnum tmp_cmpnum.c -lm
552    
553      if [ -x ./tmp_cmpnum ]; then      if [ -x ./tmp_cmpnum ]; then
554          echo "OK"          echo "OK"
555          return 0          return 0
556      else      else
557          echo          echo
558          echo "ERROR: failed to compile comparison code"          echo "ERROR: failed to compile comparison code -- please specify"
559            echo "  a C compiler using the CC environment variable."
560          exit 1          exit 1
561      fi      fi
562  }  }
# Line 566  MPACKDIR="../tools/mpack-1.6" Line 645  MPACKDIR="../tools/mpack-1.6"
645  HAVE_MPACK=  HAVE_MPACK=
646  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
647  COMMAND=  COMMAND=
648  MAKE=make  if test "x$MAKE" = x ; then
649        MAKE=make
650    fi
651    if test "x$CC" = x ; then
652        CC=cc
653    fi
654    JOBS=
655  MPI=f  MPI=f
656  DELDIR=  DELDIR=
657    
658  ADM=  ADM=
659    
660    # Additional monitor types
661    PTRACERS_NUM="1 2 3 4 5"
662    
663  printf "parsing options...  "  printf "parsing options...  "
664    
665  ac_prev=  ac_prev=
# Line 621  for ac_option ; do Line 709  for ac_option ; do
709          -make=* | --make=*)          -make=* | --make=*)
710              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
711    
712            -ptracers | --ptracers | -ptr | --ptr)
713                ac_prev=PTRACERS_NUM ;;
714            -ptracers=* | --ptracers=* | -ptr=* | --ptr=*)
715                PTRACERS_NUM=$ac_optarg ;;
716    
717            -j) ac_prev=JOBS ;;
718            -j=*) JOBS=$ac_optarg ;;
719    
720          -clean | --clean)          -clean | --clean)
721              CLEANUP=t ;;              CLEANUP=t ;;
722    
# Line 679  if test "x$ADM" = xt -a "x$COMMAND" = x Line 775  if test "x$ADM" = xt -a "x$COMMAND" = x
775  fi  fi
776    
777  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
778      COMMAND="make output.txt"      COMMAND="$MAKE output.txt"
779  fi  fi
780    
781  echo "OK"  echo "OK"
# Line 744  fi Line 840  fi
840  echo  echo
841  echo >> $SUMMARY  echo >> $SUMMARY
842  if test "x$ADM" = x ; then  if test "x$ADM" = x ; then
843      cat << EOF | tee -a $SUMMARY      line_0="            ----T-----  ----S-----  ----U-----  ----V-----"
844                  T           S           U           V      line_1="G D M    c        m  s        m  s        m  s        m  s"
845  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  ."
846  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"
847  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  ."
848  2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .      for ii in $PTRACERS_NUM ; do
849            #  tst=`eval 'echo $HAVE_PTR0'$ii`
850  EOF          #  if test "x$tst" = xt ; then
851            line_0="$line_0  --PTR 0"$ii"--"
852            line_1="$line_1        m  s"
853            line_2="$line_2  m  m  e  ."
854            line_3="$line_3  i  a  a  d"
855            line_4="$line_4  n  x  n  ."
856            #  fi
857        done
858        echo "$line_0" | tee -a $SUMMARY
859        echo "$line_1" | tee -a $SUMMARY
860        echo "$line_2" | tee -a $SUMMARY
861        echo "$line_3" | tee -a $SUMMARY
862        echo "$line_4" | tee -a $SUMMARY
863        echo " "       | tee -a $SUMMARY
864  else  else
865      echo "ADJOINT=true" >> $SUMMARY      echo "ADJOINT=true" >> $SUMMARY
866      echo >> $SUMMARY      echo >> $SUMMARY
# Line 775  for dir in $TESTDIRS ; do Line 884  for dir in $TESTDIRS ; do
884          if test -r $dir/input/Makefile ; then          if test -r $dir/input/Makefile ; then
885              ( cd $dir/input ; make CLEAN )              ( cd $dir/input ; make CLEAN )
886          fi          fi
887            (
888                cd $dir
889                rm -rf tr_run.*
890            )
891          continue          continue
892      fi      fi
893    
# Line 790  for dir in $TESTDIRS ; do Line 903  for dir in $TESTDIRS ; do
903          echo "can't read \"$fout\" -- skipping $dir"          echo "can't read \"$fout\" -- skipping $dir"
904          continue          continue
905      fi      fi
906        if test "x$ADM" = x ; then
907            check_for_add_mon_output  $fout
908        fi
909    
910        # Check for additional types of monitor output
911    
912      builddir="input"      builddir="input"
913      rundir="input"      rundir="input"
# Line 865  for dir in $TESTDIRS ; do Line 983  for dir in $TESTDIRS ; do
983          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
984          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
985    
         OLD_COMMAND=$COMMAND  
         COMMAND="./mitgcmuv > output.txt"  
986          for ex in $extra_runs ; do          for ex in $extra_runs ; do
987              test -e "$dir/tr_run" && rm -rf "$dir/tr_run"              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"
988              mkdir "$dir/tr_run"              for ldir in input.$ex input ; do
989              links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`                  (
990                        cd "$dir/$ldir" > /dev/null 2>&1
991                        ls -1 2>/dev/null \
992                            | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'
993                    ) > tr_exrun_links
994                    (
995                        cd "$dir/tr_run.$ex"
996                        cat ../../tr_exrun_links | while read i ; do
997                            if test ! "x$i" = x ; then
998                                test ! -r $i  &&  ln -s "../"$ldir"/"$i $i
999                            fi
1000                        done
1001                    )
1002                    test -e tr_exrun_links  &&  rm -f tr_exrun_links
1003                done
1004                ldir=build
1005              (              (
1006                  cd "$dir/tr_run"                  cd "$dir/$ldir" > /dev/null 2>&1
1007                  for i in $links; do                  ls -1 Makefile *.[fFhco] mitgcmuv  2>/dev/null \
1008                      ln -s ../input/$i $i                      | sed -e 's|^CVS$||g' | sed -e 's|^output.txt$||g'
1009                  done              ) > tr_exrun_links
1010              )              (
1011              links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`                  cd "$dir/tr_run.$ex"
1012              (                      cat ../../tr_exrun_links | while read i ; do
1013                  cd "$dir/tr_run"                          if test ! "x$i" = x ; then
1014                  for i in $links; do                              test ! -r $i  &&  ln -s "../"$ldir"/"$i $i
1015                      test -e $i  &&  rm -f $i                          fi
1016                      ln -s ../input.$ex/$i $i                      done
                 done  
                 ln -s ../$builddir/mitgcmuv mitgcmuv  
1017              )              )
1018              runmodel $dir/tr_run && run=Y \              test -e tr_exrun_links  &&  rm -f tr_exrun_links
1019                  && results=`testoutput $dir tr_run "."$ex`              runmodel $dir/tr_run.$ex && run=Y \
1020                    && results=`testoutput $dir tr_run.$ex "."$ex`
1021              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}`
1022              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1023              fres="$fres.$ex"              fres="$fres.$ex"
# Line 899  for dir in $TESTDIRS ; do Line 1029  for dir in $TESTDIRS ; do
1029              echo "DATE='$DATE'" >> $CDIR"/summary.txt"              echo "DATE='$DATE'" >> $CDIR"/summary.txt"
1030              echo "tdir='$dir'" >> $CDIR"/summary.txt"              echo "tdir='$dir'" >> $CDIR"/summary.txt"
1031          done          done
         COMMAND=$OLD_COMMAND  
1032      else      else
1033          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}`
1034          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
# Line 929  else Line 1058  else
1058      if test "x$HAVE_MPACK" = xt ; then      if test "x$HAVE_MPACK" = xt ; then
1059          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \
1060              && gzip $DRESULTS".tar" \              && gzip $DRESULTS".tar" \
1061              && $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES              && $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES
1062          RETVAL=$?          RETVAL=$?
1063          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
1064              echo              echo
# Line 952  fi Line 1081  fi
1081  rm -f tmp_cmpnum.c tmp_cmpnum  rm -f tmp_cmpnum.c tmp_cmpnum
1082    
1083  if test "x$CLEANUP" != xt ; then  if test "x$CLEANUP" != xt ; then
1084      cat $SUMMARY      cat $SUMMARY | sed 's/ -- -- -- --//g'
1085      if test -e tr_out.txt ; then      if test -e tr_out.txt ; then
1086          mv tr_out.txt tr_out.txt.old          mv tr_out.txt tr_out.txt.old
1087      fi      fi
1088      cat $SUMMARY > tr_out.txt      cat $SUMMARY | sed 's/ -- -- -- --//g' > tr_out.txt
1089  fi  fi
1090    
1091  if test "x$DELDIR" = xt ; then  if test "x$DELDIR" = xt ; then

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.67

  ViewVC Help
Powered by ViewVC 1.1.22