/[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.138 by jmc, Tue Mar 30 16:40:03 2010 UTC revision 1.151 by jmc, Wed Dec 15 17:46:30 2010 UTC
# Line 25  usage() Line 25  usage()
25      echo "  (-tdir|-t) STRING        list of group and/or exp. dirs to test"      echo "  (-tdir|-t) STRING        list of group and/or exp. dirs to test"
26      echo "                             (recognized groups: basic, tutorials)"      echo "                             (recognized groups: basic, tutorials)"
27      echo "                             (DEF=\"\" which test all)"      echo "                             (DEF=\"\" which test all)"
28        echo "                             (if list= 'start_from THIS_EXP' then"
29        echo "                              test THIS_EXP + all the following)"
30      echo "  (-skipdir|-skd) STRING   list of exp. dirs to skip"      echo "  (-skipdir|-skd) STRING   list of exp. dirs to skip"
31      echo "                             (DEF=\"\" which test all)"      echo "                             (DEF=\"\" which test all)"
32      echo "  (-bash|-b) STRING        preferred location of a \"bash\" or"      echo "  (-bash|-b) STRING        preferred location of a \"bash\" or"
# Line 33  usage() Line 35  usage()
35      echo "  (-adm|-ad)               perform an adjoint run"      echo "  (-adm|-ad)               perform an adjoint run"
36      echo "  (-oad)                   perform an OpenAD adjoint run"      echo "  (-oad)                   perform an OpenAD adjoint run"
37      echo "  (-command|-c) STRING     command to run"      echo "  (-command|-c) STRING     command to run"
38        echo "  (-makedepend|-md) STRING command to use for \"makedepend\""
39      echo "  (-make|-m) STRING        command to use for \"make\""      echo "  (-make|-m) STRING        command to use for \"make\""
40      echo "                             (DEF=\"make\")"      echo "                             (DEF=\"make\")"
41      echo "  (-odir) STRING           used to build output directory name"      echo "  (-odir) STRING           used to build output directory name"
# Line 40  usage() Line 43  usage()
43      echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"      echo "  (-ptracers|-ptr) STRING  specify which ptracers to test"
44      echo "                             (DEF=\"1 2 3 4 5\")"      echo "                             (DEF=\"1 2 3 4 5\")"
45      echo "  (-match) NUMBER          Matching Criteria (number of digits)"      echo "  (-match) NUMBER          Matching Criteria (number of digits)"
46      echo "                             (DEF=\"12\")"      echo "                             (DEF=\"$MATCH_CRIT\")"
47      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"      echo "  (-j) JOBS                use \"make -j JOBS\" for parallel builds"
48      echo "  (-clean)                 *ONLY* run \"make CLEAN\""      echo "  (-clean)                 *ONLY* run \"make CLEAN\""
49      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"      echo "  (-norun|-nr)             skip the \"runmodel\" stage (stop after make)"
# Line 317  genmakemodel() Line 320  genmakemodel()
320          (          (
321              cd $1;              cd $1;
322              command="$GENMAKE2  -ds -m $MAKE"              command="$GENMAKE2  -ds -m $MAKE"
323                if test "x$MKDEPEND" != x ; then
324                    command="$command -makedepend=$MKDEPEND"
325                fi
326              if test "x$ADM" = xt ; then              if test "x$ADM" = xt ; then
327                  command="$command --mods=../code_ad"                  command="$command --mods=../code_ad"
328              elif test "x$OADM" = xt ; then              elif test "x$OADM" = xt ; then
# Line 353  genmakemodel() Line 359  genmakemodel()
359                  command="$command -pcls"                  command="$command -pcls"
360              fi              fi
361              fi              fi
362              printf 'genmake ... ' 1>&2              printf 'genmake ... '
363              # $command > make.log 2>&1              eval $command > genmake.tr_log 2>&1
             eval $command > make.log 2>&1  
364              RETVAL=$?              RETVAL=$?
365              #  Reduce the size of the testing emails!              #  Reduce the size of the testing emails!
366              head -100 Makefile > $CDIR/Makefile_head              head -100 Makefile > $CDIR/Makefile_head
367              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
368                  tail make.log                  tail genmake.tr_log
369                  echo "genmakemodel: genmake failed" 1>&2                  echo "genmakemodel: genmake failed"
370                  cp genmake_* make.log $CDIR                  cp genmake.log genmake_* genmake.tr_log $CDIR
371                  return 1                  return 1
372              else              else
373                  echo "successful" 1>&2                  echo "successful"
374              fi              fi
375          )          )
376      fi      fi
# Line 374  genmakemodel() Line 379  genmakemodel()
379  makeclean()  makeclean()
380  {  {
381      # makeclean directory      # makeclean directory
382        if test "x$NODEPEND" = xf ; then rm -f $1/make.tr_log ; fi
383      if test "x$NOCLEAN" = xt ; then      if test "x$NOCLEAN" = xt ; then
384          echo "make Clean skipped!"          echo "make Clean skipped!"
385      else      else
# Line 381  makeclean() Line 387  makeclean()
387              cd $1;              cd $1;
388              #if test -e $OUTPUTFILE ; then rm -f $OUTPUTFILE ; fi              #if test -e $OUTPUTFILE ; then rm -f $OUTPUTFILE ; fi
389              if test -r Makefile ; then              if test -r Makefile ; then
390                  printf 'clean build-dir: make Clean ... ' 2>&1                  printf 'clean build-dir: make Clean ... '
391                  $MAKE Clean >> make.log 2>&1                  rm -f Makefile.old
392                    $MAKE Clean >> make.tr_log 2>&1
393                  RETVAL=$?                  RETVAL=$?
394                  if test "x$RETVAL" != x0 ; then                  if test "x$RETVAL" != x0 ; then
395                      tail make.log                      tail make.tr_log
396                      echo "makeclean: \"make Clean\" failed" 1>&2                      echo "makeclean: \"make Clean\" failed"
397                      cp make.log $CDIR"/make.log"                      cp make.tr_log genmake.log genmake.tr_log $CDIR
398                      return 1                      return 1
399                  fi                  fi
400                  echo successful 1>&2                  echo successful
401              else              else
402                  echo ''                  echo ''
403              fi              fi
# Line 407  run_clean() Line 414  run_clean()
414      else      else
415          (          (
416              cd $1;              cd $1;
417              printf 'clean run-dir ... ' 2>&1              printf 'clean run-dir ... '
418              # part of what is done after "make clean" when doing "make CLEAN"              # part of what is done after "make clean" when doing "make CLEAN"
419              find . -name "*.meta" -exec rm {} \;              find . -name "*.meta" -exec rm {} \;
420              find . -name "*.data" -exec rm {} \;              find . -name "*.data" -exec rm {} \;
421              find . -name "fort.*" -exec rm {} \;              find . -name "fort.*" -exec rm {} \;
422              find . -type l -exec rm {} \;              find . -type l -exec rm {} \;
423              rm -f $EXECUTABLE *.txt STD* *diagnostics.log datetime              rm -f $EXECUTABLE $RUNLOG *.txt STD* *diagnostics.log datetime
424              rm -rf mnc_test_*              rm -rf mnc_test_*
425              rm -f *_MIT_CE_000.opt0000 costfunction*0000              rm -f *_MIT_CE_000.opt0000 costfunction*0000
426              echo successful 1>&2              echo successful
427              exit 0              exit 0
428          )          )
429      fi      fi
# Line 430  makedependmodel() Line 437  makedependmodel()
437      else      else
438          (          (
439              cd $1;              cd $1;
440              printf 'make depend ... ' 1>&2              printf 'make depend ... '
441              $MAKE depend >> make.log 2>&1              $MAKE depend >> make.tr_log 2>&1
442              RETVAL=$?              RETVAL=$?
443              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
444                  tail make.log                  tail make.tr_log
445                  echo "makedependmodel: make depend failed" 1>&2                  echo "makedependmodel: make depend failed"
446                  cp make.log $CDIR"/make.log"                  cp make.tr_log genmake.log genmake.tr_log $CDIR
447                  return 1                  return 1
448              else              else
449                  echo successful 1>&2                  echo successful
450              fi              fi
451          )          )
452      fi      fi
# Line 460  makemodel() Line 467  makemodel()
467      else      else
468          cd $1;          cd $1;
469          if test -r Makefile ; then          if test -r Makefile ; then
470              printf 'make ... ' 1>&2              printf 'make ... '
471              if test "x$ADM" = xt ; then              if test "x$ADM" = xt ; then
472                  $MAKE adall >> make.log 2>&1                  $MAKE adall >> make.tr_log 2>&1
473              elif test "x$OADM" = xt ; then              elif test "x$OADM" = xt ; then
474                  $MAKE adAll >> make.log 2>&1                  $MAKE adAll >> make.tr_log 2>&1
475              else              else
476                  if test "x$JOBS" = x ; then                  if test "x$JOBS" = x ; then
477                      $MAKE >> make.log 2>&1                      $MAKE >> make.tr_log 2>&1
478                  else                  else
479                      $MAKE -j $JOBS >> make.log 2>&1                      $MAKE -j $JOBS >> make.tr_log 2>&1
480                  fi                  fi
481              fi              fi
482              RETVAL=$?              RETVAL=$?
483              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
484                  tail make.log                  tail make.tr_log
485                  echo failed 1>&2                  echo failed
486                  cp make.log $CDIR"/make.log"                  cp make.tr_log genmake.log genmake.tr_log $CDIR
487                  rm -f $EXECUTABLE                  rm -f $EXECUTABLE
488                  return 1                  return 1
489              else              else
490                  echo successful 1>&2                  echo successful
491              fi              fi
492          fi          fi
493      fi      fi
# Line 543  linkdata() Line 550  linkdata()
550      if test -d $1 ; then      if test -d $1 ; then
551          (          (
552              cd $1 ; shift              cd $1 ; shift
553                echo 'linkdata from dirs:' $*
554              inpMPI=`(cd ../$1 ; find . -name "*.mpi" -print | sed 's:^\./::')`              inpMPI=`(cd ../$1 ; find . -name "*.mpi" -print | sed 's:^\./::')`
555              for xx in $inpMPI ; do              for xx in $inpMPI ; do
556                if test -r "../"$1"/"$xx ; then                if test -r "../"$1"/"$xx ; then
# Line 553  linkdata() Line 561  linkdata()
561                      if test -h $yy ; then rm -f $yy ; fi                      if test -h $yy ; then rm -f $yy ; fi
562                      if test ! -r $yy ; then                      if test ! -r $yy ; then
563                          ln -sf "../"$1"/"$xx $yy ;                          ln -sf "../"$1"/"$xx $yy ;
564                          printf "$xx " 1>&2                          printf " $xx" 1>&2
565                      fi                      fi
566                  else                  else
567                  # not mpi test: remove symbolic link                  # not mpi test: remove symbolic link
# Line 568  linkdata() Line 576  linkdata()
576                      if test -h eedata ; then rm -f eedata ; fi                      if test -h eedata ; then rm -f eedata ; fi
577                      if test ! -r eedata ; then                      if test ! -r eedata ; then
578                          ln -sf "../"$1"/eedata.mth" eedata ;                          ln -sf "../"$1"/eedata.mth" eedata ;
579                          printf 'eedata.mth ' 1>&2                          printf ' eedata.mth' 1>&2
580                      fi                      fi
581                  else                  else
582                  # not multi-threaded test: remove eedata symbolic link                  # not multi-threaded test: remove eedata symbolic link
# Line 578  linkdata() Line 586  linkdata()
586              prevDir='NONE'              prevDir='NONE'
587              for ldir in $* ; do              for ldir in $* ; do
588                  if test -d "../"$ldir -a $ldir != $prevDir ; then                  if test -d "../"$ldir -a $ldir != $prevDir ; then
589                      printf 'ldir='${ldir} 1>&2                      printf " ldir=${ldir}:" 1>&2
590                      files=`( cd "../"$ldir ; ls -1 | grep -v CVS )`                      files=`( cd "../"$ldir ; ls -1 | grep -v CVS )`
591                      for i in $files ; do                      for i in $files ; do
592                          if test ! -d "../"$ldir/$i ; then                          if test ! -d "../"$ldir/$i ; then
# Line 588  linkdata() Line 596  linkdata()
596                              fi                              fi
597                          fi                          fi
598                      done                      done
599                        printf ' ;' 1>&2
600                      if test -x "../"$ldir"/"prepare_run ; then                      if test -x "../"$ldir"/"prepare_run ; then
601                          "../"$ldir"/"prepare_run                          "../"$ldir"/"prepare_run 1>&2
602                        else
603                            echo '' 1>&2
604                      fi                      fi
                     printf ' ; ' 1>&2  
605                  fi                  fi
606                  prevDir=$ldir                  prevDir=$ldir
607              done              done
# Line 607  runmodel() Line 617  runmodel()
617      #  (where "$COMMAND" is relative to "directory")      #  (where "$COMMAND" is relative to "directory")
618      (      (
619          cd $1          cd $1
620          printf 'runmodel in %s ...' $1 1>&2          printf 'runmodel in %s ... ' $1
         # make output.txt  
         echo  
621          if test -L $EXECUTABLE ; then          if test -L $EXECUTABLE ; then
622            if test -x "../"$builddir"/"$EXECUTABLE ; then            if test -x "../"$builddir"/"$EXECUTABLE ; then
623              diff -q $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1              diff -q $EXECUTABLE "../"$builddir"/"$EXECUTABLE > /dev/null 2>&1
# Line 650  runmodel() Line 658  runmodel()
658          fi          fi
659          rm -f run.log_tmp          rm -f run.log_tmp
660          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then          if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then
661              tail $RUNLOG              echo successful
662              echo successful 1>&2              printf '=> output from running in %s :\n' $1 1>&2
663                tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
664              # === Reduce the size of the testing emails!              # === Reduce the size of the testing emails!
665              #cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE              #cp $OUTPUTFILE $CDIR"/"$OUTPUTFILE
666              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
667              return 0              return 0
668          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then          elif [ $RETVAL -ne 0 -a $ENDVAL -gt 0 ] ; then
669              #-- for some weird cases (run is finihed but with error code)              #-- for some weird cases (run is finihed but with error code)
670              tail $RUNLOG              echo 'finished with error (run:' $RETVAL ' end:' $ENDVAL ')'
671              echo finished with error '(run:' $RETVAL ' end:' $ENDVAL ')' 1>&2              printf '=> output from running in %s :\n' $1 1>&2
672                tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
673              return 0              return 0
674          else          else
675              tail $RUNLOG              echo 'failed (run:' $RETVAL ' end:' $ENDVAL ')'
676              echo failed '(run:' $RETVAL ' end:' $ENDVAL ')' 1>&2              printf '=> output from running in %s :\n' $1 1>&2
677                tail $RUNLOG | sed 's/^.*/> &/g' 1>&2
678              cp $RUNLOG $CDIR"/"$RUNLOG              cp $RUNLOG $CDIR"/"$RUNLOG
679              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi              if test -s STDERR.0000 ; then cp STDERR.0000 $CDIR"/STDERR.0000" ; fi
680              return 1              return 1
# Line 826  MPACKDIR="../tools/mpack-1.6" Line 837  MPACKDIR="../tools/mpack-1.6"
837  HAVE_MPACK=  HAVE_MPACK=
838  MPACK=  MPACK=
839  COMMAND=  COMMAND=
840    MKDEPEND=
841  if test "x$MAKE" = x ; then  if test "x$MAKE" = x ; then
842      MAKE=make      MAKE=make
843  fi  fi
# Line 845  OADM= Line 857  OADM=
857  # list of pTracers to check for monitor output  # list of pTracers to check for monitor output
858  PTRACERS_NUM="1 2 3 4 5"  PTRACERS_NUM="1 2 3 4 5"
859    
860  MATCH_CRIT=13  MATCH_CRIT=10
861    
862  printf "parsing options...  "  printf "parsing options...  "
863    
# Line 900  for ac_option ; do Line 912  for ac_option ; do
912          -command=* | --command=* | -c=* | --c=*)          -command=* | --command=* | -c=* | --c=*)
913              COMMAND=$ac_optarg ;;              COMMAND=$ac_optarg ;;
914    
915            -makedepend | --makedepend | -md | --md)
916                ac_prev=MKDEPEND ;;
917            -makedepend=* | --makedepend=* | -md=* | --md=*)
918                MKDEPEND=$ac_optarg ;;
919    
920          -make | --make | -m | --m)          -make | --make | -m | --m)
921              ac_prev=MAKE ;;              ac_prev=MAKE ;;
922          -make=* | --make=* | -m=* | --m=*)          -make=* | --make=* | -m=* | --m=*)
# Line 1002  else Line 1019  else
1019      EXECUTABLE="mitgcmuv"      EXECUTABLE="mitgcmuv"
1020  fi  fi
1021    
1022    xx=`echo $TESTDIRS | awk '{print $1}'`
1023  if test "x$TESTDIRS" = x ; then  if test "x$TESTDIRS" = x ; then
1024      LIST=`scandirs results/$ref_outp`      LIST=`scandirs results/$ref_outp`
1025    elif test $xx = 'start_from' ; then
1026        xx=`echo $TESTDIRS | awk '{print $2}'`
1027        LIST=`scandirs results/$ref_outp | sed -n "/$xx/,$ p"`
1028  else  else
1029      #- expand group of experiments:      #- expand group of experiments:
1030      LIST=" "      LIST=" "
# Line 1047  if test "x$OPTFILE" = xNONE -a "x$MITGCM Line 1068  if test "x$OPTFILE" = xNONE -a "x$MITGCM
1068      OPTFILE=$MITGCM_OF      OPTFILE=$MITGCM_OF
1069  fi  fi
1070    
1071  RUNLOG="run.log"  RUNLOG="run.tr_log"
1072  OUTPUTFILE=$ref_outp  OUTPUTFILE=$ref_outp
1073  if test "x$COMMAND" = x ; then  if test "x$COMMAND" = x ; then
1074      COMMAND="./$EXECUTABLE > $OUTPUTFILE"      COMMAND="./$EXECUTABLE > $OUTPUTFILE"
# Line 1155  if test "x$ADM" = x -a "x$OADM" = x; the Line 1176  if test "x$ADM" = x -a "x$OADM" = x; the
1176      then line_0="default  "$MATCH_CRIT ;      then line_0="default  "$MATCH_CRIT ;
1177      else line_0="default "$MATCH_CRIT ; fi      else line_0="default "$MATCH_CRIT ; fi
1178         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"         line_0="$line_0  ----T-----  ----S-----  ----U-----  ----V-----"
 #   line_0="            ----T-----  ----S-----  ----U-----  ----V-----"  
1179      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"
1180      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  ."
1181      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"
# Line 1188  N n k u  s  a Line 1208  N n k u  s  a
1208    
1209  EOF  EOF
1210  fi  fi
1211    echo "-------------------------------------------------------------------------------"
1212    
1213  #  ...and each test directory...  #  ...and each test directory...
1214  for dir in $TESTDIRS ; do  for dir in $TESTDIRS ; do
# Line 1196  for dir in $TESTDIRS ; do Line 1217  for dir in $TESTDIRS ; do
1217      builddir="build"      builddir="build"
1218      if test ! -d $dir/$builddir ; then mkdir $dir/$builddir ; fi      if test ! -d $dir/$builddir ; then mkdir $dir/$builddir ; fi
1219      rundir="run"      rundir="run"
1220        pfxdir="tr_$rundir"
1221      if test ! -d $dir/$rundir ; then      if test ! -d $dir/$rundir ; then
1222          rundir=$builddir          rundir=$builddir
1223      fi      fi
# Line 1206  for dir in $TESTDIRS ; do Line 1228  for dir in $TESTDIRS ; do
1228      if test "x$CLEANUP" = xt ; then      if test "x$CLEANUP" = xt ; then
1229          echo -n '  --- dir:' $BUILD_DIR ': '          echo -n '  --- dir:' $BUILD_DIR ': '
1230          makeclean $BUILD_DIR          makeclean $BUILD_DIR
1231          rm -f $BUILD_DIR/$EXECUTABLE          (   cd $BUILD_DIR
1232                rm -f $EXECUTABLE *.bak
1233                rm -f genmake_state genmake_*optfile genmake.log
1234                rm -f genmake.tr_log make.tr_log
1235            )
1236          if test -d $dir/$rundir/CVS ; then          if test -d $dir/$rundir/CVS ; then
1237              echo -n '  --- dir:' $dir/$rundir ': '              echo -n '  --- dir:' $dir/$rundir ': '
1238              run_clean $dir/$rundir              run_clean $dir/$rundir
1239          fi          fi
1240          trdir=`( cd $dir ; find . -type d -name "tr_run.*" -print | sed 's/^.\///')`          trdir=`( cd $dir ; find . -type d -name "$pfxdir.*" -print | sed 's/^.\///')`
1241          ttd=`echo $trdir | wc -w`          ttd=`echo $trdir | wc -w`
1242          if test $ttd != 0 ; then          if test $ttd != 0 ; then
1243              echo '  --- rm dir:' $trdir              echo '  --- rm dir:' $trdir
# Line 1277  for dir in $TESTDIRS ; do Line 1303  for dir in $TESTDIRS ; do
1303          fi          fi
1304      done      done
1305    
     echo "-------------------------------------------------------------------------------"  
1306      echo      echo
1307      if test "x$extra_runs" = "x" ; then      if test "x$extra_runs" = "x" ; then
1308         echo "Experiment:  $dir"         echo "Experiment:  $dir"
# Line 1297  for dir in $TESTDIRS ; do Line 1322  for dir in $TESTDIRS ; do
1322              run=N              run=N
1323          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
1324              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
             && run_clean $dir/$rundir \  
1325              && symlink_mpifiles $dir $code_dir $builddir \              && symlink_mpifiles $dir $code_dir $builddir \
1326              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
1327              && makemodel $dir/$builddir && make=Y              && makemodel $dir/$builddir && make=Y
1328      else      else
1329          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
1330              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
             && run_clean $dir/$rundir \  
1331              && symlink_mpifiles $dir $code_dir $builddir \              && symlink_mpifiles $dir $code_dir $builddir \
1332              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
1333              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
1334              && linkdata $dir/$rundir $inputdir input \              && run_clean $dir/$rundir \
1335                && linkdata $dir/$rundir $inputdir \
1336              && runmodel $dir/$rundir && run=Y \              && runmodel $dir/$rundir && run=Y \
1337              && results=`testoutput_run $dir $rundir $ref_outp`              && results=`testoutput_run $dir $rundir $ref_outp`
1338      fi      fi
   
1339      #echo "results='$results'"      #echo "results='$results'"
1340      echo  
1341          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`          fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1342          echo          echo 1>&2
1343          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY          echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
1344          touch $locDIR"/summary.txt"          touch $locDIR"/summary.txt"
1345          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"          echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
# Line 1339  for dir in $TESTDIRS ; do Line 1362  for dir in $TESTDIRS ; do
1362              locDIR=$DRESULTS"/"$dir"."$ex              locDIR=$DRESULTS"/"$dir"."$ex
1363              mkdir $locDIR              mkdir $locDIR
1364              CDIR=`pwd`"/$locDIR"              CDIR=`pwd`"/$locDIR"
1365              test ! -e "$dir/tr_run.$ex" && mkdir "$dir/tr_run.$ex"              test ! -e "$dir/$pfxdir.$ex" && mkdir "$dir/$pfxdir.$ex"
1366              run_clean $dir/tr_run.$ex              run_clean $dir/$pfxdir.$ex
1367              linkdata $dir/tr_run.$ex $inputdir.$ex $inputdir input              linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir
1368              runmodel $dir/tr_run.$ex && run=Y \              runmodel $dir/$pfxdir.$ex && run=Y \
1369              && results=`testoutput_run $dir tr_run.$ex $refExOut`              && results=`testoutput_run $dir $pfxdir.$ex $refExOut`
1370              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`              fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results`
1371              fres="$fres.$ex"              fres="$fres.$ex"
1372              echo              echo 1>&2
1373              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY              echo "$fres" | sed 's/ 99/ --/g' | sed 's/  > />/' | sed 's/  < /</' >> $SUMMARY
1374              touch $locDIR"/summary.txt"              touch $locDIR"/summary.txt"
1375              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"              echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt"
# Line 1356  for dir in $TESTDIRS ; do Line 1379  for dir in $TESTDIRS ; do
1379              echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt"              echo "tdir='$dir.$ex'" >> $locDIR"/summary.txt"
1380              if test "x$ADM" = xt ; then              if test "x$ADM" = xt ; then
1381                  head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt"                  head -1 $dir/$builddir/taf_ad.log >> $locDIR"/summary.txt"
1382                  grep -A3 'Seconds in section "ALL' $dir/tr_run.$ex/$OUTPUTFILE \                  grep -A3 'Seconds in section "ALL' $dir/$pfxdir.$ex/$OUTPUTFILE \
1383                                     >> $locDIR"/summary.txt"                                     >> $locDIR"/summary.txt"
1384              fi              fi
1385              if test "x$POSTCLEAN" = xt ; then              if test "x$POSTCLEAN" = xt ; then
1386                  run_clean $dir/tr_run.$ex                  run_clean $dir/$pfxdir.$ex
1387              fi              fi
1388          done          done
1389    
1390      if test -f $DRESULTS"/"genmake_state ; then : ; else      if test -f $DRESULTS"/"genmake_state ; then : ; else
1391          if test -f $dir/$builddir/Makefile ; then          if test -f $dir/$builddir/Makefile ; then
1392              mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'`              mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'`
1393              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state              echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state
1394              sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state              sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state
1395              echo $mkOpt >> $DRESULTS/genmake_state              echo " $mkOpt" >> $DRESULTS/genmake_state
1396                gmkLog=$dir/$builddir/genmake.log
1397                grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1
1398                RETVAL=$?
1399                if test "x$RETVAL" = x0 ; then
1400                    echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state
1401                    sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \
1402                           | grep -v '^... compiler version ' > tr_vers.tmp_log
1403                    sed -n '1,/^$/p' tr_vers.tmp_log | sed '/^$/d' | sed 's/^./ &/' \
1404                            >> $DRESULTS/genmake_state
1405                    rm -f tr_vers.tmp_log
1406                fi
1407          fi          fi
1408      fi      fi
1409      #postclean $dir/$builddir      #postclean $dir/$builddir

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.151

  ViewVC Help
Powered by ViewVC 1.1.22