/[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.155 by jmc, Wed Jan 19 22:12:55 2011 UTC revision 1.159 by jmc, Tue Mar 29 02:20:22 2011 UTC
# Line 14  usage() Line 14  usage()
14      echo "  (-mth)                   run multi-threaded (using eedata.mth)"      echo "  (-mth)                   run multi-threaded (using eedata.mth)"
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"
18      echo "  (-ieee/-noieee)          if possible, use IEEE compiler flags"      echo "  (-ieee/-noieee)          if possible, use IEEE compiler flags"
19      echo "                             (DEF=\"-ieee\")"      echo "                             (DEF=\"-ieee\")"
20      echo "  (-gsl)                   compile with \"-gsl\" flag"      echo "  (-gsl)                   compile with \"-gsl\" flag"
# Line 41  usage() Line 42  usage()
42      echo "                             (DEF=\"make\")"      echo "                             (DEF=\"make\")"
43      echo "  (-odir) STRING           used to build output directory name"      echo "  (-odir) STRING           used to build output directory name"
44      echo "                             (DEF=\"hostname\")"      echo "                             (DEF=\"hostname\")"
45      echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"  #   echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"
46      echo "                             (DEF=\"1 2 3 4 5\")"  #   echo "                             (DEF=\"1 2 3 4 5\")"
47      echo "  (-match) NUMBER          Matching Criteria (number of digits)"      echo "  (-match) NUMBER          Matching Criteria (number of digits)"
48      echo "                             (DEF=\"$MATCH_CRIT\")"      echo "                             (DEF=\"$MATCH_CRIT\")"
49      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
50      echo "  (-clean)                 *ONLY* run \"make CLEAN\""      echo "  (-clean)                 *ONLY* run \"make CLEAN\" & clean run-dir"
51      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"
52      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"      echo "  (-runonly|-ro)           *ONLY* run stage (=\"-quick\" without make)"
53      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""      echo "  (-quick|-q)              same as \"-nogenmake -noclean -nodepend\""
54      echo "  (-nogenmake|-ng)         skip the genmake stage"      echo "  (-nogenmake|-ng)         skip the genmake stage"
55      echo "  (-noclean|-nc)           skip the \"make clean\" stage"      echo "  (-noclean|-nc)           skip the \"make clean\" stage"
56      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"      echo "  (-nodepend|-nd)          skip the \"make depend\" stage"
57        echo "  (-postclean|-pc)         after each exp. test, clean build-dir & run-dir"
58        echo "  (-deloutp|-do)           delete output files after successful run"
59      echo "  (-deldir|-dd)            on success, delete the output directory"      echo "  (-deldir|-dd)            on success, delete the output directory"
60      echo "  (-ts)                    provide timing information per timestep"      echo "  (-ts)                    provide timing information per timestep"
61      echo "  (-papis)                 provide MFlop/s per timestep using PAPI"      echo "  (-papis)                 provide MFlop/s per timestep using PAPI"
# Line 235  testoutput_run() Line 238  testoutput_run()
238            listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"`            listVar=" $sVar "`echo "$listVar " | sed "s/ $sVar / /g"`
239          fi          fi
240          if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(M)='$listVar'" 1>&2 ; fi          if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(M)='$listVar'" 1>&2 ; fi
         #- report to this experiment local summary file ---  
         echo "MACH='$MACH'" > $locDIR"/summary.txt"  
         echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt"  
         echo "DATE='$DATE'" >> $locDIR"/summary.txt"  
         grep '(PID\.TID 0000\.0001)      n.. =' $1/$2/$OUTPUTFILE \  
          | sed 's/(PID.TID 0000.0001)     //' >> $locDIR"/summary.txt"  
241          echo "listVar='$listVar'" >> $locDIR"/summary.txt"          echo "listVar='$listVar'" >> $locDIR"/summary.txt"
242          #---          #---
243          allargs=""          allargs=""
# Line 463  makemodel() Line 460  makemodel()
460  {  {
461      # makemodel directory      # makemodel directory
462      (      (
463        mk_fail=0
464      if test "x$NOMAKE" = xt ; then      if test "x$NOMAKE" = xt ; then
465          cd $1;          cd $1;
466          if test -x $EXECUTABLE ; then          if test -x $EXECUTABLE ; then
467              echo "make skipped!"              echo "make skipped!"
468          else          else
469              echo "no executable!"              echo "no executable!"
470              return 2              mk_fail=3
471          fi          fi
472      else      else
473          cd $1;          cd $1;
# Line 492  makemodel() Line 490  makemodel()
490                  echo failed                  echo failed
491                  cp make.tr_log genmake.log genmake.tr_log $CDIR                  cp make.tr_log genmake.log genmake.tr_log $CDIR
492                  rm -f $EXECUTABLE                  rm -f $EXECUTABLE
493                  return 1                  mk_fail=1
494              else              else
495                  echo successful                  echo successful
496              fi              fi
497            else
498                echo "no Makefile !"
499                mk_fail=2
500          fi          fi
501      fi      fi
502        if test "x$ADM" = xt -a -f taf_ad.log ; then
503                head -1 taf_ad.log >> $CDIR"/summary.txt"
504                nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`
505                nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log`
506                echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \
507                                    >> $CDIR"/summary.txt"
508        fi
509        if test $mk_fail != 0 ; then return $mk_fail ; fi
510      )      )
511  }  }
512    
# Line 679  runmodel() Line 688  runmodel()
688      (      (
689          cd $1          cd $1
690          printf 'runmodel in %s ... ' $1          printf 'runmodel in %s ... ' $1
691            if test "x$MPI" != x0 ; then
692                #- adjust the MPI run command with the right number of Procs
693                #echo '' ; echo "  COMMAND='$COMMAND'"
694                COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $LOC_NPROC /"`
695                if test "x$MPI_MFILE" != x ; then
696                  COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"`
697                fi
698                #echo "  COMMAND='$COMMAND'"
699            fi
700          if test -L $EXECUTABLE ; then          if test -L $EXECUTABLE ; then
701            if test -x "../"$builddir"/"$EXECUTABLE ; then            if test -x "../"$builddir"/"$EXECUTABLE ; then
702              cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1              cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1
# Line 690  runmodel() Line 708  runmodel()
708              echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp              echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp
709              ln -sf "../"$builddir"/"$EXECUTABLE .              ln -sf "../"$builddir"/"$EXECUTABLE .
710          fi          fi
         if test "x$MPI" != x0 ; then  
             #- adjust the MPI run command with the right number of Procs  
             #echo "COMMAND='$COMMAND'"  
             COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $NPROC_MPI /"`  
             #COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / $MFILE_MPI /"`  
             #echo "COMMAND='$COMMAND'"  
         fi  
711          if test ! -x $EXECUTABLE ; then          if test ! -x $EXECUTABLE ; then
712                  rm -f $RUNLOG ; touch $RUNLOG              rm -f $RUNLOG ; touch $RUNLOG
713                  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
714                  echo " no executable:" $EXECUTABLE >> $RUNLOG              echo " no executable:" $EXECUTABLE >> $RUNLOG
715                  RETVAL=8              RETVAL=8
716                  ENDVAL=-1              ENDVAL=-1
717          else          else
718              if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then
719                # output do not exist or is older than executable:              # output do not exist or is older than executable:
720                  rm -f $RUNLOG ; touch $RUNLOG              rm -f $RUNLOG ; touch $RUNLOG
721                  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
722                  ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
723                  RETVAL=$?              RETVAL=$?
724              else              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`
725                  RETVAL=0              if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then
726                  if test -f $RUNLOG ; then                  find . -name "*.meta" -exec rm {} \;
727                      if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi                  find . -name "*.data" -exec rm {} \;
728                      echo "---------->> $OUTPUTFILE is up to date " >> $RUNLOG 2>&1                  rm -rf mnc_test_*
                 else  
                     touch $RUNLOG  
                     if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi  
                     echo "---------->> $OUTPUTFILE is up to date " >> $RUNLOG 2>&1  
                     echo " no previous $RUNLOG: assume NORMAL END" >> $RUNLOG 2>&1  
                 fi  
729              fi              fi
730              #ENDVAL=`cat $RUNLOG | grep -v 'ABNORMAL END' | grep -c 'NORMAL END'`            else
731                RETVAL=0
732              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`
733                touch $RUNLOG
734                if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi
735                echo "---------->> $OUTPUTFILE is up to date " >> $RUNLOG 2>&1
736              fi
737          fi          fi
738          rm -f run.log_tmp          rm -f run.log_tmp
739            #- in all cases where OutputFile exists, report SIZE (and AD time)
740            if test -f $OUTPUTFILE ; then
741              grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
742                    | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"
743              if test "x$ADM" = xt ; then
744                grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"
745              fi
746            fi
747            if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
748          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
749              echo successful              echo successful
750              printf '=> output from running in %s :\n' $1 1>&2              printf '=> output from running in %s :\n' $1 1>&2
751              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
             # === Reduce the size of the testing emails!  
             #cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE  
             if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi  
752              return 0              return 0
753          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then
754              #-- for some weird cases (run is finihed but with error code)              #-- for some weird cases (run is finihed but with error code)
# Line 745  runmodel() Line 761  runmodel()
761              printf '=> output from running in %s :\n' $1 1>&2              printf '=> output from running in %s :\n' $1 1>&2
762              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
763              cp $RUNLOG $CDIR"/"$RUNLOG              cp $RUNLOG $CDIR"/"$RUNLOG
             if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi  
764              return 1              return 1
765          fi          fi
766      )      )
# Line 880  check_eedata() Line 895  check_eedata()
895  #  Default properties  #  Default properties
896  debug=0  debug=0
897  verbose=1  verbose=1
 clean=0  
898    
899  IEEE=true  IEEE=true
900  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
# Line 895  NOMAKE=f Line 909  NOMAKE=f
909  NOGENMAKE=f  NOGENMAKE=f
910  NOCLEAN=f  NOCLEAN=f
911  NODEPEND=f  NODEPEND=f
912  POSTCLEAN=f  POSTCLEAN=0
913    
914  BASH=  BASH=
915  OPTFILE=NONE  OPTFILE=NONE
# Line 915  if test "x$CC" = x ; then Line 929  if test "x$CC" = x ; then
929  fi  fi
930  JOBS=  JOBS=
931  MPI=0  MPI=0
932    MPI_MFILE=
933  MULTI_THREAD=f  MULTI_THREAD=f
934  OUTDIR=  OUTDIR=
935  DELDIR=  DELDIR=
# Line 944  for ac_option ; do Line 959  for ac_option ; do
959    
960      case $ac_option in      case $ac_option in
961                    
962          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
963              usage ;;  
964                    -optfile | --optfile | -of | --of) ac_prev=OPTFILE ;;
965          -optfile | --optfile | -of | --of)          -optfile=* | --optfile=* | -of=* | --of=*) OPTFILE=$ac_optarg ;;
966              ac_prev=OPTFILE ;;  
967          -optfile=* | --optfile=* | -of=* | --of=*)          -addr | --addr | -a | --a) ac_prev=ADDRESSES ;;
968              OPTFILE=$ac_optarg ;;          -addr=* | --addr=* | -a=* | --a=*) ADDRESSES=$ac_optarg ;;
969                    -mpackdir | --mpackdir | -mpd | --mpd) ac_prev=MPACKDIR ;;
970          -addr | --addr | -a | --a)          -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*) MPACKDIR=$ac_optarg ;;
971              ac_prev=ADDRESSES ;;  
972          -addr=* | --addr=* | -a=* | --a=*)          -tdir | --tdir | -t | --t) ac_prev=TESTDIRS ;;
973              ADDRESSES=$ac_optarg ;;          -tdir=* | --tdir=* | -t=* | --t=*) TESTDIRS=$ac_optarg ;;
974          -mpackdir | --mpackdir | -mpd | --mpd)          -skipdir | --skipdir | -skd | --skd) ac_prev=SKIPDIRS ;;
975              ac_prev=MPACKDIR ;;          -skipdir=* | --skipdir=* | -skd=* | --skd=*) SKIPDIRS=$ac_optarg ;;
976          -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*)  
977              MPACKDIR=$ac_optarg ;;          -bash | --bash | -b | --b) ac_prev=BASH ;;
978            -bash=* | --bash=* | -b=* | --b=*) BASH=$ac_optarg ;;
979          -tdir | --tdir | -t | --t)  
980              ac_prev=TESTDIRS ;;          -command | --command | -c | --c) ac_prev=COMMAND ;;
981          -tdir=* | --tdir=* | -t=* | --t=*)          -command=* | --command=* | -c=* | --c=*) COMMAND=$ac_optarg ;;
982              TESTDIRS=$ac_optarg ;;  
983            -makedepend | --makedepend | -md | --md) ac_prev=MKDEPEND ;;
984          -skipdir | --skipdir | -skd | --skd)          -makedepend=* | --makedepend=* | -md=* | --md=*) MKDEPEND=$ac_optarg ;;
985              ac_prev=SKIPDIRS ;;  
986          -skipdir=* | --skipdir=* | -skd=* | --skd=*)          -make | --make | -m | --m) ac_prev=MAKE ;;
987              SKIPDIRS=$ac_optarg ;;          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;
988    
989          -bash | --bash | -b | --b)          -odir | --odir) ac_prev=OUTDIR ;;
990              ac_prev=BASH ;;          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;
991          -bash=* | --bash=* | -b=* | --b=*)  
992              BASH=$ac_optarg ;;          -ptracers | --ptracers | -ptr | --ptr) ac_prev=PTRACERS_NUM ;;
993            -ptracers=* | --ptracers=* | -ptr=* | --ptr=*) PTRACERS_NUM=$ac_optarg ;;
         -command | --command | -c | --c)  
             ac_prev=COMMAND ;;  
         -command=* | --command=* | -c=* | --c=*)  
             COMMAND=$ac_optarg ;;  
   
         -makedepend | --makedepend | -md | --md)  
             ac_prev=MKDEPEND ;;  
         -makedepend=* | --makedepend=* | -md=* | --md=*)  
             MKDEPEND=$ac_optarg ;;  
   
         -make | --make | -m | --m)  
             ac_prev=MAKE ;;  
         -make=* | --make=* | -m=* | --m=*)  
             MAKE=$ac_optarg ;;  
   
         -odir | --odir)  
             ac_prev=OUTDIR ;;  
         -odir=* | --odir=*)  
             OUTDIR=$ac_optarg ;;  
   
         -ptracers | --ptracers | -ptr | --ptr)  
             ac_prev=PTRACERS_NUM ;;  
         -ptracers=* | --ptracers=* | -ptr=* | --ptr=*)  
             PTRACERS_NUM=$ac_optarg ;;  
994    
995          -match | --match ) ac_prev=MATCH_CRIT ;;          -match | --match ) ac_prev=MATCH_CRIT ;;
996          -match=* | --match=* ) MATCH_CRIT=$ac_optarg ;;          -match=* | --match=* ) MATCH_CRIT=$ac_optarg ;;
# Line 1007  for ac_option ; do Line 998  for ac_option ; do
998          -j | --j) ac_prev=JOBS ;;          -j | --j) ac_prev=JOBS ;;
999          -j=* | --j=*) JOBS=$ac_optarg ;;          -j=* | --j=*) JOBS=$ac_optarg ;;
1000    
1001          -clean | --clean)          -clean | --clean) CLEANUP=t ; DELDIR=t ;;
             CLEANUP=t ; DELDIR=t ;;  
1002    
1003          -norun | --norun | -nr | --nr)          -norun | --norun | -nr | --nr) NORUN=t ;;
1004              NORUN=t ;;          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;
1005          -runonly | --runonly | -ro | --ro)          -quick | --quick | -q | --q) QUICK=t ;;
1006              QUICK=t ; NOMAKE=t ;;          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;
1007          -quick | --quick | -q | --q)          -noclean | --noclean | -nc | --nc) NOCLEAN=t ;;
1008              QUICK=t ;;          -nodepend | --nodepend | -nd | --nd) NODEPEND=t ;;
         -nogenmake | --nogenmake | -ng | --ng)  
             NOGENMAKE=t ;;  
         -noclean | --noclean | -nc | --nc)  
             NOCLEAN=t ;;  
         -nodepend | --nodepend | -nd | --nd)  
             NODEPEND=t ;;  
1009    
1010          -postclean | --postclean | -pc | --pc)          -postclean | --postclean | -pc | --pc) POSTCLEAN=2 ;;
1011              POSTCLEAN=t ;;          -deloutp | --deloutp | -do | --do) POSTCLEAN=1 ;;
1012    
1013          -mpi | --mpi) MPI=2 ;;          -mpi | --mpi) MPI=2 ;;
1014          -MPI | --MPI) ac_prev=MPI ;;          -MPI | --MPI) ac_prev=MPI ;;
1015          -MPI=* | --MPI=*) MPI=$ac_optarg ;;          -MPI=* | --MPI=*) MPI=$ac_optarg ;;
1016    
1017            -mfile | --mfile | -mf | --mf) ac_prev=MPI_MFILE ;;
1018            -mfile=* | --mfile=* | -mf=* | --mf=*) MPI_MFILE=$ac_optarg ;;
1019    
1020          -mth) MULTI_THREAD=t ;;          -mth) MULTI_THREAD=t ;;
1021    
1022          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
   
1023          -oad) OADM=t; NODEPEND=t ;;          -oad) OADM=t; NODEPEND=t ;;
1024    
1025          -ieee) IEEE=true ;;          -ieee) IEEE=true ;;
1026          -noieee) IEEE= ;;          -noieee) IEEE= ;;
1027          -gsl) GSL=t ;;          -gsl) GSL=t ;;
1028    
1029          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
1030          -debug) debug=1 ;;          -debug) debug=1 ;;
# Line 1052  for ac_option ; do Line 1038  for ac_option ; do
1038          -papis) PAPIS=t;;          -papis) PAPIS=t;;
1039          -pcls) PCL=t;;          -pcls) PCL=t;;
1040    
1041          -*)          -*) echo "Error: unrecognized option: "$ac_option
1042              echo "Error: unrecognized option: "$ac_option              usage ;;
1043              usage          *)  echo "Error: unrecognized argument: "$ac_option
1044              ;;              usage ;;
   
         *)  
             echo "Error: unrecognized argument: "$ac_option  
             usage  
             ;;  
1045    
1046       esac       esac
1047    
# Line 1072  if test "x$QUICK" = xt ; then Line 1053  if test "x$QUICK" = xt ; then
1053      NODEPEND=t      NODEPEND=t
1054  fi  fi
1055    
1056    #- check length of MPI machine file:
1057    if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then
1058        if test -r $MPI_MFILE ; then
1059            nl=`wc -l $MPI_MFILE | awk '{print $1}'`
1060            if [ $nl -lt $MPI ] ; then
1061              echo "Error: need at least $MPI nodes (currently only $nl) in MPI_MFILE=$MPI_FILE"
1062              usage
1063            fi
1064            if [ $verbose -gt 1 ]; then
1065                echo " MPI_MFILE=$MPI_MFILE : $nl procs for MPI=$MPI run"
1066            fi
1067        else
1068              echo "Error: cannot access MPI_MFILE=$MPI_FILE"
1069              usage
1070        fi
1071    fi
1072    
1073  #- setting for forward or ADM testing  #- setting for forward or ADM testing
1074  if test "x$ADM" = xt ; then  if test "x$ADM" = xt ; then
1075      code_dir=code_ad      code_dir=code_ad
# Line 1139  if test "x$OPTFILE" = xNONE -a "x$MITGCM Line 1137  if test "x$OPTFILE" = xNONE -a "x$MITGCM
1137      OPTFILE=$MITGCM_OF      OPTFILE=$MITGCM_OF
1138  fi  fi
1139    
1140    LOC_MFILE='tr_mpi_mfile'
1141  RUNLOG="run.tr_log"  RUNLOG="run.tr_log"
1142  OUTPUTFILE=$ref_outp  OUTPUTFILE=$ref_outp
1143  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
# Line 1331  for dir in $TESTDIRS ; do Line 1330  for dir in $TESTDIRS ; do
1330          if test -r $CODE_DIR"/SIZE.h_mpi" ; then          if test -r $CODE_DIR"/SIZE.h_mpi" ; then
1331              #- create new SIZE.h with no more than '$MPI' Procs              #- create new SIZE.h with no more than '$MPI' Procs
1332              mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI              mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI
1333              NPROC_MPI=$?              LOC_NPROC=$?
1334              (   cd $BUILD_DIR              (   cd $BUILD_DIR
1335                  if test -r SIZE.h.mpi ; then                  if test -r SIZE.h.mpi ; then
1336                      cmp tr_size.mpi SIZE.h.mpi > /dev/null 2>&1 ; RETVAL=$?                      cmp tr_size.mpi SIZE.h.mpi > /dev/null 2>&1 ; RETVAL=$?
# Line 1347  for dir in $TESTDIRS ; do Line 1346  for dir in $TESTDIRS ; do
1346              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"
1347              continue              continue
1348          fi          fi
1349            if test "x$MPI_MFILE" != x ; then
1350                #- create new MPI machine-file with the right number of Procs
1351                rm -f $LOC_MFILE
1352                cat $MPI_MFILE | sort | uniq | head -$LOC_NPROC > $LOC_MFILE
1353                nl=`wc -l $LOC_MFILE | awk '{print $1}'`
1354                if [ $nl -lt $LOC_NPROC ] ; then
1355                    rm -f $LOC_MFILE
1356                    cat $MPI_MFILE | head -$LOC_NPROC > $LOC_MFILE
1357                    #sed -n "1,$LOC_NPROC p" $MPI_MFILE > $LOC_MFILE
1358                fi
1359                if [ $verbose -gt 1 ]; then
1360                    nl=`wc -l $LOC_MFILE | awk '{print $1}'`
1361                    echo " new LOC_MFILE=$LOC_MFILE : $nl procs for LOC_NPROC=$LOC_NPROC"
1362                fi
1363            fi
1364      fi      fi
1365      if test ! -r $dir"/input/eedata.mth" -a "x$MULTI_THREAD" = "xt" ; then      if test ! -r $dir"/input/eedata.mth" -a "x$MULTI_THREAD" = "xt" ; then
1366          echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"          echo "can't find \"$dir/input/eedata.mth\" -- skipping $dir"
# Line 1401  for dir in $TESTDIRS ; do Line 1415  for dir in $TESTDIRS ; do
1415      unset genmake makedepend make run      unset genmake makedepend make run
1416      results=$EMPTY_RESULTS      results=$EMPTY_RESULTS
1417    
1418      #  Create an output dir for each OPTFILE/tdir combination      #  Create an output dir & summary.txt file for each tested experiment (tdir)
1419      locDIR=$DRESULTS"/"$dir      locDIR=$DRESULTS"/"$dir
1420      mkdir $locDIR      mkdir $locDIR
1421        #- report to this experiment local summary file ---
1422        echo "DATE='$DATE' ; tdir='$dir'" > $locDIR"/summary.txt"
1423        echo "MACH='$MACH'" >> $locDIR"/summary.txt"
1424        echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt"
1425      CDIR=`pwd`"/$locDIR"      CDIR=`pwd`"/$locDIR"
1426    
1427      if test "x$NORUN" = xt ; then      if test "x$NORUN" = xt ; then
# Line 1429  for dir in $TESTDIRS ; do Line 1447  for dir in $TESTDIRS ; do
1447          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1448          echo 1>&2          echo 1>&2
1449          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
         touch $locDIR"/summary.txt"  
1450          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
         echo "tdir='$dir'" >> $locDIR"/summary.txt"  
         if test "x$ADM" = xt ; then  
             head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt"  
             grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \  
                                 >> $locDIR"/summary.txt"  
         fi  
1451    
1452          for ex in $extra_runs ; do          for ex in $extra_runs ; do
1453              unset run              unset run
1454              results=$EMPTY_RESULTS              results=$EMPTY_RESULTS
1455              #  reference output file              #  reference output file
1456              refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"`              refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"`
1457              #  Create an output dir for each OPTFILE/tdir.ex combination              #  Create an output dir & summary.txt file for each extra run (tdir.ex)
1458              locDIR=$DRESULTS"/"$dir"."$ex              locDIR=$DRESULTS"/"$dir"."$ex
1459              mkdir $locDIR              mkdir $locDIR
1460                #- report to this experiment local summary file ---
1461                echo "DATE='$DATE' ; tdir='$dir.$ex'" > $locDIR"/summary.txt"
1462                #echo "MACH='$MACH'" >> $locDIR"/summary.txt"
1463                #echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt"
1464              CDIR=`pwd`"/$locDIR"              CDIR=`pwd`"/$locDIR"
1465              test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex"              test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex"
1466              run_clean $dir/$pfxdir.$ex              run_clean $dir/$pfxdir.$ex
# Line 1456  for dir in $TESTDIRS ; do Line 1471  for dir in $TESTDIRS ; do
1471              fres="$fres.$ex"              fres="$fres.$ex"
1472              echo 1>&2              echo 1>&2
1473              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
             touch $locDIR"/summary.txt"  
1474              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
1475              echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt"              if test "x$POSTCLEAN" = x2 ; then
             if test "x$ADM" = xt ; then  
                 head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt"  
                 grep -A3 'Seconds in section "ALL' $dir/$pfxdir.$ex/$OUTPUTFILE \  
                                    >> $locDIR"/summary.txt"  
             fi  
             if test "x$POSTCLEAN" = xt ; then  
1476                  run_clean $dir/$pfxdir.$ex                  run_clean $dir/$pfxdir.$ex
1477              fi              fi
1478          done          done
# Line 1499  for dir in $TESTDIRS ; do Line 1507  for dir in $TESTDIRS ; do
1507          fi          fi
1508      fi      fi
1509      #postclean $dir/$builddir      #postclean $dir/$builddir
1510      if test "x$POSTCLEAN" = xt ; then      if test "x$POSTCLEAN" = x2 ; then
1511          makeclean $dir/$builddir \          makeclean $dir/$builddir \
1512              && run_clean $dir/$rundir              && run_clean $dir/$rundir
1513      fi      fi
1514        if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then rm -f $LOC_MFILE ; fi
1515    
1516      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1517    

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

  ViewVC Help
Powered by ViewVC 1.1.22