/[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.158 by jmc, Thu Jan 27 18:20:38 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 498  makemodel() Line 495  makemodel()
495              fi              fi
496          fi          fi
497      fi      fi
498        if test "x$ADM" = xt -a -f taf_ad.log ; then
499                head -1 taf_ad.log >> $CDIR"/summary.txt"
500                nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log`
501                nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log`
502                echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \
503                                    >> $CDIR"/summary.txt"
504        fi
505      )      )
506  }  }
507    
# Line 679  runmodel() Line 683  runmodel()
683      (      (
684          cd $1          cd $1
685          printf 'runmodel in %s ... ' $1          printf 'runmodel in %s ... ' $1
686            if test "x$MPI" != x0 ; then
687                #- adjust the MPI run command with the right number of Procs
688                #echo '' ; echo "  COMMAND='$COMMAND'"
689                COMMAND=`echo $COMMAND | sed "s/ TR_NPROC / $LOC_NPROC /"`
690                if test "x$MPI_MFILE" != x ; then
691                  COMMAND=`echo $COMMAND | sed "s/ TR_MFILE / ..\/..\/$LOC_MFILE /"`
692                fi
693                #echo "  COMMAND='$COMMAND'"
694            fi
695          if test -L $EXECUTABLE ; then          if test -L $EXECUTABLE ; then
696            if test -x "../"$builddir"/"$EXECUTABLE ; then            if test -x "../"$builddir"/"$EXECUTABLE ; then
697              cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1              cmp $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1
# Line 690  runmodel() Line 703  runmodel()
703              echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp              echo " link" $EXECUTABLE "from dir ../"$builddir > run.log_tmp
704              ln -sf "../"$builddir"/"$EXECUTABLE .              ln -sf "../"$builddir"/"$EXECUTABLE .
705          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  
706          if test ! -x $EXECUTABLE ; then          if test ! -x $EXECUTABLE ; then
707                  rm -f $RUNLOG ; touch $RUNLOG              rm -f $RUNLOG ; touch $RUNLOG
708                  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
709                  echo " no executable:" $EXECUTABLE >> $RUNLOG              echo " no executable:" $EXECUTABLE >> $RUNLOG
710                  RETVAL=8              RETVAL=8
711                  ENDVAL=-1              ENDVAL=-1
712          else          else
713              if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then            if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then
714                # output do not exist or is older than executable:              # output do not exist or is older than executable:
715                  rm -f $RUNLOG ; touch $RUNLOG              rm -f $RUNLOG ; touch $RUNLOG
716                  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
717                  ( eval $COMMAND ) >> $RUNLOG 2>&1              ( eval $COMMAND ) >> $RUNLOG 2>&1
718                  RETVAL=$?              RETVAL=$?
719              else              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`
720                  RETVAL=0              if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then
721                  if test -f $RUNLOG ; then                  find . -name "*.meta" -exec rm {} \;
722                      if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi                  find . -name "*.data" -exec rm {} \;
723                      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  
724              fi              fi
725              #ENDVAL=`cat $RUNLOG | grep -v 'ABNORMAL END' | grep -c 'NORMAL END'`            else
726                RETVAL=0
727              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`              ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'`
728                touch $RUNLOG
729                if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi
730                echo "---------->> $OUTPUTFILE is up to date " >> $RUNLOG 2>&1
731              fi
732          fi          fi
733          rm -f run.log_tmp          rm -f run.log_tmp
734            #- in all cases where OutputFile exists, report SIZE (and AD time)
735            if test -f $OUTPUTFILE ; then
736              grep '(PID\.TID 0000\.0001)      n.. =' $OUTPUTFILE \
737                    | sed 's/(PID.TID 0000.0001)     //' >> $CDIR"/summary.txt"
738              if test "x$ADM" = xt ; then
739                grep -A3 'Seconds in section "ALL' $OUTPUTFILE >> $CDIR"/summary.txt"
740              fi
741            fi
742            if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
743          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
744              echo successful              echo successful
745              printf '=> output from running in %s :\n' $1 1>&2              printf '=> output from running in %s :\n' $1 1>&2
746              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  
747              return 0              return 0
748          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then
749              #-- 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 756  runmodel()
756              printf '=> output from running in %s :\n' $1 1>&2              printf '=> output from running in %s :\n' $1 1>&2
757              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2              tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
758              cp $RUNLOG $CDIR"/"$RUNLOG              cp $RUNLOG $CDIR"/"$RUNLOG
             if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi  
759              return 1              return 1
760          fi          fi
761      )      )
# Line 880  check_eedata() Line 890  check_eedata()
890  #  Default properties  #  Default properties
891  debug=0  debug=0
892  verbose=1  verbose=1
 clean=0  
893    
894  IEEE=true  IEEE=true
895  if test "x$MITGCM_IEEE" != x ; then  if test "x$MITGCM_IEEE" != x ; then
# Line 895  NOMAKE=f Line 904  NOMAKE=f
904  NOGENMAKE=f  NOGENMAKE=f
905  NOCLEAN=f  NOCLEAN=f
906  NODEPEND=f  NODEPEND=f
907  POSTCLEAN=f  POSTCLEAN=0
908    
909  BASH=  BASH=
910  OPTFILE=NONE  OPTFILE=NONE
# Line 915  if test "x$CC" = x ; then Line 924  if test "x$CC" = x ; then
924  fi  fi
925  JOBS=  JOBS=
926  MPI=0  MPI=0
927    MPI_MFILE=
928  MULTI_THREAD=f  MULTI_THREAD=f
929  OUTDIR=  OUTDIR=
930  DELDIR=  DELDIR=
# Line 944  for ac_option ; do Line 954  for ac_option ; do
954    
955      case $ac_option in      case $ac_option in
956                    
957          -help | --help | -h | --h)          -help | --help | -h | --h) usage ;;
958              usage ;;  
959                    -optfile | --optfile | -of | --of) ac_prev=OPTFILE ;;
960          -optfile | --optfile | -of | --of)          -optfile=* | --optfile=* | -of=* | --of=*) OPTFILE=$ac_optarg ;;
961              ac_prev=OPTFILE ;;  
962          -optfile=* | --optfile=* | -of=* | --of=*)          -addr | --addr | -a | --a) ac_prev=ADDRESSES ;;
963              OPTFILE=$ac_optarg ;;          -addr=* | --addr=* | -a=* | --a=*) ADDRESSES=$ac_optarg ;;
964                    -mpackdir | --mpackdir | -mpd | --mpd) ac_prev=MPACKDIR ;;
965          -addr | --addr | -a | --a)          -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*) MPACKDIR=$ac_optarg ;;
966              ac_prev=ADDRESSES ;;  
967          -addr=* | --addr=* | -a=* | --a=*)          -tdir | --tdir | -t | --t) ac_prev=TESTDIRS ;;
968              ADDRESSES=$ac_optarg ;;          -tdir=* | --tdir=* | -t=* | --t=*) TESTDIRS=$ac_optarg ;;
969          -mpackdir | --mpackdir | -mpd | --mpd)          -skipdir | --skipdir | -skd | --skd) ac_prev=SKIPDIRS ;;
970              ac_prev=MPACKDIR ;;          -skipdir=* | --skipdir=* | -skd=* | --skd=*) SKIPDIRS=$ac_optarg ;;
971          -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*)  
972              MPACKDIR=$ac_optarg ;;          -bash | --bash | -b | --b) ac_prev=BASH ;;
973            -bash=* | --bash=* | -b=* | --b=*) BASH=$ac_optarg ;;
974          -tdir | --tdir | -t | --t)  
975              ac_prev=TESTDIRS ;;          -command | --command | -c | --c) ac_prev=COMMAND ;;
976          -tdir=* | --tdir=* | -t=* | --t=*)          -command=* | --command=* | -c=* | --c=*) COMMAND=$ac_optarg ;;
977              TESTDIRS=$ac_optarg ;;  
978            -makedepend | --makedepend | -md | --md) ac_prev=MKDEPEND ;;
979          -skipdir | --skipdir | -skd | --skd)          -makedepend=* | --makedepend=* | -md=* | --md=*) MKDEPEND=$ac_optarg ;;
980              ac_prev=SKIPDIRS ;;  
981          -skipdir=* | --skipdir=* | -skd=* | --skd=*)          -make | --make | -m | --m) ac_prev=MAKE ;;
982              SKIPDIRS=$ac_optarg ;;          -make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;;
983    
984          -bash | --bash | -b | --b)          -odir | --odir) ac_prev=OUTDIR ;;
985              ac_prev=BASH ;;          -odir=* | --odir=*) OUTDIR=$ac_optarg ;;
986          -bash=* | --bash=* | -b=* | --b=*)  
987              BASH=$ac_optarg ;;          -ptracers | --ptracers | -ptr | --ptr) ac_prev=PTRACERS_NUM ;;
988            -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 ;;  
989    
990          -match | --match ) ac_prev=MATCH_CRIT ;;          -match | --match ) ac_prev=MATCH_CRIT ;;
991          -match=* | --match=* ) MATCH_CRIT=$ac_optarg ;;          -match=* | --match=* ) MATCH_CRIT=$ac_optarg ;;
# Line 1007  for ac_option ; do Line 993  for ac_option ; do
993          -j | --j) ac_prev=JOBS ;;          -j | --j) ac_prev=JOBS ;;
994          -j=* | --j=*) JOBS=$ac_optarg ;;          -j=* | --j=*) JOBS=$ac_optarg ;;
995    
996          -clean | --clean)          -clean | --clean) CLEANUP=t ; DELDIR=t ;;
             CLEANUP=t ; DELDIR=t ;;  
997    
998          -norun | --norun | -nr | --nr)          -norun | --norun | -nr | --nr) NORUN=t ;;
999              NORUN=t ;;          -runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;;
1000          -runonly | --runonly | -ro | --ro)          -quick | --quick | -q | --q) QUICK=t ;;
1001              QUICK=t ; NOMAKE=t ;;          -nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;;
1002          -quick | --quick | -q | --q)          -noclean | --noclean | -nc | --nc) NOCLEAN=t ;;
1003              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 ;;  
1004    
1005          -postclean | --postclean | -pc | --pc)          -postclean | --postclean | -pc | --pc) POSTCLEAN=2 ;;
1006              POSTCLEAN=t ;;          -deloutp | --deloutp | -do | --do) POSTCLEAN=1 ;;
1007    
1008          -mpi | --mpi) MPI=2 ;;          -mpi | --mpi) MPI=2 ;;
1009          -MPI | --MPI) ac_prev=MPI ;;          -MPI | --MPI) ac_prev=MPI ;;
1010          -MPI=* | --MPI=*) MPI=$ac_optarg ;;          -MPI=* | --MPI=*) MPI=$ac_optarg ;;
1011    
1012            -mfile | --mfile | -mf | --mf) ac_prev=MPI_MFILE ;;
1013            -mfile=* | --mfile=* | -mf=* | --mf=*) MPI_MFILE=$ac_optarg ;;
1014    
1015          -mth) MULTI_THREAD=t ;;          -mth) MULTI_THREAD=t ;;
1016    
1017          -adm | -ad) ADM=t ;;          -adm | -ad) ADM=t ;;
   
1018          -oad) OADM=t; NODEPEND=t ;;          -oad) OADM=t; NODEPEND=t ;;
1019    
1020          -ieee) IEEE=true ;;          -ieee) IEEE=true ;;
1021          -noieee) IEEE= ;;          -noieee) IEEE= ;;
1022          -gsl) GSL=t ;;          -gsl) GSL=t ;;
1023    
1024          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
1025          -debug) debug=1 ;;          -debug) debug=1 ;;
# Line 1052  for ac_option ; do Line 1033  for ac_option ; do
1033          -papis) PAPIS=t;;          -papis) PAPIS=t;;
1034          -pcls) PCL=t;;          -pcls) PCL=t;;
1035    
1036          -*)          -*) echo "Error: unrecognized option: "$ac_option
1037              echo "Error: unrecognized option: "$ac_option              usage ;;
1038              usage          *)  echo "Error: unrecognized argument: "$ac_option
1039              ;;              usage ;;
   
         *)  
             echo "Error: unrecognized argument: "$ac_option  
             usage  
             ;;  
1040    
1041       esac       esac
1042    
# Line 1072  if test "x$QUICK" = xt ; then Line 1048  if test "x$QUICK" = xt ; then
1048      NODEPEND=t      NODEPEND=t
1049  fi  fi
1050    
1051    #- check length of MPI machine file:
1052    if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then
1053        if test -r $MPI_MFILE ; then
1054            nl=`wc -l $MPI_MFILE | awk '{print $1}'`
1055            if [ $nl -lt $MPI ] ; then
1056              echo "Error: need at least $MPI nodes (currently only $nl) in MPI_MFILE=$MPI_FILE"
1057              usage
1058            fi
1059            if [ $verbose -gt 1 ]; then
1060                echo " MPI_MFILE=$MPI_MFILE : $nl procs for MPI=$MPI run"
1061            fi
1062        else
1063              echo "Error: cannot access MPI_MFILE=$MPI_FILE"
1064              usage
1065        fi
1066    fi
1067    
1068  #- setting for forward or ADM testing  #- setting for forward or ADM testing
1069  if test "x$ADM" = xt ; then  if test "x$ADM" = xt ; then
1070      code_dir=code_ad      code_dir=code_ad
# Line 1139  if test "x$OPTFILE" = xNONE -a "x$MITGCM Line 1132  if test "x$OPTFILE" = xNONE -a "x$MITGCM
1132      OPTFILE=$MITGCM_OF      OPTFILE=$MITGCM_OF
1133  fi  fi
1134    
1135    LOC_MFILE='tr_mpi_mfile'
1136  RUNLOG="run.tr_log"  RUNLOG="run.tr_log"
1137  OUTPUTFILE=$ref_outp  OUTPUTFILE=$ref_outp
1138  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
# Line 1331  for dir in $TESTDIRS ; do Line 1325  for dir in $TESTDIRS ; do
1325          if test -r $CODE_DIR"/SIZE.h_mpi" ; then          if test -r $CODE_DIR"/SIZE.h_mpi" ; then
1326              #- create new SIZE.h with no more than '$MPI' Procs              #- create new SIZE.h with no more than '$MPI' Procs
1327              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
1328              NPROC_MPI=$?              LOC_NPROC=$?
1329              (   cd $BUILD_DIR              (   cd $BUILD_DIR
1330                  if test -r SIZE.h.mpi ; then                  if test -r SIZE.h.mpi ; then
1331                      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 1341  for dir in $TESTDIRS ; do
1341              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"              echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir"
1342              continue              continue
1343          fi          fi
1344            if test "x$MPI_MFILE" != x ; then
1345                #- create new MPI machine-file with the right number of Procs
1346                rm -f $LOC_MFILE
1347                cat $MPI_MFILE | sort | uniq | head -$LOC_NPROC > $LOC_MFILE
1348                nl=`wc -l $LOC_MFILE | awk '{print $1}'`
1349                if [ $nl -lt $LOC_NPROC ] ; then
1350                    rm -f $LOC_MFILE
1351                    cat $MPI_MFILE | head -$LOC_NPROC > $LOC_MFILE
1352                    #sed -n "1,$LOC_NPROC p" $MPI_MFILE > $LOC_MFILE
1353                fi
1354                if [ $verbose -gt 1 ]; then
1355                    nl=`wc -l $LOC_MFILE | awk '{print $1}'`
1356                    echo " new LOC_MFILE=$LOC_MFILE : $nl procs for LOC_NPROC=$LOC_NPROC"
1357                fi
1358            fi
1359      fi      fi
1360      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
1361          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 1410  for dir in $TESTDIRS ; do
1410      unset genmake makedepend make run      unset genmake makedepend make run
1411      results=$EMPTY_RESULTS      results=$EMPTY_RESULTS
1412    
1413      #  Create an output dir for each OPTFILE/tdir combination      #  Create an output dir & summary.txt file for each tested experiment (tdir)
1414      locDIR=$DRESULTS"/"$dir      locDIR=$DRESULTS"/"$dir
1415      mkdir $locDIR      mkdir $locDIR
1416        #- report to this experiment local summary file ---
1417        echo "DATE='$DATE' ; tdir='$dir'" > $locDIR"/summary.txt"
1418        echo "MACH='$MACH'" >> $locDIR"/summary.txt"
1419        echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt"
1420      CDIR=`pwd`"/$locDIR"      CDIR=`pwd`"/$locDIR"
1421    
1422      if test "x$NORUN" = xt ; then      if test "x$NORUN" = xt ; then
# Line 1429  for dir in $TESTDIRS ; do Line 1442  for dir in $TESTDIRS ; do
1442          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1443          echo 1>&2          echo 1>&2
1444          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"  
1445          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  
1446    
1447          for ex in $extra_runs ; do          for ex in $extra_runs ; do
1448              unset run              unset run
1449              results=$EMPTY_RESULTS              results=$EMPTY_RESULTS
1450              #  reference output file              #  reference output file
1451              refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"`              refExOut=`echo $ref_outp | sed "s/\./.${ex}./g"`
1452              #  Create an output dir for each OPTFILE/tdir.ex combination              #  Create an output dir & summary.txt file for each extra run (tdir.ex)
1453              locDIR=$DRESULTS"/"$dir"."$ex              locDIR=$DRESULTS"/"$dir"."$ex
1454              mkdir $locDIR              mkdir $locDIR
1455                #- report to this experiment local summary file ---
1456                echo "DATE='$DATE' ; tdir='$dir.$ex'" > $locDIR"/summary.txt"
1457                #echo "MACH='$MACH'" >> $locDIR"/summary.txt"
1458                #echo "UNAMEA='$UNAMEA'" >> $locDIR"/summary.txt"
1459              CDIR=`pwd`"/$locDIR"              CDIR=`pwd`"/$locDIR"
1460              test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex"              test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex"
1461              run_clean $dir/$pfxdir.$ex              run_clean $dir/$pfxdir.$ex
# Line 1456  for dir in $TESTDIRS ; do Line 1466  for dir in $TESTDIRS ; do
1466              fres="$fres.$ex"              fres="$fres.$ex"
1467              echo 1>&2              echo 1>&2
1468              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"  
1469              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
1470              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  
1471                  run_clean $dir/$pfxdir.$ex                  run_clean $dir/$pfxdir.$ex
1472              fi              fi
1473          done          done
# Line 1499  for dir in $TESTDIRS ; do Line 1502  for dir in $TESTDIRS ; do
1502          fi          fi
1503      fi      fi
1504      #postclean $dir/$builddir      #postclean $dir/$builddir
1505      if test "x$POSTCLEAN" = xt ; then      if test "x$POSTCLEAN" = x2 ; then
1506          makeclean $dir/$builddir \          makeclean $dir/$builddir \
1507              && run_clean $dir/$rundir              && run_clean $dir/$rundir
1508      fi      fi
1509        if test "x$MPI" != x0 -a "x$MPI_MFILE" != x ; then rm -f $LOC_MFILE ; fi
1510    
1511      echo "-------------------------------------------------------------------------------"      echo "-------------------------------------------------------------------------------"
1512    

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

  ViewVC Help
Powered by ViewVC 1.1.22