/[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.26 by edhill, Fri Dec 5 14:56:45 2003 UTC revision 1.45 by edhill, Sat Jul 17 02:08:45 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 171  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 211  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 230  genmakemodel() Line 236  genmakemodel()
236              printf 'genmake ... ' 1>&2              printf 'genmake ... ' 1>&2
237              $command > make.log 2>&1              $command > make.log 2>&1
238              RETVAL=$?              RETVAL=$?
239              cp Makefile $CDIR              #  Reduce the size of the testing emails!
240                #  cp Makefile $CDIR
241              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
242                  tail make.log                  tail make.log
243                  echo "genmakemodel: genmake failed" 1>&2                  echo "genmakemodel: genmake failed" 1>&2
# Line 302  makemodel() Line 309  makemodel()
309          if test -r Makefile ; then          if test -r Makefile ; then
310              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
311              if test "x$ADM" = x ; then              if test "x$ADM" = x ; then
312                  $MAKE >> make.log 2>&1                  if test "x$JOBS" = x ; then
313                        $MAKE >> make.log 2>&1
314                    else
315                        $MAKE -j $JOBS >> make.log 2>&1
316                    fi
317              else              else
318                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.log 2>&1
319              fi              fi
# Line 319  makemodel() Line 330  makemodel()
330      )      )
331  }  }
332    
333    symlink_mpifiles()
334    {
335        # Put special links so that MPI specific files are used
336        # This MUST be invoked between makeclean and makelinks because
337        # the Makefile will link to non-mpi files by default
338    
339        dir=$1
340        code_dir=$2
341        BUILD_DIR=$dir/$3
342        CODE_DIR=$dir/$code_dir
343        
344        # These are files that should replace their counter-part when using -mpi
345        MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")`
346    
347        #  Is this an MPI run?
348        if test "x$MPI" = xt ; then
349            # YES: We symbolically link these files to the build
350            # dir so long as there is no real file in place
351            for ii in $MPI_FILES ; do
352                i=`echo $ii | sed 's:^\./::'`
353                name=`echo $i | sed 's:_mpi::' `
354                cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1
355                RETVAL=$?
356                if test "x$RETVAL" != x0 ; then
357                    if ! test -f $BUILD_DIR/$i ; then
358                        #echo Linking $name to $i
359                        (cd $BUILD_DIR; ln -sf ../$code_dir/$i $name)
360                    fi
361                fi
362            done
363        else
364            # NO: We undo any _mpi symbolically linked files
365            for ii in $MPI_FILES ; do
366                i=`echo $ii | sed 's:^\./::'`
367                name=`echo $i | sed 's:_mpi::' `
368                if test -L $BUILD_DIR/$name ; then
369                    cmp $BUILD_DIR/$name "../$code_dir/$name"_mpi > /dev/null 2>&1
370                    RETVAL=$?
371                    if test "x$RETVAL" = x0 ; then
372                        #echo Un-linking $name from $linktarg
373                        rm -f $BUILD_DIR/$name
374                    fi
375                fi
376            done
377        fi
378        
379    }
380    
381  linkdata()  linkdata()
382  {  {
383      # linkdata flag      # linkdata flag
# Line 362  runmodel() Line 421  runmodel()
421          cd $1          cd $1
422          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
423          # make output.txt          # make output.txt
424          $COMMAND >> run.log 2>&1          echo
425            # echo "COMMAND='$COMMAND'"
426            # echo "pwd='"`pwd`"'"
427            ( eval $COMMAND ) >> run.log 2>&1
428          RETVAL=$?          RETVAL=$?
429          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
430              echo successful 1>&2              echo successful 1>&2
431              if test "x$ADM" = x ; then              # === Reduce the size of the testing emails!
432                  cp output.txt $CDIR"/output.txt"              # if test "x$ADM" = x ; then
433              else              #   cp output.txt $CDIR"/output.txt"
434                  cp output.txt_adm $CDIR"/output.txt_adm"              # else
435              fi              #   cp output.txt_adm $CDIR"/output.txt_adm"
436                # fi
437              return 0              return 0
438          else          else
439              tail run.log              tail run.log
# Line 385  createcodelet() Line 448  createcodelet()
448  {  {
449      # create codelet for comparing model output      # create codelet for comparing model output
450    
451      echo -n "creating the comparison code...  "      printf "creating the comparison code...  "
452      cat > tmp_cmpnum.c <<EOF      cat > tmp_cmpnum.c <<EOF
453  #include <stdio.h>  #include <stdio.h>
454  #include <math.h>  #include <math.h>
455  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
456    int linnum,best;    int linnum,best,lncnt;
457    double a,b,diff;    double a,b,diff;
458    best = -16;    best = -16;
459    while( 1 )  {    lncnt = 0;
460      while( 1 & (lncnt+=1) < 999 )  {
461      scanf("%d", &linnum);      scanf("%d", &linnum);
462      if (linnum == -1)  break;      if (linnum == -1)  break;
463      scanf("%lf", &a);  scanf("%lf", &b);      scanf("%lf", &a);  scanf("%lf", &b);
# Line 409  int main( int argc, char** argv )  { Line 473  int main( int argc, char** argv )  {
473        }        }
474      }      }
475    }    }
476      if (lncnt == 999) best=-29;
477    printf("%d\n", -best);    printf("%d\n", -best);
478    return 0;    return 0;
479  }  }
# Line 489  clean=0 Line 554  clean=0
554  expts=''  expts=''
555  # ieee=1  # ieee=1
556    
557  IEEE=  IEEE=true
558  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
559      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
560  fi  fi
# Line 510  HAVE_MPACK= Line 575  HAVE_MPACK=
575  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
576  COMMAND=  COMMAND=
577  MAKE=make  MAKE=make
578    JOBS=
579  MPI=f  MPI=f
580    DELDIR=
581    
582  ADM=  ADM=
583    
584  echo -n "parsing options...  "  printf "parsing options...  "
585    
586  ac_prev=  ac_prev=
587  for ac_option ; do  for ac_option ; do
# Line 563  for ac_option ; do Line 630  for ac_option ; do
630          -make=* | --make=*)          -make=* | --make=*)
631              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
632    
633            -j) ac_prev=JOBS ;;
634            -j=*) JOBS=$ac_optarg ;;
635    
636          -clean | --clean)          -clean | --clean)
637              CLEANUP=t ;;              CLEANUP=t ;;
638    
# Line 586  for ac_option ; do Line 656  for ac_option ; do
656          -debug) debug=1 ;;          -debug) debug=1 ;;
657          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
658    
659            -deldir | -dd) DELDIR=t ;;
660    
661          -*)          -*)
662              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
663              usage              usage
# Line 619  if test "x$ADM" = xt -a "x$COMMAND" = x Line 691  if test "x$ADM" = xt -a "x$COMMAND" = x
691  fi  fi
692    
693  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
694      COMMAND="make output.txt"      COMMAND="$MAKE output.txt"
695  fi  fi
696    
697  echo "OK"  echo "OK"
# Line 628  echo "OK" Line 700  echo "OK"
700  createcodelet  createcodelet
701    
702  #  build the mpack utility  #  build the mpack utility
703  build_mpack  if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then
704        echo "skipping mpack build"
705    else
706        build_mpack
707    fi
708    
709  #  Create a uniquely named directory to store results  #  Create a uniquely named directory to store results
710  MACH=`hostname`  MACH=`hostname`
# Line 648  if test "x$RETVAL" != x0 ; then Line 724  if test "x$RETVAL" != x0 ; then
724      exit 1      exit 1
725  fi  fi
726  SUMMARY="$DRESULTS/summary.txt"  SUMMARY="$DRESULTS/summary.txt"
727  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
728  start_date=`date`  start_date=`date`
729  echo $start_date > $SUMMARY  echo $start_date > $SUMMARY
730    
# Line 727  for dir in $TESTDIRS ; do Line 803  for dir in $TESTDIRS ; do
803          continue          continue
804      fi      fi
805    
     echo "-------------------------------------------------------------------------------"  
     echo  
     echo "Experiment:  $dir"  
     echo  
     unset genmake makedepend make run  
     results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'  
   
806      builddir="input"      builddir="input"
807      rundir="input"      rundir="input"
808      use_seperate_build=0      use_seperate_build=0
# Line 744  for dir in $TESTDIRS ; do Line 813  for dir in $TESTDIRS ; do
813          linkdata $use_seperate_build $dir/$rundir          linkdata $use_seperate_build $dir/$rundir
814      fi      fi
815            
816        #  Check whether there are "extra runs" for this testdir
817        extra_runs=
818        if test "x$ADM" = x -a "x$use_seperate_build" = x1 ; then
819            ex_run_dirs=`( cd $dir ; echo input.* )`
820            echo "ex_run_dirs='$ex_run_dirs'"
821            for exd in $ex_run_dirs ; do
822                name=`echo $exd | sed -e 's/input.//g'`
823                outf="$dir/results/output.txt.$name"
824                if test -f $outf -a -r $outf ; then
825                    extra_runs="$extra_runs $name"
826                fi
827            done
828        fi
829    
830      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
831            code_dir=code
832          CODE_DIR=$dir/code          CODE_DIR=$dir/code
833      else      else
834            code_dir=code_ad
835          CODE_DIR=$dir/code_ad          CODE_DIR=$dir/code_ad
836      fi      fi
837      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"  
838    
839      #  Is this an MPI run?      if test ! -r $CODE_DIR"/SIZE.h_mpi" -a "x$MPI" = "xt" ; then
840      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)"  
841          continue          continue
842      fi      fi
843        
844      #  If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR      echo "-------------------------------------------------------------------------------"
845      if test "x$have_files" = xt ; then      echo
846          for i in $FILES ; do      echo "Experiment:  $dir"
847              sstr="s|$endings||"      echo
848              name=`echo $i | sed -e $sstr `      unset genmake makedepend make run
849              cmp $CODE_DIR/$i $BUILD_DIR/$name > /dev/null 2>&1      results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'
850              RETVAL=$?  
             if test "x$RETVAL" != x0 ; then  
                 cp $CODE_DIR/$i $BUILD_DIR/$name  
             fi  
         done  
     fi  
       
851      #  Create an output dir for each OPTFILE/tdir combination      #  Create an output dir for each OPTFILE/tdir combination
852      rel_CDIR=$DRESULTS"/"$dir      rel_CDIR=$DRESULTS"/"$dir
853      mkdir $rel_CDIR      mkdir $rel_CDIR
# Line 798  for dir in $TESTDIRS ; do Line 858  for dir in $TESTDIRS ; do
858      else      else
859          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
860              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
861                && symlink_mpifiles $dir $code_dir $builddir \
862              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
863              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
864              && linkdata $use_seperate_build $dir/$rundir \              && linkdata $use_seperate_build $dir/$rundir \
# Line 808  for dir in $TESTDIRS ; do Line 869  for dir in $TESTDIRS ; do
869      echo      echo
870      if test "x$ADM" = x ; then      if test "x$ADM" = x ; then
871          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
872            echo
873            echo "$fres" >> $SUMMARY
874            echo "fresults='$fres'" > $CDIR"/summary.txt"
875            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
876            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
877            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
878            echo "tdir='$dir'" >> $CDIR"/summary.txt"
879    
880            OLD_COMMAND=$COMMAND
881            COMMAND="./mitgcmuv > output.txt"
882            for ex in $extra_runs ; do
883                test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
884                mkdir "$dir/tr_run.$ex"
885                links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
886                (
887                    cd "$dir/tr_run.$ex"
888                    for i in $links; do
889                        ln -s ../input/$i $i
890                    done
891                )
892                links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
893                (
894                    cd "$dir/tr_run.$ex"
895                    for i in $links; do
896                        test -e $i  &&  rm -f $i
897                        ln -s ../input.$ex/$i $i
898                    done
899                    ln -s ../$builddir/mitgcmuv mitgcmuv
900                )
901                runmodel $dir/tr_run.$ex && run=Y \
902                    && results=`testoutput $dir tr_run.$ex "."$ex`
903                fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}`
904                fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
905                fres="$fres.$ex"
906                echo
907                echo "$fres" >> $SUMMARY
908                echo "fresults='$fres'" > $CDIR"/summary.txt"
909                echo "MACH='$MACH'" >> $CDIR"/summary.txt"
910                echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
911                echo "DATE='$DATE'" >> $CDIR"/summary.txt"
912                echo "tdir='$dir'" >> $CDIR"/summary.txt"
913            done
914            COMMAND=$OLD_COMMAND
915      else      else
916          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}`
917          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
918            echo
919            echo "$fres" >> $SUMMARY
920            echo "fresults='$fres'" > $CDIR"/summary.txt"
921            echo "MACH='$MACH'" >> $CDIR"/summary.txt"
922            echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
923            echo "DATE='$DATE'" >> $CDIR"/summary.txt"
924            echo "tdir='$dir'" >> $CDIR"/summary.txt"
925      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"  
926            
927      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
928            
929  done  done
930    
931  echo -n "Start time:  " >> $SUMMARY  printf "Start time:  " >> $SUMMARY
932  echo $start_date >> $SUMMARY  echo $start_date >> $SUMMARY
933  echo -n "End time:    " >> $SUMMARY  printf "End time:    " >> $SUMMARY
934  date >> $SUMMARY  date >> $SUMMARY
935    
936  #  If addresses were supplied and mpack built successfully, then try  #  If addresses were supplied and mpack built successfully, then try
# Line 837  else Line 941  else
941      if test "x$HAVE_MPACK" = xt ; then      if test "x$HAVE_MPACK" = xt ; then
942          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \
943              && gzip $DRESULTS".tar" \              && gzip $DRESULTS".tar" \
944              && $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES              && $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES
945          RETVAL=$?          RETVAL=$?
946          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
947              echo              echo
# Line 867  if test "x$CLEANUP" != xt ; then Line 971  if test "x$CLEANUP" != xt ; then
971      cat $SUMMARY > tr_out.txt      cat $SUMMARY > tr_out.txt
972  fi  fi
973    
974    if test "x$DELDIR" = xt ; then
975        rm -rf $DRESULTS
976    fi
977    

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.22