/[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.159 by jmc, Tue Mar 29 02:20:22 2011 UTC revision 1.164 by jmc, Mon Jun 27 18:45:16 2011 UTC
# Line 15  usage() Line 15  usage()
15      echo "  (-mpi)                   use MPI to compile and run on 2 processors"      echo "  (-mpi)                   use MPI to compile and run on 2 processors"
16      echo "  (-MPI)  NUMBER           use MPI to compile and run on max NUMBER procs"      echo "  (-MPI)  NUMBER           use MPI to compile and run on max NUMBER procs"
17      echo "  (-mfile|-mf) STRING      MPI: file with list of possible machines to run on"      echo "  (-mfile|-mf) STRING      MPI: file with list of possible machines to run on"
18      echo "  (-ieee/-noieee)          if possible, use IEEE compiler flags"      echo "  (-fast)                  use optfile default for compiler flags (no '-ieee')"
19      echo "                             (DEF=\"-ieee\")"      echo "                            DEF=off => use IEEE numerics option (if available)"
20        echo "  (-devel)                 use optfile developement flags (if available)"
21      echo "  (-gsl)                   compile with \"-gsl\" flag"      echo "  (-gsl)                   compile with \"-gsl\" flag"
22      echo "  (-use_r4|-ur4)           if allowed, use real*4 type for '_RS' variable"      echo "  (-use_r4|-ur4)           if allowed, use real*4 type for '_RS' variable"
23      echo "  (-optfile|-of) STRING    list of optfiles to use"      echo "  (-optfile|-of) STRING    list of optfiles to use"
# Line 338  genmakemodel() Line 339  genmakemodel()
339              if test "x$OPTFILE" != xNONE ; then              if test "x$OPTFILE" != xNONE ; then
340                  command="$command -optfile=$OPTFILE"                  command="$command -optfile=$OPTFILE"
341              fi              fi
342              if test "x$IEEE" != x ; then              if test $OptLev = 1 ; then
343                  command="$command -ieee"                  command="$command -ieee"
344                fi
345                if test $OptLev = 0 ; then
346                    command="$command -devel"
347              fi              fi
348              if test "x$GSL" = xt ; then              if test "x$GSL" = xt ; then
349                  command="$command -gsl"                  command="$command -gsl"
# Line 424  run_clean() Line 428  run_clean()
428              find . -name "*.data" -exec rm {} \;              find . -name "*.data" -exec rm {} \;
429              find . -name "fort.*" -exec rm {} \;              find . -name "fort.*" -exec rm {} \;
430              find . -type l -exec rm {} \;              find . -type l -exec rm {} \;
431              rm -f $EXECUTABLE $RUNLOG *.txt STD* *diagnostics.log datetime              #- should remove executable only if sym-link (alredy done above)
432                rm -f $RUNLOG *.txt STD* *diagnostics.log datetime
433              rm -rf mnc_test_*              rm -rf mnc_test_*
434              rm -f *_MIT_CE_000.opt0000 costfunction*0000              rm -f *_MIT_CE_000.opt0000 costfunction*0000
435              echo successful              echo successful
# Line 488  makemodel() Line 493  makemodel()
493              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
494                  tail make.tr_log                  tail make.tr_log
495                  echo failed                  echo failed
496                  cp make.tr_log genmake.log genmake.tr_log $CDIR                  cp genmake.log genmake.tr_log $CDIR
497                    tail -$NBLINES_MKLOG make.tr_log > $CDIR"/make.tr_log_tail"
498                  rm -f $EXECUTABLE                  rm -f $EXECUTABLE
499                  mk_fail=1                  mk_fail=1
500              else              else
# Line 512  makemodel() Line 518  makemodel()
518    
519  mk_mpi_size()  mk_mpi_size()
520  {  {
521      # mk_mpi_size input_file output_file proc_Nb      # mk_mpi_size input_file output_file proc_Nb prefer_to_split_X
522      #      #
523      # make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)      # make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)
524      #     for an MPI build with no more than proc_Nb processors ;      #     for an MPI build with no more than proc_Nb processors ;
# Line 521  mk_mpi_size() Line 527  mk_mpi_size()
527      inp=$1      inp=$1
528      out=$2      out=$2
529      np=$3      np=$3
530        dirX=$4
531      tmp=TTT.$$      tmp=TTT.$$
532    
533      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`
# Line 538  mk_mpi_size() Line 545  mk_mpi_size()
545            if [ `expr $py % $j` -eq 0 ] ; then            if [ `expr $py % $j` -eq 0 ] ; then
546              ij=`expr $i \* $j`              ij=`expr $i \* $j`
547              if [ $ij -gt $pp ] ; then              if [ $ij -gt $pp ] ; then
548                    flag=1
549                elif [ $ij -eq $pp ] ; then
550                    flag=$dirX
551                else
552                    flag=0
553                fi
554                if test $flag = 1 ; then
555                if [ $ij -le $np ] ; then                if [ $ij -le $np ] ; then
556                  ix=$i ; jy=$j ; pp=$ij                  ix=$i ; jy=$j ; pp=$ij
557                  #echo "  ix,jy= $ix,$jy"                  #echo "  ix,jy= $ix,$jy"
# Line 717  runmodel() Line 731  runmodel()
731          else          else
732            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then
733              # output do not exist or is older than executable:              # output do not exist or is older than executable:
734              rm -f $RUNLOG ; touch $RUNLOG              rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG
735              if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi              if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi
736              ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
737              RETVAL=$?              RETVAL=$?
# Line 862  scandirs() Line 876  scandirs()
876    
877  check_eedata()  check_eedata()
878  {  {
879      # check_eedata size.h eedata      # check_eedata eedata size.h
880      if [ $# -eq 2 ] ; then      if [ $# -eq 2 ] ; then
881        if test -f $1 -a -f $2 ; then       if test -f $1 -a -f $2 ; then
882        sx=`grep "^     & *nSx *=" $1 | sed "s/^     & *nSx *=//" | sed 's/, *$//'`        nx=`grep "^ *nTx *=" $1 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`
883        nx=`grep "^ *nTx *=" $2 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`        sx=`grep "^     & *nSx *=" $2 | sed "s/^     & *nSx *=//" | sed 's/, *$//'`
884        if test "x$nx" = x ; then        if test "x$nx" = x ; then
885          rx=10          rx=10
886        else        else
887          rx=`expr $sx % $nx`          rx=`expr $sx % $nx`
888        fi        fi
889        sy=`grep "^     & *nSy *=" $1 | sed "s/^     & *nSy *=//" | sed 's/, *$//'`        ny=`grep "^ *nTy *=" $1 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`
890        ny=`grep "^ *nTy *=" $2 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`        sy=`grep "^     & *nSy *=" $2 | sed "s/^     & *nSy *=//" | sed 's/, *$//'`
891        if test "x$ny" = x ; then        if test "x$ny" = x ; then
892          ry=20          ry=20
893        else        else
894          ry=`expr $sy % $ny`          ry=`expr $sy % $ny`
895        fi        fi
896        echo `expr $rx + $ry`        echo `expr $rx + $ry`
897      else       else
898        echo '-1'        echo '-1'
899        fi       fi
900        elif [ $# -eq 1 ] ; then
901         if test -f $1 ; then
902          nx=`grep "^ *nTx *=" $1 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`
903          if test "x$nx" = x ; then nx=1 ; fi
904          ny=`grep "^ *nTy *=" $1 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`
905          if test "x$ny" = x ; then ny=1 ; fi
906         #echo $nx $ny
907          echo $nx
908         else
909          echo '-1'
910         fi
911      else      else
912        echo '-2'        echo '-2'
913      fi      fi
# Line 895  check_eedata() Line 920  check_eedata()
920  #  Default properties  #  Default properties
921  debug=0  debug=0
922  verbose=1  verbose=1
923    NBLINES_MKLOG=16000
924    
925  IEEE=true  IEEE=true
926  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
927      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
928  fi  fi
929    OptLev=1
930  GSL=f  GSL=f
931    
932  CLEANUP=f  CLEANUP=f
# Line 1022  for ac_option ; do Line 1049  for ac_option ; do
1049          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
1050          -oad) OADM=t; NODEPEND=t ;;          -oad) OADM=t; NODEPEND=t ;;
1051    
1052          -ieee) IEEE=true ;;          -ieee)   echo "Warning: ignore option '-ieee' (already the default)"
1053          -noieee) IEEE= ;;                   printf " ... " ;;
1054            -noieee) echo "Warning: will use option '-fast' instead of '-noieee' (obsolete)"
1055                     printf " ... " ; OptLev=`expr $OptLev \* 2` ;;
1056            -fast)  OptLev=`expr $OptLev \* 2` ;;
1057            -devel) OptLev=0 ;;
1058          -gsl) GSL=t ;;          -gsl) GSL=t ;;
1059    
1060          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
# Line 1326  for dir in $TESTDIRS ; do Line 1357  for dir in $TESTDIRS ; do
1357    
1358      # Check for specific files for particular type of run      # Check for specific files for particular type of run
1359    
1360        if test ! -r $CODE_DIR"/SIZE.h_mpi"  -a "x$MPI" != "x0" ; then
1361            echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"
1362            continue
1363        fi
1364        if test ! -r $dir"/input/eedata.mth" -a "x$MULTI_THREAD" = "xt" ; then
1365            echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"
1366            continue
1367        fi
1368    
1369      if test "x$MPI" != "x0" ; then      if test "x$MPI" != "x0" ; then
1370          if test -r $CODE_DIR"/SIZE.h_mpi" ; then          prefer_X=0
1371              #- create new SIZE.h with no more than '$MPI' Procs          if test "x$MULTI_THREAD" = "xt" ; then
1372              mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI              retv=`check_eedata $dir"/input/eedata.mth"`
1373              LOC_NPROC=$?              if test $retv = 1 ; then prefer_X=1 ; fi
1374              (   cd $BUILD_DIR          fi
1375                  if test -r SIZE.h.mpi ; then          #- create new SIZE.h with no more than '$MPI' Procs
1376                      cmp tr_size.mpi SIZE.h.mpi > /dev/null 2>&1 ; RETVAL=$?          mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI $prefer_X
1377                  else RETVAL=1          LOC_NPROC=$?
1378                  fi          (   cd $BUILD_DIR
1379                  if test "x$RETVAL" = x0 ; then              if test -r SIZE.h.mpi ; then
1380                      rm -f tr_size.mpi                  cmp tr_size.mpi SIZE.h.mpi > /dev/null 2>&1 ; RETVAL=$?
1381                  else              else RETVAL=1
1382                      rm -f SIZE.h.mpi ; mv tr_size.mpi SIZE.h.mpi              fi
1383                  fi              if test "x$RETVAL" = x0 ; then
1384              )                  rm -f tr_size.mpi
1385          else              else
1386              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"                  rm -f SIZE.h.mpi ; mv tr_size.mpi SIZE.h.mpi
1387              continue              fi
1388          fi          )
1389          if test "x$MPI_MFILE" != x ; then          if test "x$MPI_MFILE" != x ; then
1390              #- create new MPI machine-file with the right number of Procs              #- create new MPI machine-file with the right number of Procs
1391              rm -f $LOC_MFILE              rm -f $LOC_MFILE
# Line 1361  for dir in $TESTDIRS ; do Line 1401  for dir in $TESTDIRS ; do
1401                  echo " new LOC_MFILE=$LOC_MFILE : $nl procs for LOC_NPROC=$LOC_NPROC"                  echo " new LOC_MFILE=$LOC_MFILE : $nl procs for LOC_NPROC=$LOC_NPROC"
1402              fi              fi
1403          fi          fi
1404      fi          if test "x$MULTI_THREAD" = "xt" ; then
1405      if test ! -r $dir"/input/eedata.mth" -a "x$MULTI_THREAD" = "xt" ; then              retv=`check_eedata $dir"/input/eedata.mth" $BUILD_DIR"/SIZE.h.mpi"`
1406          echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"              if test $retv != 0 ; then
1407          continue                  echo "input/eedata.mth tiling misfit -- skipping $dir"
1408      fi                  continue
1409      if test "x$MPI" != "x0" -a "x$MULTI_THREAD" = "xt" ; then              fi
         retv=`check_eedata $BUILD_DIR"/SIZE.h.mpi" $dir"/input/eedata.mth"`  
         if test $retv != 0 ; then  
             echo "input/eedata.mth tiling misfit -- skipping $dir"  
             continue  
1410          fi          fi
1411      fi      fi
1412    
# Line 1390  for dir in $TESTDIRS ; do Line 1426  for dir in $TESTDIRS ; do
1426                if test "x$MPI" = "x0" ; then                if test "x$MPI" = "x0" ; then
1427                  extra_runs="$extra_runs $name"                  extra_runs="$extra_runs $name"
1428                else                else
1429                  retv=`check_eedata $BUILD_DIR"/SIZE.h.mpi" $dir"/"$exd"/eedata.mth"`                  retv=`check_eedata $dir"/"$exd"/eedata.mth" $BUILD_DIR"/SIZE.h.mpi"`
1430                  if test $retv = 0 ; then                  if test $retv = 0 ; then
1431                      extra_runs="$extra_runs $name"                      extra_runs="$extra_runs $name"
1432                  else                  else

Legend:
Removed from v.1.159  
changed lines
  Added in v.1.164

  ViewVC Help
Powered by ViewVC 1.1.22