/[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.170 by mlosch, Thu Dec 22 12:55:05 2011 UTC revision 1.174 by jmc, Wed Jun 27 15:20:51 2012 UTC
# Line 443  run_clean() Line 443  run_clean()
443              find . -name "fort.*" -exec rm {} \;              find . -name "fort.*" -exec rm {} \;
444              find . -type l -exec rm {} \;              find . -type l -exec rm {} \;
445              #- should remove executable only if sym-link (alredy done above)              #- should remove executable only if sym-link (alredy done above)
446              rm -f $RUNLOG *.txt STD* *diagnostics.log datetime              rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime
447              rm -rf mnc_test_*              rm -rf mnc_test_*
448              rm -f *_MIT_CE_000.opt0000 costfunction*0000              rm -f *_MIT_CE_000.opt0000 costfunction*0000
449              echo successful              echo successful
# Line 492  makemodel() Line 492  makemodel()
492          cd $1;          cd $1;
493          if test -r Makefile ; then          if test -r Makefile ; then
494              printf 'make ... '              printf 'make ... '
495              $MAKE $TARG >> make.tr_log 2>&1              if test "x$REPLMAKE" = x ; then
496                    $MAKE $TARG >> make.tr_log 2>&1
497                else
498                    $REPLMAKE $TARG >> make.tr_log 2>&1
499                fi
500              RETVAL=$?              RETVAL=$?
501              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
502                  tail make.tr_log                  tail make.tr_log
# Line 522  makemodel() Line 526  makemodel()
526    
527  mk_mpi_size()  mk_mpi_size()
528  {  {
529      # mk_mpi_size input_file output_file proc_Nb prefer_to_split_X      # mk_mpi_size input_file output_file proc_Nb threads_Nb_X threads_Nb_Y
530      #      #
531      # make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)      #  make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)
532      #     for an MPI build with no more than proc_Nb processors ;      #     for an MPI build with no more than proc_Nb processors ;
533      # return the effective number of processors.      #  ensure that enough tiles per proc (nSx,nSy) remain for the given
534        #     number of threads (nTx,nTy) ;
535        #  return the effective number of processors.
536    
537      inp=$1      inp=$1
538      out=$2      out=$2
539      np=$3      np=$3
540      dirX=$4      tx=$4
541        ty=$5
542      tmp=TTT.$$      tmp=TTT.$$
543    
544        # dirX : select with direction to favor in MPI process repartition
545        #   dirX=1 : prefer to put more proc in X direction
546        #   dirX=0 : prefer to put more proc in Y direction
547        dirX=0
548    
549      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`
550      py=`grep "^     & *nPy *=" $inp | sed "s/^     & *nPy *= *//" | sed 's/, *$//'`      py=`grep "^     & *nPy *=" $inp | sed "s/^     & *nPy *= *//" | sed 's/, *$//'`
551      sx=`grep "^     & *nSx *=" $inp | sed "s/^     & *nSx *= *//" | sed 's/, *$//'`      sx=`grep "^     & *nSx *=" $inp | sed "s/^     & *nSx *= *//" | sed 's/, *$//'`
552      sy=`grep "^     & *nSy *=" $inp | sed "s/^     & *nSy *= *//" | sed 's/, *$//'`      sy=`grep "^     & *nSy *=" $inp | sed "s/^     & *nSy *= *//" | sed 's/, *$//'`
553    
554        #- for each direction, assume # of threads is a multiple of total number of tiles
555        nx=$px
556        if [ `expr $sx % $tx` -ne 0 -a `expr $sx \* $px % $tx` -eq 0 ] ; then
557            nx=`expr $sx \* $px / $tx`
558            if [ $verbose -gt 1 ]; then
559                echo " change px from $px to $nx to accommodate $tx threads"
560            fi
561        fi
562        ny=$py
563        if [ `expr $sy % $ty` -ne 0 -a `expr $sy \* $py % $ty` -eq 0 ] ; then
564            ny=`expr $sy \* $py / $ty`
565            if [ $verbose -gt 1 ]; then
566                echo " change py from $py to $ny to accommodate $ty threads"
567            fi
568        fi
569      #- find the largest divisor of input_file proc Nb, but not larger than $np      #- find the largest divisor of input_file proc Nb, but not larger than $np
570      pp=0      pp=0
571      i=1      i=1
572      while [ $i -le $px ] ; do      while [ $i -le $nx ] ; do
573        if [ `expr $px % $i` -eq 0 ] ; then        if [ `expr $nx % $i` -eq 0 ] ; then
574          j=1          j=1
575          while [ $j -le $py ] ; do          while [ $j -le $ny ] ; do
576            if [ `expr $py % $j` -eq 0 ] ; then            if [ `expr $ny % $j` -eq 0 ] ; then
577              ij=`expr $i \* $j`              ij=`expr $i \* $j`
578              if [ $ij -gt $pp ] ; then              if [ $ij -gt $pp ] ; then
579                  flag=1                  flag=1
# Line 926  debug=0 Line 953  debug=0
953  verbose=1  verbose=1
954  NBLINES_MKLOG=16000  NBLINES_MKLOG=16000
955    
 IEEE=true  
 if test "x$MITGCM_IEEE" != x ; then  
     IEEE=$MITGCM_IEEE  
 fi  
956  OptLev=1  OptLev=1
957  GSL=f  GSL=f
958    
# Line 955  MKDEPEND= Line 978  MKDEPEND=
978  if test "x$MAKE" = x ; then  if test "x$MAKE" = x ; then
979      MAKE=make      MAKE=make
980  fi  fi
981    REPLMAKE=
982  if test "x$CC" = x ; then  if test "x$CC" = x ; then
983      CC=cc      CC=cc
984  fi  fi
# Line 1019  for ac_option ; do Line 1043  for ac_option ; do
1043          -make | --make | -m | --m) ac_prev=MAKE ;;          -make | --make | -m | --m) ac_prev=MAKE ;;
1044          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;
1045    
1046            -repl_mk | --repl_mk ) ac_prev=REPLMAKE ;;
1047            -repl_mk=* | --repl_mk=*) REPLMAKE=$ac_optarg ;;
1048    
1049          -odir | --odir) ac_prev=OUTDIR ;;          -odir | --odir) ac_prev=OUTDIR ;;
1050          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;
1051    
# Line 1380  for dir in $TESTDIRS ; do Line 1407  for dir in $TESTDIRS ; do
1407      fi      fi
1408    
1409      if test "x$MPI" != "x0" ; then      if test "x$MPI" != "x0" ; then
1410          prefer_X=0          ntx=1 ; nty=1
1411          if test "x$MULTI_THREAD" = "xt" ; then          if test "x$MULTI_THREAD" = "xt" ; then
1412              retv=`check_eedata $dir"/input/eedata.mth"`            ff=$dir"/input/eedata.mth"
1413              if test $retv = 1 ; then prefer_X=1 ; fi            ntx=`grep "^ *nTx *=" $ff | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`
1414              nty=`grep "^ *nTy *=" $ff | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`
1415              if test "x$ntx" = x ; then ntx=1 ; fi
1416              if test "x$nty" = x ; then nty=1 ; fi
1417          fi          fi
1418          #- create new SIZE.h with no more than '$MPI' Procs          #- create new SIZE.h with no more than '$MPI' Procs
1419          mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI $prefer_X          mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI $ntx $nty
1420          LOC_NPROC=$?          LOC_NPROC=$?
1421          (   cd $BUILD_DIR          (   cd $BUILD_DIR
1422              if test -r SIZE.h.mpi ; then              if test -r SIZE.h.mpi ; then

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.174

  ViewVC Help
Powered by ViewVC 1.1.22