diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2014-04-11 18:50:55 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2014-04-11 18:50:55 (GMT) |
commit | 17a1f1a5976b98db1788200f0b015694f85cb008 (patch) | |
tree | 0334bcff5cac09f99eb858fdaa0011f182270dbd | |
parent | 29791cf160f67f4cccf293c57a5b9479407f7c1b (diff) | |
download | hdf5-17a1f1a5976b98db1788200f0b015694f85cb008.zip hdf5-17a1f1a5976b98db1788200f0b015694f85cb008.tar.gz hdf5-17a1f1a5976b98db1788200f0b015694f85cb008.tar.bz2 |
[svn-r25017] Merge r24997 changes from trunk.
Added compiler versions for mpich to settings file and configure summary.
For make installcheck, compile and run installed examples using the installed scripts. They
were being compiled but not run.
Add Fortran2003 examples to the run-ex-fortran script when fortran2003 is enabled.
Set flag to -O3 in production mode for Intel compilers other than those with specified other settings.
Gentoo patches:
Remove unnecessary setting of LD_LIBRARY_PATH from configure.
Prevent potential array subscript out of bounds error in perform/pio_engine.c and sio_engine.c.
Tested with h5committest on jam, koala, ostrich and platypus.
-rw-r--r-- | c++/examples/Makefile.am | 4 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 24 | ||||
-rw-r--r-- | config/examples.am | 23 | ||||
-rw-r--r-- | config/intel-flags | 11 | ||||
-rw-r--r-- | config/linux-gnulibc1 | 21 | ||||
-rw-r--r-- | config/solaris2.x | 6 | ||||
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | examples/Makefile.am | 10 | ||||
-rw-r--r-- | examples/Makefile.in | 30 | ||||
-rw-r--r-- | fortran/examples/Makefile.am | 4 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 24 | ||||
-rw-r--r-- | fortran/examples/run-fortran-ex.sh.in | 32 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.am | 1 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.in | 22 | ||||
-rw-r--r-- | hl/examples/Makefile.am | 5 | ||||
-rw-r--r-- | hl/examples/Makefile.in | 26 | ||||
-rw-r--r-- | hl/fortran/examples/Makefile.am | 1 | ||||
-rw-r--r-- | hl/fortran/examples/Makefile.in | 22 | ||||
-rw-r--r-- | perform/pio_engine.c | 2 | ||||
-rw-r--r-- | perform/sio_engine.c | 2 |
21 files changed, 185 insertions, 97 deletions
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index df68447..92c757f 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -21,6 +21,8 @@ include $(top_srcdir)/config/commence.am +INSTALL_SCRIPT_FILES = run-c++-ex.sh + # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \ @@ -28,6 +30,7 @@ EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \ h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \ h5tutr_subset TEST_SCRIPT=testh5c++.sh +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # These are the example files to be installed INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \ @@ -35,7 +38,6 @@ INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \ h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \ h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \ h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp -INSTALL_SCRIPT_FILES = run-c++-ex.sh # Some of the examples depend on files created by running other examples readdata.chkexe_: create.chkexe_ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index b8c41b2..14001d5 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -613,6 +613,7 @@ TRACE = perl $(top_srcdir)/bin/trace # .chklog files are output from those tests. # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +INSTALL_SCRIPT_FILES = run-c++-ex.sh # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. @@ -622,6 +623,7 @@ EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group \ h5tutr_subset TEST_SCRIPT = testh5c++.sh +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # These are the example files to be installed INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \ @@ -630,7 +632,6 @@ INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \ h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \ h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp -INSTALL_SCRIPT_FILES = run-c++-ex.sh # Tell conclude.am that these are C++ tests. CXX_API = yes @@ -1101,27 +1102,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/config/examples.am b/config/examples.am index bf0708c..8597a16 100644 --- a/config/examples.am +++ b/config/examples.am @@ -91,27 +91,32 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi - - + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi diff --git a/config/intel-flags b/config/intel-flags index 1d01d7f..3187daf 100644 --- a/config/intel-flags +++ b/config/intel-flags @@ -92,12 +92,8 @@ fi # # Please follow the pattern below by adding new versions at the top, copying # the information from the previous version and adding modifications to that. +# The default at the bottom will apply if no earlier version matches. case "$cc_vendor-$cc_version" in - icc-11* | icc-12*) - # -s became obsolete; we also fixed bugs that allow us to enable higher level - # of optimization starting with 1.8.7 - PROD_CFLAGS="-O3" - ;; icc-10*) PROD_CFLAGS="-O1 -Wl,-s" ;; @@ -105,6 +101,11 @@ case "$cc_vendor-$cc_version" in # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. PROD_CFLAGS="-O2 -Wl,-s" ;; + icc-*) + # -s became obsolete; we also fixed bugs that allow us to enable higher level + # of optimization starting with 1.8.7 + PROD_CFLAGS="-O3" + ;; esac # Clear cc info if no flags set diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 9dcc411..c18c02d 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -41,7 +41,6 @@ fi # Figure out Intel C compiler flags . $srcdir/config/intel-flags -echo "CC_BASENAME is $CC_BASENAME." # Use default Fortran 90 compiler according to what C compiler is used. if test "X-" = "X-$FC"; then case $CC_BASENAME in @@ -136,6 +135,13 @@ case $CC in cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` ;; + # this must come before *icc* for the same reason + *mpicc*) + cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -v 2>&1 | grep 'version' |\ + sed 's/^[a-z0-9]* for //' |\ + sed 's/^\([a-z]* \)/ built with \1/1'` + cc_version_info=`echo $cc_version_info` + ;; *icc*) cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ @@ -154,6 +160,13 @@ case $FC in grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` ;; + *mpif90*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 | grep 'version' |\ + sed 's/^[a-z0-9]* for //' |\ + sed 's/^\([a-z]* \)/ built with \1/1'` + fc_version_info=`echo $fc_version_info` + ;; + *ifc*|*ifort*) fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` @@ -202,6 +215,12 @@ case $CXX in cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'` ;; + *mpicxx*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep 'version' |\ + sed 's/^[a-z0-9]* for //' |\ + sed 's/^\([a-z]* \)/ built with \1/1'` + cxx_version_info=`echo $cxx_version_info` + ;; *) echo "No match to get cxx_version_info for $CXX" diff --git a/config/solaris2.x b/config/solaris2.x index edf8d59..310c373 100644 --- a/config/solaris2.x +++ b/config/solaris2.x @@ -122,7 +122,7 @@ fi case $CC in *cc*) cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun.*\)/\1 /'` + sed 's/.*\(Sun .*\)/\1 /'` ;; *) @@ -135,7 +135,7 @@ case $FC in # The PGI and Intel compilers are automatically detected below *f90*) fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun.*\)/\1 /'` + sed 's/.*\(Sun .*\)/\1 /'` ;; *) @@ -148,7 +148,7 @@ echo "Fortran compiler '$FC' is $fc_version_info" case $CXX in *CC*) cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Sun' |\ - sed 's/.*\(Sun.*\)/\1 /'` + sed 's/.*\(Sun .*\)/\1 /'` ;; *) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 24968 2014-04-06 22:10:58Z hdftest . +# From configure.ac Id: configure.ac 25016 2014-04-11 15:32:58Z derobins . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for HDF5 1.8.13-snap8. # @@ -27734,9 +27734,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## Try to figure out how to print `long long'. Some machines use `%lld' ## and others use `%qd'. There may be more! The final `l' is a ## default in case none of the others work. -## Need to patch up LD_LIBRARY_PATH so that the execution can find all -## the dynamic library. The correct way to do it should be updating -## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. ## { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print long long" >&5 $as_echo_n "checking how to print long long... " >&6; } @@ -27744,8 +27741,6 @@ if ${hdf5_cv_printf_ll+:} false; then : $as_echo_n "(cached) " >&6 else -LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" -export LD_LIBRARY_PATH for hdf5_cv_printf_ll in l ll L q unknown; do if test "$cross_compiling" = yes; then : diff --git a/configure.ac b/configure.ac index 45e7c1f..6da1cdb 100644 --- a/configure.ac +++ b/configure.ac @@ -2349,14 +2349,9 @@ AC_TRY_COMPILE(,[ ## Try to figure out how to print `long long'. Some machines use `%lld' ## and others use `%qd'. There may be more! The final `l' is a ## default in case none of the others work. -## Need to patch up LD_LIBRARY_PATH so that the execution can find all -## the dynamic library. The correct way to do it should be updating -## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. ## AC_MSG_CHECKING([how to print long long]) AC_CACHE_VAL([hdf5_cv_printf_ll], [ -LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" -export LD_LIBRARY_PATH for hdf5_cv_printf_ll in l ll L q unknown; do AC_TRY_RUN([ diff --git a/examples/Makefile.am b/examples/Makefile.am index d8eac95..5d0da93 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -25,6 +25,10 @@ if BUILD_PARALLEL_CONDITIONAL EXAMPLE_PROG_PARA = ph5example endif +INSTALL_SCRIPT_FILES = run-c-ex.sh +INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh +INSTALL_TOP_FILES = README + # Example programs. # Don't tell automake about them, because if it knew they were programs, # it would try to compile them instead of using the h5cc script. @@ -34,7 +38,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg -TEST_SCRIPT=testh5cc.sh +TEST_SCRIPT=testh5cc.sh +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # Install files # List all file that should be installed in examples directory @@ -45,10 +50,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c -INSTALL_SCRIPT_FILES = run-c-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh -INSTALL_TOP_FILES = README # How to build examples, using installed version of h5cc if BUILD_PARALLEL_CONDITIONAL diff --git a/examples/Makefile.in b/examples/Makefile.in index ae93c78..edf6954 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -614,6 +614,9 @@ TRACE = perl $(top_srcdir)/bin/trace # *.clog are from the MPE option. CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5 @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example +INSTALL_SCRIPT_FILES = run-c-ex.sh +INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh +INSTALL_TOP_FILES = README # Example programs. # Don't tell automake about them, because if it knew they were programs, @@ -625,7 +628,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg -TEST_SCRIPT = testh5cc.sh +TEST_SCRIPT = testh5cc.sh +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # Install files # List all file that should be installed in examples directory @@ -636,9 +640,6 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c -INSTALL_SCRIPT_FILES = run-c-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh -INSTALL_TOP_FILES = README # The external link examples demonstrate how to use paths; they need # directories to be created to do this. @@ -1131,27 +1132,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index e994d4e..feed32c 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -26,6 +26,8 @@ if BUILD_PARALLEL_CONDITIONAL EXAMPLE_PROG_PARA=ph5example endif +INSTALL_SCRIPT_FILES = run-fortran-ex.sh + # These are the programs that 'make all' or 'make tests' will build and # that 'make check' will run. List them in the order in which they should # be run. @@ -41,7 +43,6 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \ h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \ h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 -INSTALL_SCRIPT_FILES = run-fortran-ex.sh # Add attention tests for Fortran 2003 features @@ -52,6 +53,7 @@ if FORTRAN_2003_CONDITIONAL_F compound_fortran2003.f90 compound_complex_fortran2003.f90 endif TEST_SCRIPT=testh5fc.sh +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # Mark this directory as part of the Fortran API FORTRAN_API=yes diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index ce2251d..0e69f8e 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -624,6 +624,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # Compile parallel fortran examples only if parallel is enabled @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example +INSTALL_SCRIPT_FILES = run-fortran-ex.sh # These are the programs that 'make all' or 'make tests' will build and # that 'make check' will run. List them in the order in which they should @@ -641,8 +642,8 @@ INSTALL_FILES = h5_crtdat.f90 h5_rdwt.f90 h5_crtatt.f90 h5_crtgrp.f90 \ h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 \ $(am__append_2) -INSTALL_SCRIPT_FILES = run-fortran-ex.sh TEST_SCRIPT = testh5fc.sh +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -1122,27 +1123,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in index c5c379e..ead7361 100644 --- a/fortran/examples/run-fortran-ex.sh.in +++ b/fortran/examples/run-fortran-ex.sh.in @@ -63,19 +63,15 @@ RunTest() ./$TEST_EXEC } - +F2003_ENABLED=@HAVE_FORTRAN_2003@ ################## MAIN ################## # Run tests if [ $? -eq 0 ] then - if (RunTest h5_cmprss &&\ - rm h5_cmprss &&\ - RunTest h5_crtdat &&\ + if (RunTest h5_crtdat &&\ rm h5_crtdat &&\ - RunTest h5_extend &&\ - rm h5_extend &&\ RunTest h5_rdwt &&\ rm h5_rdwt &&\ RunTest h5_crtatt &&\ @@ -86,14 +82,16 @@ then rm h5_crtgrpar &&\ RunTest h5_crtgrpd &&\ rm h5_crtgrpd &&\ + RunTest h5_extend &&\ + rm h5_extend &&\ RunTest h5_subset &&\ rm h5_subset &&\ + RunTest h5_cmprss &&\ + rm h5_cmprss &&\ RunTest hyperslab &&\ rm hyperslab &&\ RunTest selectele &&\ rm selectele &&\ - RunTest grpit &&\ - rm grpit &&\ RunTest refobjexample &&\ rm refobjexample &&\ RunTest refregexample &&\ @@ -108,6 +106,24 @@ then fi fi +if [ $EXIT_VALUE -eq ${EXIT_SUCCESS} -a "$F2003_ENABLED" = "yes" ] +then +# Add attention tests for Fortran 2003 features + if (RunTest rwdset_fortran2003 &&\ + rm rwdset_fortran2003 &&\ + RunTest nested_derived_type &&\ + rm nested_derived_type &&\ + RunTest compound_fortran2003 &&\ + rm compound_fortran2003 &&\ + RunTest compound_complex_fortran2003 &&\ + rm compound_complex_fortran2003); then + EXIT_VALUE=${EXIT_SUCCESS} + else + EXIT_VALUE=${EXIT_FAILURE} + fi +fi + + # Cleanup rm *.o rm *.h5 diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am index df15257..c8f0305 100644 --- a/hl/c++/examples/Makefile.am +++ b/hl/c++/examples/Makefile.am @@ -24,6 +24,7 @@ include $(top_srcdir)/config/commence.am # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. EXAMPLE_PROG=ptExampleFL +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # These are the example files to be installed INSTALL_FILES=ptExampleFL.cpp diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index df7bc7a..fa624d1 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -616,6 +616,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. EXAMPLE_PROG = ptExampleFL +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # These are the example files to be installed INSTALL_FILES = ptExampleFL.cpp @@ -1065,27 +1066,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am index 5108c5e..ba200ed 100644 --- a/hl/examples/Makefile.am +++ b/hl/examples/Makefile.am @@ -29,6 +29,8 @@ endif # Note: no '/' after DESTDIR. Explanation in commence.am EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl +INSTALL_SCRIPT_FILES = run-hlc-ex.sh +INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh # Example programs. # Don't tell automake about them, because if it knew they were programs, @@ -40,6 +42,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \ ex_table_05 ex_table_06 ex_table_07 ex_table_08 \ ex_table_09 ex_table_10 ex_table_11 ex_table_12 \ ex_ds1 +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # Install files # List all file that should be installed in examples directory @@ -50,8 +53,6 @@ INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \ ex_table_09.c ex_table_10.c ex_table_11.c ex_table_12.c \ ex_ds1.c image24pixel.txt image8.txt pal_rgb.h -INSTALL_SCRIPT_FILES = run-hlc-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh # Additional dependencies for each program are listed below. if BUILD_PARALLEL_CONDITIONAL diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index ea3ff07..3e24269 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -618,6 +618,8 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # Note: no '/' after DESTDIR. Explanation in commence.am EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl +INSTALL_SCRIPT_FILES = run-hlc-ex.sh +INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh # Example programs. # Don't tell automake about them, because if it knew they were programs, @@ -630,6 +632,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \ ex_table_09 ex_table_10 ex_table_11 ex_table_12 \ ex_ds1 +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # Install files # List all file that should be installed in examples directory @@ -640,8 +643,6 @@ INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \ ex_table_09.c ex_table_10.c ex_table_11.c ex_table_12.c \ ex_ds1.c image24pixel.txt image8.txt pal_rgb.h -INSTALL_SCRIPT_FILES = run-hlc-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh @BUILD_SHARED_SZIP_CONDITIONAL_TRUE@LD_LIBRARY_PATH = $(LL_PATH) # Assume that all tests in this directory are examples, and tell @@ -1105,27 +1106,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am index f94f031..91cb7c5 100644 --- a/hl/fortran/examples/Makefile.am +++ b/hl/fortran/examples/Makefile.am @@ -32,6 +32,7 @@ endif # We don't tell automake about these programs so that it doesn't try to # compile them with the regular fortran compiler. EXAMPLE_PROG=exlite ex_ds1 +TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) # List files to be installed here INSTALL_FILES= exlite.f90 ex_ds1.f90 diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index a66b5b9..e83f717 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -622,6 +622,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # We don't tell automake about these programs so that it doesn't try to # compile them with the regular fortran compiler. EXAMPLE_PROG = exlite ex_ds1 +TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) # List files to be installed here INSTALL_FILES = exlite.f90 ex_ds1.f90 @@ -1068,27 +1069,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi + fi @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi + fi @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi + fi installcheck-local: @if test "$(STATIC_SHARED)" = "static, shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ $(MAKE) $(AM_MAKEFLAGS) clean; \ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ + elif test "$(STATIC_SHARED)" = "shared"; then \ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ + else \ $(MAKE) $(AM_MAKEFLAGS) check; \ - fi + fi + @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ + echo "============================"; \ + echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ + echo "============================"; \ + (cd $(EXAMPLEDIR); \ + /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ + fi # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 82d1bb8..3535fb4 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -437,7 +437,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si subdir = (user ? user : login); if (subdir) { - for (i = 0; i < size && prefix[i]; i++) + for (i = 0; i < size-1 && prefix[i]; i++) fullname[i] = prefix[i]; fullname[i++] = '/'; diff --git a/perform/sio_engine.c b/perform/sio_engine.c index dec2f98..07e6b16c 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -333,7 +333,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si subdir = (user ? user : login); if (subdir) { - for (i = 0; i < size && prefix[i]; i++) + for (i = 0; i < size-1 && prefix[i]; i++) fullname[i] = prefix[i]; fullname[i++] = '/'; |