/[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.160 by jmc, Tue Mar 29 11:51:20 2011 UTC revision 1.170 by mlosch, Thu Dec 22 12:55:05 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 47  usage() Line 48  usage()
48      echo "  (-match) NUMBER          Matching Criteria (number of digits)"      echo "  (-match) NUMBER          Matching Criteria (number of digits)"
49      echo "                             (DEF=\"$MATCH_CRIT\")"      echo "                             (DEF=\"$MATCH_CRIT\")"
50      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
51        echo "  (-ef) STRING             used as genmake2 \"-extra_flag\" argument"
52      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"
53      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"
54        echo "  (-obj)                   only produces objects (=norun & no executable)"
55      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"
56      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
57      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
# Line 248  testoutput_run() Line 251  testoutput_run()
251                    then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi                    then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi
252                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?                    testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$?
253                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;                    if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;;
254            'Cost') testoutput_var $1 "ADM  precision_derivative_cost" "ADM Cost" $2 $3; yy=$? ;;            'Cost') testoutput_var $1 "ADM  ref_cost_function" "ADM CostFct" $2 $3; yy=$? ;;
255            'Grad') testoutput_var $1 "ADM  precision_derivative_grad" "ADM Grad" $2 $3; yy=$? ;;           'AdGrd') testoutput_var $1 "ADM  adjoint_gradient"  "ADM Ad Grad" $2 $3; yy=$? ;;
256             'FDGrd') testoutput_var $1 "ADM  finite-diff_grad"  "ADM FD Grad" $2 $3; yy=$? ;;
257             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;             'Tmn') testoutput_var $1 "dynstat_theta_min"  "Theta minimum"  $2 $3; yy=$? ;;
258             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;             'Tmx') testoutput_var $1 "dynstat_theta_max"  "Theta maximum"  $2 $3; yy=$? ;;
259             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;             'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean"     $2 $3; yy=$? ;;
# Line 286  testoutput_run() Line 290  testoutput_run()
290           'hSImx') testoutput_var $1 "seaice_heff_max"   "SIce Heff max"   $2 $3; yy=$? ;;           'hSImx') testoutput_var $1 "seaice_heff_max"   "SIce Heff max"   $2 $3; yy=$? ;;
291           'hSIav') testoutput_var $1 "seaice_heff_mean"  "SIce Heff mean"  $2 $3; yy=$? ;;           'hSIav') testoutput_var $1 "seaice_heff_mean"  "SIce Heff mean"  $2 $3; yy=$? ;;
292           'hSIsd') testoutput_var $1 "seaice_heff_sd"    "SIce Heff StDv"  $2 $3; yy=$? ;;           'hSIsd') testoutput_var $1 "seaice_heff_sd"    "SIce Heff StDv"  $2 $3; yy=$? ;;
293             'uSImn') testoutput_var $1 "seaice_uice_min"   "SIce Uice min"   $2 $3; yy=$? ;;
294             'uSImx') testoutput_var $1 "seaice_uice_max"   "SIce Uice max"   $2 $3; yy=$? ;;
295             'uSIav') testoutput_var $1 "seaice_uice_mean"  "SIce Uice mean"  $2 $3; yy=$? ;;
296             'uSIsd') testoutput_var $1 "seaice_uice_sd"    "SIce Uice StDv"  $2 $3; yy=$? ;;
297             'vSImn') testoutput_var $1 "seaice_vice_min"   "SIce Vice min"   $2 $3; yy=$? ;;
298             'vSImx') testoutput_var $1 "seaice_vice_max"   "SIce Vice max"   $2 $3; yy=$? ;;
299             'vSIav') testoutput_var $1 "seaice_vice_mean"  "SIce Vice mean"  $2 $3; yy=$? ;;
300             'vSIsd') testoutput_var $1 "seaice_vice_sd"    "SIce Vice StDv"  $2 $3; yy=$? ;;
301          'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $3; yy=$? ;;          'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $3; yy=$? ;;
302          'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South"  $2 $3; yy=$? ;;          'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South"  $2 $3; yy=$? ;;
303          'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North"  $2 $3; yy=$? ;;          'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North"  $2 $3; yy=$? ;;
# Line 338  genmakemodel() Line 350  genmakemodel()
350              if test "x$OPTFILE" != xNONE ; then              if test "x$OPTFILE" != xNONE ; then
351                  command="$command -optfile=$OPTFILE"                  command="$command -optfile=$OPTFILE"
352              fi              fi
353              if test "x$IEEE" != x ; then              if test $OptLev = 1 ; then
354                  command="$command -ieee"                  command="$command -ieee"
355                fi
356                if test $OptLev = 0 ; then
357                    command="$command -devel"
358              fi              fi
359              if test "x$GSL" = xt ; then              if test "x$GSL" = xt ; then
360                  command="$command -gsl"                  command="$command -gsl"
# Line 354  genmakemodel() Line 369  genmakemodel()
369              if test "x$USE_R4" = xt ; then              if test "x$USE_R4" = xt ; then
370                  command="$command -use_r4"                  command="$command -use_r4"
371              fi              fi
372                if test "x$EXTRFLG" != x ; then
373                    command="$command -extra_flag $EXTRFLG"
374                fi
375              if test "x$TS" = xt ; then              if test "x$TS" = xt ; then
376                  command="$command -ts"                  command="$command -ts"
377              fi              fi
# Line 424  run_clean() Line 442  run_clean()
442              find . -name "*.data" -exec rm {} \;              find . -name "*.data" -exec rm {} \;
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 (and above does it)              #- should remove executable only if sym-link (alredy done above)
             #rm -f $EXECUTABLE  
446              rm -f $RUNLOG *.txt STD* *diagnostics.log datetime              rm -f $RUNLOG *.txt STD* *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
# Line 475  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              if test "x$ADM" = xt ; then              $MAKE $TARG >> make.tr_log 2>&1
                 $MAKE adall >> make.tr_log 2>&1  
             elif test "x$OADM" = xt ; then  
                 $MAKE adAll >> make.tr_log 2>&1  
             else  
                 if test "x$JOBS" = x ; then  
                     $MAKE >> make.tr_log 2>&1  
                 else  
                     $MAKE -j $JOBS >> make.tr_log 2>&1  
                 fi  
             fi  
496              RETVAL=$?              RETVAL=$?
497              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
498                  tail make.tr_log                  tail make.tr_log
499                  echo failed                  echo failed
500                  cp make.tr_log genmake.log genmake.tr_log $CDIR                  cp genmake.log genmake.tr_log $CDIR
501                    tail -$NBLINES_MKLOG make.tr_log > $CDIR"/make.tr_log_tail"
502                  rm -f $EXECUTABLE                  rm -f $EXECUTABLE
503                  mk_fail=1                  mk_fail=1
504              else              else
# Line 514  makemodel() Line 522  makemodel()
522    
523  mk_mpi_size()  mk_mpi_size()
524  {  {
525      # mk_mpi_size input_file output_file proc_Nb      # mk_mpi_size input_file output_file proc_Nb prefer_to_split_X
526      #      #
527      # make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)      # make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file)
528      #     for an MPI build with no more than proc_Nb processors ;      #     for an MPI build with no more than proc_Nb processors ;
# Line 523  mk_mpi_size() Line 531  mk_mpi_size()
531      inp=$1      inp=$1
532      out=$2      out=$2
533      np=$3      np=$3
534        dirX=$4
535      tmp=TTT.$$      tmp=TTT.$$
536    
537      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`      px=`grep "^     & *nPx *=" $inp | sed "s/^     & *nPx *= *//" | sed 's/, *$//'`
# Line 540  mk_mpi_size() Line 549  mk_mpi_size()
549            if [ `expr $py % $j` -eq 0 ] ; then            if [ `expr $py % $j` -eq 0 ] ; then
550              ij=`expr $i \* $j`              ij=`expr $i \* $j`
551              if [ $ij -gt $pp ] ; then              if [ $ij -gt $pp ] ; then
552                    flag=1
553                elif [ $ij -eq $pp ] ; then
554                    flag=$dirX
555                else
556                    flag=0
557                fi
558                if test $flag = 1 ; then
559                if [ $ij -le $np ] ; then                if [ $ij -le $np ] ; then
560                  ix=$i ; jy=$j ; pp=$ij                  ix=$i ; jy=$j ; pp=$ij
561                  #echo "  ix,jy= $ix,$jy"                  #echo "  ix,jy= $ix,$jy"
# Line 719  runmodel() Line 735  runmodel()
735          else          else
736            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then
737              # output do not exist or is older than executable:              # output do not exist or is older than executable:
738              rm -f $RUNLOG ; touch $RUNLOG              rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG
739              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
740              ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
741              RETVAL=$?              RETVAL=$?
# Line 864  scandirs() Line 880  scandirs()
880    
881  check_eedata()  check_eedata()
882  {  {
883      # check_eedata size.h eedata      # check_eedata eedata size.h
884      if [ $# -eq 2 ] ; then      if [ $# -eq 2 ] ; then
885        if test -f $1 -a -f $2 ; then       if test -f $1 -a -f $2 ; then
886        sx=`grep "^     & *nSx *=" $1 | sed "s/^     & *nSx *=//" | sed 's/, *$//'`        nx=`grep "^ *nTx *=" $1 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`
887        nx=`grep "^ *nTx *=" $2 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`        sx=`grep "^     & *nSx *=" $2 | sed "s/^     & *nSx *=//" | sed 's/, *$//'`
888        if test "x$nx" = x ; then        if test "x$nx" = x ; then
889          rx=10          rx=10
890        else        else
891          rx=`expr $sx % $nx`          rx=`expr $sx % $nx`
892        fi        fi
893        sy=`grep "^     & *nSy *=" $1 | sed "s/^     & *nSy *=//" | sed 's/, *$//'`        ny=`grep "^ *nTy *=" $1 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`
894        ny=`grep "^ *nTy *=" $2 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`        sy=`grep "^     & *nSy *=" $2 | sed "s/^     & *nSy *=//" | sed 's/, *$//'`
895        if test "x$ny" = x ; then        if test "x$ny" = x ; then
896          ry=20          ry=20
897        else        else
898          ry=`expr $sy % $ny`          ry=`expr $sy % $ny`
899        fi        fi
900        echo `expr $rx + $ry`        echo `expr $rx + $ry`
901      else       else
902        echo '-1'        echo '-1'
903        fi       fi
904        elif [ $# -eq 1 ] ; then
905         if test -f $1 ; then
906          nx=`grep "^ *nTx *=" $1 | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"`
907          if test "x$nx" = x ; then nx=1 ; fi
908          ny=`grep "^ *nTy *=" $1 | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"`
909          if test "x$ny" = x ; then ny=1 ; fi
910         #echo $nx $ny
911          echo $nx
912         else
913          echo '-1'
914         fi
915      else      else
916        echo '-2'        echo '-2'
917      fi      fi
# Line 897  check_eedata() Line 924  check_eedata()
924  #  Default properties  #  Default properties
925  debug=0  debug=0
926  verbose=1  verbose=1
927    NBLINES_MKLOG=16000
928    
929  IEEE=true  IEEE=true
930  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
931      IEEE=$MITGCM_IEEE      IEEE=$MITGCM_IEEE
932  fi  fi
933    OptLev=1
934  GSL=f  GSL=f
935    
936  CLEANUP=f  CLEANUP=f
# Line 930  if test "x$CC" = x ; then Line 959  if test "x$CC" = x ; then
959      CC=cc      CC=cc
960  fi  fi
961  JOBS=  JOBS=
962    TARG=
963  MPI=0  MPI=0
964  MPI_MFILE=  MPI_MFILE=
965  MULTI_THREAD=f  MULTI_THREAD=f
966  OUTDIR=  OUTDIR=
967  DELDIR=  DELDIR=
968  USE_R4=  USE_R4=
969    EXTRFLG=
970    
971  ADM=  ADM=
972  OADM=  OADM=
# Line 1000  for ac_option ; do Line 1031  for ac_option ; do
1031          -j | --j) ac_prev=JOBS ;;          -j | --j) ac_prev=JOBS ;;
1032          -j=* | --j=*) JOBS=$ac_optarg ;;          -j=* | --j=*) JOBS=$ac_optarg ;;
1033    
1034            -ef | --ef) ac_prev=EXTRFLG ;;
1035            -ef=* | --ef=*) EXTRFLG=$ac_optarg ;;
1036    
1037          -clean | --clean) CLEANUP=t ; DELDIR=t ;;          -clean | --clean) CLEANUP=t ; DELDIR=t ;;
1038    
1039          -norun | --norun | -nr | --nr) NORUN=t ;;          -norun | --norun | -nr | --nr) NORUN=t ;;
1040            -obj | --obj ) TARG='obj' ; NORUN=t ;;
1041          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;
1042          -quick | --quick | -q | --q) QUICK=t ;;          -quick | --quick | -q | --q) QUICK=t ;;
1043          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;
# Line 1024  for ac_option ; do Line 1059  for ac_option ; do
1059          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
1060          -oad) OADM=t; NODEPEND=t ;;          -oad) OADM=t; NODEPEND=t ;;
1061    
1062          -ieee) IEEE=true ;;          -ieee)   echo "Warning: ignore option '-ieee' (already the default)"
1063          -noieee) IEEE= ;;                   printf " ... " ;;
1064            -noieee) echo "Warning: will use option '-fast' instead of '-noieee' (obsolete)"
1065                     printf " ... " ; OptLev=`expr $OptLev \* 2` ;;
1066            -fast)  OptLev=`expr $OptLev \* 2` ;;
1067            -devel) OptLev=0 ;;
1068          -gsl) GSL=t ;;          -gsl) GSL=t ;;
1069    
1070          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
# Line 1074  fi Line 1113  fi
1113    
1114  #- setting for forward or ADM testing  #- setting for forward or ADM testing
1115  if test "x$ADM" = xt ; then  if test "x$ADM" = xt ; then
1116        if test "x$TARG" = xobj ; then TARG=adobj ; else TARG=adall ; fi
1117      code_dir=code_ad      code_dir=code_ad
1118      inputdir=input_ad      inputdir=input_ad
1119      ref_outp="output_adm.txt"      ref_outp="output_adm.txt"
1120      EXECUTABLE="mitgcmuv_ad"      EXECUTABLE="mitgcmuv_ad"
1121  elif test "x$OADM" = xt ; then  elif test "x$OADM" = xt ; then
1122        TARG=adAll
1123      code_dir=code_oad      code_dir=code_oad
1124      inputdir=input_oad      inputdir=input_oad
1125      ref_outp="output_oadm.txt"      ref_outp="output_oadm.txt"
1126      EXECUTABLE="mitgcmuv_ad"      EXECUTABLE="mitgcmuv_ad"
1127  else  else
1128        if test "x$JOBS" != x ; then TARG="-j $JOBS $TARG" ; fi
1129      code_dir=code      code_dir=code
1130      inputdir=input      inputdir=input
1131      ref_outp="output.txt"      ref_outp="output.txt"
# Line 1162  if test "x$ADM" = x -a "x$OADM" = x; the Line 1204  if test "x$ADM" = x -a "x$OADM" = x; the
1204      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`      ii=`echo $EMPTY_RESULTS | awk '{print NF}'`
1205      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`      EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf "  ."}}'`
1206  else  else
1207      DEF_CHECK_LIST='Grad Cost Grad'      DEF_CHECK_LIST='AdGrd Cost AdGrd FDGrd'
1208      EMPTY_RESULTS='.. ..'      EMPTY_RESULTS='.. .. ..'
1209      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`      LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'`
1210  fi  fi
1211    
# Line 1249  if test "x$ADM" = x -a "x$OADM" = x; the Line 1291  if test "x$ADM" = x -a "x$OADM" = x; the
1291      else line_0="default "$MATCH_CRIT ; fi      else line_0="default "$MATCH_CRIT ; fi
1292         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"
1293      line_1="G D M    c        m  s        m  s        m  s        m  s"      line_1="G D M    c        m  s        m  s        m  s        m  s"
1294      line_2="E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  ."      line_2="e p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  ."
1295      line_3="N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d"      line_3="n n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d"
1296      line_4="2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  ."      line_4="2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  ."
1297      for ii in $PTRACERS_NUM ; do      for ii in $PTRACERS_NUM ; do
1298          line_0="$line_0  --PTR 0"$ii"--"          line_0="$line_0  --PTR 0"$ii"--"
# Line 1273  else Line 1315  else
1315      else line_0="default    "$MATCH_CRIT ; fi      else line_0="default    "$MATCH_CRIT ; fi
1316      echo "$line_0" | tee -a $SUMMARY      echo "$line_0" | tee -a $SUMMARY
1317      cat << EOF | tee -a $SUMMARY      cat << EOF | tee -a $SUMMARY
1318  G D M    C  G  G D M    C  A  F
1319  E p a R  o  r  e p a R  o  d  D
1320  N n k u  s  a  n n k u  s  G  G
1321  2 d e n  t  d  2 d e n  t  r  r
1322    
1323  EOF  EOF
1324  fi  fi
# Line 1328  for dir in $TESTDIRS ; do Line 1370  for dir in $TESTDIRS ; do
1370    
1371      # Check for specific files for particular type of run      # Check for specific files for particular type of run
1372    
1373        if test ! -r $CODE_DIR"/SIZE.h_mpi"  -a "x$MPI" != "x0" ; then
1374            echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"
1375            continue
1376        fi
1377        if test ! -r $dir"/input/eedata.mth" -a "x$MULTI_THREAD" = "xt" ; then
1378            echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"
1379            continue
1380        fi
1381    
1382      if test "x$MPI" != "x0" ; then      if test "x$MPI" != "x0" ; then
1383          if test -r $CODE_DIR"/SIZE.h_mpi" ; then          prefer_X=0
1384              #- create new SIZE.h with no more than '$MPI' Procs          if test "x$MULTI_THREAD" = "xt" ; then
1385              mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI              retv=`check_eedata $dir"/input/eedata.mth"`
1386              LOC_NPROC=$?              if test $retv = 1 ; then prefer_X=1 ; fi
1387              (   cd $BUILD_DIR          fi
1388                  if test -r SIZE.h.mpi ; then          #- create new SIZE.h with no more than '$MPI' Procs
1389                      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
1390                  else RETVAL=1          LOC_NPROC=$?
1391                  fi          (   cd $BUILD_DIR
1392                  if test "x$RETVAL" = x0 ; then              if test -r SIZE.h.mpi ; then
1393                      rm -f tr_size.mpi                  cmp tr_size.mpi SIZE.h.mpi > /dev/null 2>&1 ; RETVAL=$?
1394                  else              else RETVAL=1
1395                      rm -f SIZE.h.mpi ; mv tr_size.mpi SIZE.h.mpi              fi
1396                  fi              if test "x$RETVAL" = x0 ; then
1397              )                  rm -f tr_size.mpi
1398          else              else
1399              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"                  rm -f SIZE.h.mpi ; mv tr_size.mpi SIZE.h.mpi
1400              continue              fi
1401          fi          )
1402          if test "x$MPI_MFILE" != x ; then          if test "x$MPI_MFILE" != x ; then
1403              #- create new MPI machine-file with the right number of Procs              #- create new MPI machine-file with the right number of Procs
1404              rm -f $LOC_MFILE              rm -f $LOC_MFILE
# Line 1363  for dir in $TESTDIRS ; do Line 1414  for dir in $TESTDIRS ; do
1414                  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"
1415              fi              fi
1416          fi          fi
1417      fi          if test "x$MULTI_THREAD" = "xt" ; then
1418      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"`
1419          echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"              if test $retv != 0 ; then
1420          continue                  echo "input/eedata.mth tiling misfit -- skipping $dir"
1421      fi                  continue
1422      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  
1423          fi          fi
1424      fi      fi
1425    
# Line 1392  for dir in $TESTDIRS ; do Line 1439  for dir in $TESTDIRS ; do
1439                if test "x$MPI" = "x0" ; then                if test "x$MPI" = "x0" ; then
1440                  extra_runs="$extra_runs $name"                  extra_runs="$extra_runs $name"
1441                else                else
1442                  retv=`check_eedata $BUILD_DIR"/SIZE.h.mpi" $dir"/"$exd"/eedata.mth"`                  retv=`check_eedata $dir"/"$exd"/eedata.mth" $BUILD_DIR"/SIZE.h.mpi"`
1443                  if test $retv = 0 ; then                  if test $retv = 0 ; then
1444                      extra_runs="$extra_runs $name"                      extra_runs="$extra_runs $name"
1445                  else                  else
# Line 1501  for dir in $TESTDIRS ; do Line 1548  for dir in $TESTDIRS ; do
1548              if test "x$RETVAL" = x0 ; then              if test "x$RETVAL" = x0 ; then
1549                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state                  echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state
1550                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \                  sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \
1551                         | grep -v '^... compiler version ' > tr_1.tmp_log                          | grep -v '^... compiler version ' > tr_1.tmp_log
1552                  sed -n '1,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \                  sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state
1553                    sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \
1554                          >> $DRESULTS/genmake_state                          >> $DRESULTS/genmake_state
1555                  rm -f tr_1.tmp_log                  rm -f tr_1.tmp_log
1556              fi              fi

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

  ViewVC Help
Powered by ViewVC 1.1.22