/[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.37 by edhill, Fri Mar 12 18:51:05 2004 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 306  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 413  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 542  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 563  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    
# Line 616  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 639  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 861  for dir in $TESTDIRS ; do Line 877  for dir in $TESTDIRS ; do
877          OLD_COMMAND=$COMMAND          OLD_COMMAND=$COMMAND
878          COMMAND="./mitgcmuv > output.txt"          COMMAND="./mitgcmuv > output.txt"
879          for ex in $extra_runs ; do          for ex in $extra_runs ; do
880              test -e "$dir/tr_run" && rm -rf "$dir/tr_run"              test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex"
881              mkdir "$dir/tr_run"              mkdir "$dir/tr_run.$ex"
882              links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`              links=`( cd "$dir/input" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
883              (              (
884                  cd "$dir/tr_run"                  cd "$dir/tr_run.$ex"
885                  for i in $links; do                  for i in $links; do
886                      ln -s ../input/$i $i                      ln -s ../input/$i $i
887                  done                  done
888              )              )
889              links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`              links=`( cd "$dir/input.$ex" > /dev/null 2>&1 ; ls -1 | grep -v CVS )`
890              (              (
891                  cd "$dir/tr_run"                  cd "$dir/tr_run.$ex"
892                  for i in $links; do                  for i in $links; do
893                      test -e $i  &&  rm -f $i                      test -e $i  &&  rm -f $i
894                      ln -s ../input.$ex/$i $i                      ln -s ../input.$ex/$i $i
895                  done                  done
896                  ln -s ../$builddir/mitgcmuv mitgcmuv                  ln -s ../$builddir/mitgcmuv mitgcmuv
897              )              )
898              runmodel $dir/tr_run && run=Y \              runmodel $dir/tr_run.$ex && run=Y \
899                  && results=`testoutput $dir $rundir "."$ex`                  && results=`testoutput $dir tr_run.$ex "."$ex`
900              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}`
901              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
902              fres="$fres.$ex"              fres="$fres.$ex"
# Line 952  if test "x$CLEANUP" != xt ; then Line 968  if test "x$CLEANUP" != xt ; then
968      cat $SUMMARY > tr_out.txt      cat $SUMMARY > tr_out.txt
969  fi  fi
970    
971    if test "x$DELDIR" = xt ; then
972        rm -rf $DRESULTS
973    fi
974    

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

  ViewVC Help
Powered by ViewVC 1.1.22