/[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.34 by edhill, Fri Mar 12 02:44:34 2004 UTC revision 1.44 by edhill, Mon Jul 12 14:02:25 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 234  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 306  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 413  runmodel() Line 420  runmodel()
420          cd $1          cd $1
421          printf 'runmodel ... ' 1>&2          printf 'runmodel ... ' 1>&2
422          # make output.txt          # make output.txt
423          $COMMAND >> run.log 2>&1          echo
424            # echo "COMMAND='$COMMAND'"
425            # echo "pwd='"`pwd`"'"
426            ( eval $COMMAND ) >> run.log 2>&1
427          RETVAL=$?          RETVAL=$?
428          if test "x$RETVAL" = x0 ; then          if test "x$RETVAL" = x0 ; then
429              echo successful 1>&2              echo successful 1>&2
430              if test "x$ADM" = x ; then              # === Reduce the size of the testing emails!
431                  cp output.txt $CDIR"/output.txt"              # if test "x$ADM" = x ; then
432              else              #   cp output.txt $CDIR"/output.txt"
433                  cp output.txt_adm $CDIR"/output.txt_adm"              # else
434              fi              #   cp output.txt_adm $CDIR"/output.txt_adm"
435                # fi
436              return 0              return 0
437          else          else
438              tail run.log              tail run.log
# Line 542  clean=0 Line 553  clean=0
553  expts=''  expts=''
554  # ieee=1  # ieee=1
555    
556  IEEE=  IEEE=true
557  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
558      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
559  fi  fi
# Line 563  HAVE_MPACK= Line 574  HAVE_MPACK=
574  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
575  COMMAND=  COMMAND=
576  MAKE=make  MAKE=make
577    JOBS=
578  MPI=f  MPI=f
579    DELDIR=
580    
581  ADM=  ADM=
582    
# Line 616  for ac_option ; do Line 629  for ac_option ; do
629          -make=* | --make=*)          -make=* | --make=*)
630              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
631    
632            -j) ac_prev=JOBS ;;
633            -j=*) JOBS=$ac_optarg ;;
634    
635          -clean | --clean)          -clean | --clean)
636              CLEANUP=t ;;              CLEANUP=t ;;
637    
# Line 639  for ac_option ; do Line 655  for ac_option ; do
655          -debug) debug=1 ;;          -debug) debug=1 ;;
656          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
657    
658            -deldir | -dd) DELDIR=t ;;
659    
660          -*)          -*)
661              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
662              usage              usage
# Line 858  for dir in $TESTDIRS ; do Line 876  for dir in $TESTDIRS ; do
876          echo "DATE='$DATE'" >> $CDIR"/summary.txt"          echo "DATE='$DATE'" >> $CDIR"/summary.txt"
877          echo "tdir='$dir'" >> $CDIR"/summary.txt"          echo "tdir='$dir'" >> $CDIR"/summary.txt"
878    
879            OLD_COMMAND=$COMMAND
880            COMMAND="./mitgcmuv > output.txt"
881          for ex in $extra_runs ; do          for ex in $extra_runs ; do
882              test -e "$dir/tr_run" && rm -rf "$dir/tr_run"              test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
883              mkdir "$dir/tr_run"              mkdir "$dir/tr_run.$ex"
884              ( cd "$dir/input" ; links=`ls -1 | grep -v CVS` )              links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
885              (              (
886                  cd "$dir/tr_run"                  cd "$dir/tr_run.$ex"
887                  for i in $links; do                  for i in $links; do
888                      ln -s ../input/$i $i                      ln -s ../input/$i $i
889                  done                  done
890              )              )
891              ( cd "$dir/input.$ex" ; links=`ls -1 | grep -v CVS` )              links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
892              (              (
893                  cd "$dir/tr_run"                  cd "$dir/tr_run.$ex"
894                  for i in $links; do                  for i in $links; do
895                      test -e $i  &&  rm -f $i                      test -e $i  &&  rm -f $i
896                      ln -s ../input.$ex/$i $i                      ln -s ../input.$ex/$i $i
897                  done                  done
                 ln -s ../$builddir/Makefile Makefile  
898                  ln -s ../$builddir/mitgcmuv mitgcmuv                  ln -s ../$builddir/mitgcmuv mitgcmuv
899              )              )
900              runmodel $dir/tr_run && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
901                  && results=`testoutput $dir $rundir "."$ex`                  && results=`testoutput $dir tr_run.$ex "."$ex`
902              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}`
903              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
904              fres="$fres.$ex"              fres="$fres.$ex"
# Line 891  for dir in $TESTDIRS ; do Line 910  for dir in $TESTDIRS ; do
910              echo "DATE='$DATE'" >> $CDIR"/summary.txt"              echo "DATE='$DATE'" >> $CDIR"/summary.txt"
911              echo "tdir='$dir'" >> $CDIR"/summary.txt"              echo "tdir='$dir'" >> $CDIR"/summary.txt"
912          done          done
913            COMMAND=$OLD_COMMAND
914      else      else
915          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}`
916          fres=$fres"$results   $dir"          fres=$fres"$results   $dir"
# Line 920  else Line 940  else
940      if test "x$HAVE_MPACK" = xt ; then      if test "x$HAVE_MPACK" = xt ; then
941          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \          tar -cf $DRESULTS".tar" $DRESULTS > /dev/null 2>&1 \
942              && gzip $DRESULTS".tar" \              && gzip $DRESULTS".tar" \
943              && $MPACK -s MITgcm-test -m 1500000 $DRESULTS".tar.gz" $ADDRESSES              && $MPACK -s MITgcm-test -m 3555000 $DRESULTS".tar.gz" $ADDRESSES
944          RETVAL=$?          RETVAL=$?
945          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
946              echo              echo
# Line 950  if test "x$CLEANUP" != xt ; then Line 970  if test "x$CLEANUP" != xt ; then
970      cat $SUMMARY > tr_out.txt      cat $SUMMARY > tr_out.txt
971  fi  fi
972    
973    if test "x$DELDIR" = xt ; then
974        rm -rf $DRESULTS
975    fi
976    

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.22