/[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.24 by edhill, Sun Nov 30 01:28:51 2003 UTC revision 1.43 by edhill, Thu Jul 8 20:58: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          ( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1          if test "x$CC" = x ; then
61                export CC=cc
62            fi
63            ( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1
64          RETVAL=$?          RETVAL=$?
65          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
66              echo              echo
# Line 63  build_mpack() Line 68  build_mpack()
68              echo              echo
69              HAVE_MPACK=f              HAVE_MPACK=f
70          else          else
71                rm -f tr_build_mpack.out
72              HAVE_MPACK=t              HAVE_MPACK=t
73          fi          fi
74      else      else
# Line 73  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 95  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 167  testoutput_ad() Line 173  testoutput_ad()
173    
174  testoutput()  testoutput()
175  {  {
176      # testoutput directory subdir      # testoutput directory subdir extension
177      #      #
178      #  test output in "directory"      #  test output in "directory"
179      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
180          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
181              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2              echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2
182          fi          fi
183          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=$?
184          if [ $debug -gt 0 ]; then          if [ $debug -gt 0 ]; then
185              echo testoutput: cg2dres=$cg2dres 1>&2              echo testoutput: cg2dres=$cg2dres 1>&2
186          fi          fi
187          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2; tmin=$?          testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2 $3; tmin=$?
188          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2; tmax=$?          testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2 $3; tmax=$?
189          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2; tmean=$?          testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2 $3; tmean=$?
190          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=$?
191          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2; smin=$?          testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2 $3; smin=$?
192          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2; smax=$?          testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2 $3; smax=$?
193          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2; smean=$?          testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2 $3; smean=$?
194          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=$?
195          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2; umin=$?          testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2 $3; umin=$?
196          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2; umax=$?          testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2 $3; umax=$?
197          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2; umean=$?          testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2 $3; umean=$?
198          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=$?
199          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2; vmin=$?          testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2 $3; vmin=$?
200          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2; vmax=$?          testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2 $3; vmax=$?
201          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2; vmean=$?          testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2 $3; vmean=$?
202          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=$?
203          dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \          dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \
204              $umin $umax $umean $usd $vmin $vmax $vmean $vsd              $umin $umax $umean $usd $vmin $vmax $vmean $vsd
205      else      else
# Line 207  genmakemodel() Line 213  genmakemodel()
213      if test "x$NOGENMAKE" = xt ; then      if test "x$NOGENMAKE" = xt ; then
214          echo "genmake skipped!"          echo "genmake skipped!"
215      else      else
216          GENMAKE2="$BASH ../../../tools/genmake2"          if test "x$BASH" = x ; then
217                GENMAKE2="../../../tools/genmake2"
218            else
219                GENMAKE2="$BASH ../../../tools/genmake2 -bash $BASH"
220            fi
221          (          (
222              cd $1;              cd $1;
223              command="$GENMAKE2  -ds -m $MAKE"              command="$GENMAKE2  -ds -m $MAKE"
# Line 298  makemodel() Line 308  makemodel()
308          if test -r Makefile ; then          if test -r Makefile ; then
309              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
310              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
311                  $MAKE >> make.log 2>&1                  if test "x$JOBS" = x ; then
312                        $MAKE >> make.log 2>&1
313                    else
314                        $MAKE -j $JOBS >> make.log 2>&1
315                    fi
316              else              else
317                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.log 2>&1
318              fi              fi
# Line 315  makemodel() Line 329  makemodel()
329      )      )
330  }  }
331    
332    symlink_mpifiles()
333    {
334        # Put special links so that MPI specific files are used
335        # This MUST be invoked between makeclean and makelinks because
336        # the Makefile will link to non-mpi files by default
337    
338        dir=$1
339        code_dir=$2
340        BUILD_DIR=$dir/$3
341        CODE_DIR=$dir/$code_dir
342    
343        # These are files that should replace their counter-part when using -mpi
344        MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`
345    
346        #  Is this an MPI run?
347        if test "x$MPI" = xt ; then
348            # YES: We symbolically link these files to the build
349            # dir so long as there is no real file in place
350            for ii in $MPI_FILES ; do
351                i=`echo $ii | sed 's:^\./::'`
352                name=`echo $i | sed 's:_mpi::' `
353                cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1
354                RETVAL=$?
355                if test "x$RETVAL" != x0 ; then
356                    if ! test -f $BUILD_DIR/$i ; then
357                    #echo Linking $name to $i
358                        (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)
359                    fi
360                fi
361            done
362        else
363        # NO: We undo any _mpi symbolically linked files
364            for ii in $MPI_FILES ; do
365                i=`echo $ii | sed 's:^\./::'`
366                name=`echo $i | sed 's:_mpi::' `
367                if test -L $BUILD_DIR/$name ; then
368                    linktarg=`(cd $BUILD_DIR; readlink $name)`
369                    if test $linktarg = "../$code_dir/$name"_mpi ; then
370                    #echo Un-linking $name from $linktarg
371                        rm -f $BUILD_DIR/$name
372                    fi
373                fi
374            done
375        fi
376        
377    }
378    
379  linkdata()  linkdata()
380  {  {
381      # linkdata flag      # linkdata flag
# Line 358  runmodel() Line 419  runmodel()
419          cd $1          cd $1
420          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
421          # make output.txt          # make output.txt
422          $COMMAND >> run.log 2>&1          echo
423            # echo "COMMAND='$COMMAND'"
424            # echo "pwd='"`pwd`"'"
425            ( eval $COMMAND ) >> run.log 2>&1
426          RETVAL=$?          RETVAL=$?
427          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
428              echo successful 1>&2              echo successful 1>&2
# Line 381  createcodelet() Line 445  createcodelet()
445  {  {
446      # create codelet for comparing model output      # create codelet for comparing model output
447    
448      echo -n "creating the comparison code...  "      printf "creating the comparison code...  "
449      cat > tmp_cmpnum.c <<EOF      cat > tmp_cmpnum.c <<EOF
450  #include <stdio.h>  #include <stdio.h>
451  #include <math.h>  #include <math.h>
452  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
453    int linnum,best;    int linnum,best,lncnt;
454    double a,b,diff;    double a,b,diff;
455    best = -16;    best = -16;
456    while( 1 )  {    lncnt = 0;
457      while( 1 & (lncnt+=1) < 999 )  {
458      scanf("%d", &linnum);      scanf("%d", &linnum);
459      if (linnum == -1)  break;      if (linnum == -1)  break;
460      scanf("%lf", &a);  scanf("%lf", &b);      scanf("%lf", &a);  scanf("%lf", &b);
# Line 405  int main( int argc, char** argv )  { Line 470  int main( int argc, char** argv )  {
470        }        }
471      }      }
472    }    }
473      if (lncnt == 999) best=-29;
474    printf("%d\n", -best);    printf("%d\n", -best);
475    return 0;    return 0;
476  }  }
# Line 485  clean=0 Line 551  clean=0
551  expts=''  expts=''
552  # ieee=1  # ieee=1
553    
554  IEEE=  IEEE=true
555  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
556      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
557  fi  fi
# Line 506  HAVE_MPACK= Line 572  HAVE_MPACK=
572  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
573  COMMAND=  COMMAND=
574  MAKE=make  MAKE=make
575    JOBS=
576  MPI=f  MPI=f
577    DELDIR=
578    
579  ADM=  ADM=
580    
581  echo -n "parsing options...  "  printf "parsing options...  "
582    
583  ac_prev=  ac_prev=
584  for ac_option ; do  for ac_option ; do
# Line 559  for ac_option ; do Line 627  for ac_option ; do
627          -make=* | --make=*)          -make=* | --make=*)
628              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
629    
630            -j) ac_prev=JOBS ;;
631            -j=*) JOBS=$ac_optarg ;;
632    
633          -clean | --clean)          -clean | --clean)
634              CLEANUP=t ;;              CLEANUP=t ;;
635    
# Line 582  for ac_option ; do Line 653  for ac_option ; do
653          -debug) debug=1 ;;          -debug) debug=1 ;;
654          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
655    
656            -deldir | -dd) DELDIR=t ;;
657    
658          -*)          -*)
659              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
660              usage              usage
# Line 624  echo "OK" Line 697  echo "OK"
697  createcodelet  createcodelet
698    
699  #  build the mpack utility  #  build the mpack utility
700  build_mpack  if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then
701        echo "skipping mpack build"
702    else
703        build_mpack
704    fi
705    
706  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
707  MACH=`hostname`  MACH=`hostname`
708  UNAMEA=`uname -a`  UNAMEA=`uname -a`
709  DATE=`date +%Y%m%d`  DATE=`date +%Y%m%d`
710  BASE=$MACH"_"$DATE"_"  BASE="tr_"$MACH"_"$DATE"_"
711  DNUM=0  DNUM=0
712  DRESULTS="$BASE$DNUM"  DRESULTS="$BASE$DNUM"
713  while test -e $DRESULTS ; do  while test -e $DRESULTS ; do
# Line 644  if test "x$RETVAL" != x0 ; then Line 721  if test "x$RETVAL" != x0 ; then
721      exit 1      exit 1
722  fi  fi
723  SUMMARY="$DRESULTS/summary.txt"  SUMMARY="$DRESULTS/summary.txt"
724  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
725  start_date=`date`  start_date=`date`
726  echo $start_date > $SUMMARY  echo $start_date > $SUMMARY
727    
# Line 723  for dir in $TESTDIRS ; do Line 800  for dir in $TESTDIRS ; do
800          continue          continue
801      fi      fi
802    
     echo "-------------------------------------------------------------------------------"  
     echo  
     echo "Experiment:  $dir"  
     echo  
     unset genmake makedepend make run  
     results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'  
   
803      builddir="input"      builddir="input"
804      rundir="input"      rundir="input"
805      use_seperate_build=0      use_seperate_build=0
# Line 740  for dir in $TESTDIRS ; do Line 810  for dir in $TESTDIRS ; do
810          linkdata $use_seperate_build $dir/$rundir          linkdata $use_seperate_build $dir/$rundir
811      fi      fi
812            
813        #  Check whether there are "extra runs" for this testdir
814        extra_runs=
815        if test "x$ADM" = x -a "x$use_seperate_build" = x1 ; then
816            ex_run_dirs=`( cd $dir ; echo input.* )`
817            echo "ex_run_dirs='$ex_run_dirs'"
818            for exd in $ex_run_dirs ; do
819                name=`echo $exd | sed -e 's/input.//g'`
820                outf="$dir/results/output.txt.$name"
821                if test -f $outf -a -r $outf ; then
822                    extra_runs="$extra_runs $name"
823                fi
824            done
825        fi
826    
827      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
828            code_dir=code
829          CODE_DIR=$dir/code          CODE_DIR=$dir/code
830      else      else
831            code_dir=code_ad
832          CODE_DIR=$dir/code_ad          CODE_DIR=$dir/code_ad
833      fi      fi
834      BUILD_DIR=$dir/$builddir      BUILD_DIR=$dir/$builddir
     MPI_FILES="CPP_EEOPTIONS.h_mpi SIZE.h_mpi"  
     NOMPI_FILES="CPP_EEOPTIONS.h_nompi SIZE.h_nompi"  
835    
836      #  Is this an MPI run?      if test ! -r $CODE_DIR"/SIZE.h_mpi" -a "x$MPI" = "xt" ; then
837      if test "x$MPI" = xt ; then          echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"
         FILES=$MPI_FILES  
         endings="_mpi"  
     else  
         FILES=$NOMPI_FILES  
         endings="_nompi"  
     fi  
       
     #  Check to see that we have the files  
     have_files=t  
     for i in $FILES ; do  
         if test ! -r $CODE_DIR/$i ; then  
             echo "Warning: can't read file $CODE_DIR/$i"  
             have_files=f  
         fi  
     done  
     if test "x$have_files" != xt -a "x$MPI" = xt ; then  
         echo "Skipping $dir due to lack of input files (see above warning)"  
838          continue          continue
839      fi      fi
840        
841      #  If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR      echo "-------------------------------------------------------------------------------"
842      if test "x$have_files" = xt ; then      echo
843          for i in $FILES ; do      echo "Experiment:  $dir"
844              sstr="s|$endings||"      echo
845              name=`echo $i | sed -e $sstr `      unset genmake makedepend make run
846              cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1      results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'
847              RETVAL=$?  
             if test "x$RETVAL" != x0 ; then  
                 cp $CODE_DIR/$i $BUILD_DIR/$name  
             fi  
         done  
     fi  
       
848      #  Create an output dir for each OPTFILE/tdir combination      #  Create an output dir for each OPTFILE/tdir combination
849      rel_CDIR=$DRESULTS"/"$dir      rel_CDIR=$DRESULTS"/"$dir
850      mkdir $rel_CDIR      mkdir $rel_CDIR
# Line 794  for dir in $TESTDIRS ; do Line 855  for dir in $TESTDIRS ; do
855      else      else
856          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
857              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
858                && symlink_mpifiles $dir $code_dir $builddir \
859              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
860              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
861              && linkdata $use_seperate_build $dir/$rundir \              && linkdata $use_seperate_build $dir/$rundir \
# Line 804  for dir in $TESTDIRS ; do Line 866  for dir in $TESTDIRS ; do
866      echo      echo
867      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
868          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
869            echo
870            echo "$fres" >> $SUMMARY
871            echo "fresults='$fres'" > $CDIR"/summary.txt"
872            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
873            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
874            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
875            echo "tdir='$dir'" >> $CDIR"/summary.txt"
876    
877            OLD_COMMAND=$COMMAND
878            COMMAND="./mitgcmuv > output.txt"
879            for ex in $extra_runs ; do
880                test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
881                mkdir "$dir/tr_run.$ex"
882                links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
883                (
884                    cd "$dir/tr_run.$ex"
885                    for i in $links; do
886                        ln -s ../input/$i $i
887                    done
888                )
889                links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
890                (
891                    cd "$dir/tr_run.$ex"
892                    for i in $links; do
893                        test -e $i  &&  rm -f $i
894                        ln -s ../input.$ex/$i $i
895                    done
896                    ln -s ../$builddir/mitgcmuv mitgcmuv
897                )
898                runmodel $dir/tr_run.$ex && run=Y \
899                    && results=`testoutput $dir tr_run.$ex "."$ex`
900                fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
901                fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
902                fres="$fres.$ex"
903                echo
904                echo "$fres" >> $SUMMARY
905                echo "fresults='$fres'" > $CDIR"/summary.txt"
906                echo "MACH='$MACH'" >> $CDIR"/summary.txt"
907                echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
908                echo "DATE='$DATE'" >> $CDIR"/summary.txt"
909                echo "tdir='$dir'" >> $CDIR"/summary.txt"
910            done
911            COMMAND=$OLD_COMMAND
912      else      else
913          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}`
914          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
915            echo
916            echo "$fres" >> $SUMMARY
917            echo "fresults='$fres'" > $CDIR"/summary.txt"
918            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
919            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
920            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
921            echo "tdir='$dir'" >> $CDIR"/summary.txt"
922      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"  
923            
924      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
925            
926  done  done
927    
928  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
929  echo $start_date >> $SUMMARY  echo $start_date >> $SUMMARY
930  echo -n "End time:    " >> $SUMMARY  printf "End time:    " >> $SUMMARY
931  date >> $SUMMARY  date >> $SUMMARY
932    
933  #  If addresses were supplied and mpack built successfully, then try  #  If addresses were supplied and mpack built successfully, then try
# Line 857  rm -f tmp_cmpnum.c tmp_cmpnum Line 962  rm -f tmp_cmpnum.c tmp_cmpnum
962    
963  if test "x$CLEANUP" != xt ; then  if test "x$CLEANUP" != xt ; then
964      cat $SUMMARY      cat $SUMMARY
965      if test -e tr.out ; then      if test -e tr_out.txt ; then
966          mv tr.out tr.out.old          mv tr_out.txt tr_out.txt.old
967      fi      fi
968      cat $SUMMARY > tr.out      cat $SUMMARY > tr_out.txt
969    fi
970    
971    if test "x$DELDIR" = xt ; then
972        rm -rf $DRESULTS
973  fi  fi
974    

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.22