summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-05-10 19:38:53 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-05-10 19:38:53 (GMT)
commit68a20c3f56f30e62e062eba2f4c8f782fa604cd3 (patch)
treedb86db14954362b093891cf311ce514cf87fe051
parent0a3191e36d4ee22c383de9b0917990149c1f2df2 (diff)
parent5ecebe5b9bc161153a3391bf32eb64687f675172 (diff)
downloadhdf5-68a20c3f56f30e62e062eba2f4c8f782fa604cd3.zip
hdf5-68a20c3f56f30e62e062eba2f4c8f782fa604cd3.tar.gz
hdf5-68a20c3f56f30e62e062eba2f4c8f782fa604cd3.tar.bz2
[svn-r23694] merge from trunk
-rw-r--r--CMakeLists.txt50
-rw-r--r--MANIFEST68
-rw-r--r--README.txt2
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/src/H5DxferProp.h7
-rw-r--r--c++/src/Makefile.in2
-rw-r--r--c++/src/h5c++.in19
-rw-r--r--[-rwxr-xr-x]config/cmake/CTestCustom.cmake0
-rw-r--r--config/cmake/ConfigureChecks.cmake2
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--[-rwxr-xr-x]config/cmake/cacheinit.cmake0
-rw-r--r--config/cmake/hdf5-config.cmake.build.in10
-rw-r--r--config/cmake/hdf5-config.cmake.install.in10
-rw-r--r--[-rwxr-xr-x]config/cmake/mccacheinit.cmake0
-rw-r--r--config/gnu-flags83
-rw-r--r--config/lt_vers.am2
-rwxr-xr-xconfigure2753
-rw-r--r--configure.ac125
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/src/H5Off.f9014
-rw-r--r--fortran/src/Makefile.in2
-rw-r--r--fortran/src/h5fc.in19
-rw-r--r--fortran/test/tH5O.f902
-rw-r--r--fortran/test/tH5T_F03.f9013
-rw-r--r--fortran/test/tf.f909
-rw-r--r--hl/c++/src/CMakeLists.txt2
-rw-r--r--hl/c++/src/Makefile.in2
-rw-r--r--hl/fortran/src/CMakeLists.txt4
-rw-r--r--hl/fortran/src/Makefile.in2
-rw-r--r--hl/src/Makefile.in2
-rw-r--r--hl/test/test_ds.c694
-rw-r--r--release_docs/INSTALL_CMake.txt (renamed from release_docs/CMake.txt)547
-rw-r--r--release_docs/INSTALL_MinGW.txt269
-rw-r--r--release_docs/INSTALL_Windows.txt11
-rw-r--r--release_docs/RELEASE.txt57
-rw-r--r--release_docs/USING_HDF5_CMake.txt (renamed from release_docs/USING_CMake.txt)245
-rw-r--r--release_docs/USING_HDF5_VS.txt88
-rw-r--r--release_docs/USING_Windows.txt35
-rw-r--r--src/CMakeLists.txt15
-rw-r--r--src/H5.c1
-rw-r--r--src/H5AC.c31
-rw-r--r--src/H5ACprivate.h5
-rw-r--r--src/H5C.c37
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5Dchunk.c8
-rw-r--r--src/H5Dint.c30
-rw-r--r--src/H5Dprivate.h2
-rw-r--r--src/H5Edefin.h4
-rw-r--r--src/H5Einit.h12
-rw-r--r--src/H5Epubgen.h6
-rw-r--r--src/H5Eterm.h4
-rw-r--r--src/H5FDmulti.c28
-rw-r--r--src/H5Gint.c31
-rw-r--r--src/H5Gprivate.h1
-rw-r--r--src/H5PL.c661
-rw-r--r--src/H5PLextern.h84
-rw-r--r--src/H5PLprivate.h53
-rw-r--r--src/H5Pocpl.c115
-rw-r--r--src/H5Pprivate.h1
-rw-r--r--src/H5Z.c289
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5Zpublic.h1
-rw-r--r--src/H5config.h.in6
-rw-r--r--src/H5err.txt5
-rw-r--r--src/H5private.h12
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.am5
-rw-r--r--src/Makefile.in32
-rw-r--r--test/CMakeLists.txt127
-rw-r--r--test/Makefile.am46
-rw-r--r--test/Makefile.in280
-rw-r--r--test/dynlib1.c97
-rw-r--r--test/dynlib2.c91
-rw-r--r--test/dynlib3.c102
-rw-r--r--test/file_image.c3
-rw-r--r--test/fillval.c262
-rw-r--r--test/plugin.c732
-rw-r--r--test/test_plugin.sh.in93
-rw-r--r--test/testerror.sh.in9
-rw-r--r--test/testframe.c4
-rw-r--r--test/unregister.c256
-rw-r--r--testpar/t_cache.c119
-rw-r--r--testpar/t_dset.c62
-rw-r--r--testpar/testphdf5.c4
-rw-r--r--testpar/testphdf5.h1
-rw-r--r--tools/h5copy/testh5copy.sh.in10
-rw-r--r--tools/h5dump/CMakeLists.txt29
-rw-r--r--tools/h5dump/testh5dump.sh.in69
-rw-r--r--tools/misc/h5cc.in19
-rw-r--r--[-rwxr-xr-x]tools/misc/h5perf_gentest.c0
-rw-r--r--tools/misc/h5redeploy.in96
-rw-r--r--vms/src/h5pubconf.h6
92 files changed, 6155 insertions, 3013 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60655ae..8f7a2fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -487,6 +487,8 @@ IF (HDF5_ENABLE_PARALLEL)
# Used by Fortran + MPI
CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
+ ELSE (MPI_C_FOUND)
+ MESSAGE (STATUS "Parallel libraries not found")
ENDIF (MPI_C_FOUND)
ENDIF (HDF5_ENABLE_PARALLEL)
@@ -962,36 +964,46 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
SET (release_files
- ${HDF5_SOURCE_DIR}/release_docs/CMake.txt
- ${HDF5_SOURCE_DIR}/release_docs/USING_CMake.txt
+ ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
- ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_9.txt
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
IF (WIN32 AND NOT CYGWIN)
SET (release_files
${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
- )
- ELSE (WIN32 AND NOT CYGWIN)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_VMS.txt
+ ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
)
ENDIF (WIN32 AND NOT CYGWIN)
- IF (HDF5_ENABLE_PARALLEL)
+ IF (HDF5_PACK_INSTALL_DOCS)
SET (release_files
${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
+ ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL
)
- ENDIF (HDF5_ENABLE_PARALLEL)
- INSTALL (
- FILES ${release_files}
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/release_docs
- COMPONENT hdfdocuments
- )
+ IF (WIN32 AND NOT CYGWIN)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
+ )
+ ELSE (WIN32 AND NOT CYGWIN)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+ IF (HDF5_ENABLE_PARALLEL)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
+ )
+ ENDIF (HDF5_ENABLE_PARALLEL)
+ INSTALL (
+ FILES ${release_files}
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}/release_docs
+ COMPONENT hdfdocuments
+ )
+ ENDIF (HDF5_PACK_INSTALL_DOCS)
ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
diff --git a/MANIFEST b/MANIFEST
index 5df93b3..95e907d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -530,19 +530,18 @@
./perform/sio_timer.h
./perform/zip_perf.c
-./release_docs/CMake.txt
+./release_docs/INSTALL_CMake.txt
./release_docs/COPYING
./release_docs/HISTORY-1_0-1_8_0_rc3.txt
./release_docs/HISTORY-1_9.txt
./release_docs/INSTALL
./release_docs/INSTALL_Cygwin.txt
-./release_docs/INSTALL_MinGW.txt
./release_docs/INSTALL_parallel
./release_docs/INSTALL_VMS.txt
./release_docs/INSTALL_Windows.txt
./release_docs/RELEASE.txt
-./release_docs/USING_CMake.txt
-./release_docs/USING_Windows.txt
+./release_docs/USING_HDF5_CMake.txt
+./release_docs/USING_HDF5_VS.txt
./src/.indent.pro _DO_NOT_DISTRIBUTE_
./src/hdf5.lnt _DO_NOT_DISTRIBUTE_
@@ -851,6 +850,9 @@
./src/H5Ppublic.h
./src/H5Pstrcpl.c
./src/H5Ptest.c
+./src/H5PL.c
+./src/H5PLprivate.h
+./src/H5PLextern.h
./src/H5R.c
./src/H5Rdeprec.c
./src/H5Rpkg.h
@@ -967,6 +969,9 @@
./test/dt_arith.c
./test/dtypes.c
./test/dtransform.c
+./test/dynlib1.c
+./test/dynlib2.c
+./test/dynlib3.c
./test/earray.c
./test/efc.c
./test/enc_dec_plist.c
@@ -994,29 +999,31 @@
./test/filter_fail.c
./test/flush1.c
./test/flush2.c
-./test/gen_bad_ohdr.c _DO_NOT_DISTRIBUTE_
-./test/gen_bad_compound.c _DO_NOT_DISTRIBUTE_
-./test/gen_bogus.c _DO_NOT_DISTRIBUTE_
-./test/gen_cross.c _DO_NOT_DISTRIBUTE_
-./test/gen_deflate.c _DO_NOT_DISTRIBUTE_
-./test/gen_file_image.c _DO_NOT_DISTRIBUTE_
-./test/gen_filespace.c _DO_NOT_DISTRIBUTE_
-./test/gen_mergemsg.c _DO_NOT_DISTRIBUTE_
-./test/gen_new_array.c _DO_NOT_DISTRIBUTE_
-./test/gen_new_fill.c _DO_NOT_DISTRIBUTE_
-./test/gen_new_group.c _DO_NOT_DISTRIBUTE_
-./test/gen_new_mtime.c _DO_NOT_DISTRIBUTE_
-./test/gen_new_super.c _DO_NOT_DISTRIBUTE_
-./test/gen_noencoder.c _DO_NOT_DISTRIBUTE_
-./test/gen_nullspace.c _DO_NOT_DISTRIBUTE_
-./test/gen_old_array.c _DO_NOT_DISTRIBUTE_
-./test/gen_old_group.c _DO_NOT_DISTRIBUTE_
-./test/gen_old_layout.c _DO_NOT_DISTRIBUTE_
-./test/gen_old_mtime.c _DO_NOT_DISTRIBUTE_
-./test/gen_plist.c _DO_NOT_DISTRIBUTE_
-./test/gen_sizes_lheap.c _DO_NOT_DISTRIBUTE_
-./test/gen_specmetaread.c _DO_NOT_DISTRIBUTE_
-./test/gen_udlinks.c _DO_NOT_DISTRIBUTE_
+# ====distribute this for now. See HDFFV-8236====
+./test/gen_bad_ohdr.c
+./test/gen_bad_compound.c
+./test/gen_bogus.c
+./test/gen_cross.c
+./test/gen_deflate.c
+./test/gen_file_image.c
+./test/gen_filespace.c
+./test/gen_mergemsg.c
+./test/gen_new_array.c
+./test/gen_new_fill.c
+./test/gen_new_group.c
+./test/gen_new_mtime.c
+./test/gen_new_super.c
+./test/gen_noencoder.c
+./test/gen_nullspace.c
+./test/gen_old_array.c
+./test/gen_old_group.c
+./test/gen_old_layout.c
+./test/gen_old_mtime.c
+./test/gen_plist.c
+./test/gen_sizes_lheap.c
+./test/gen_specmetaread.c
+./test/gen_udlinks.c
+# ====end distribute this for now. See HDFFV-8236====
./test/getname.c
./test/gheap.c
./test/group_old.h5
@@ -1039,10 +1046,13 @@
./test/ntypes.c
./test/ohdr.c
./test/objcopy.c
+./test/plugin.c
./test/reserved.c
./test/pool.c
./test/set_extent.c
-./test/space_overflow.c _DO_NOT_DISTRIBUTE_
+# ====distribute this for now. See HDFFV-8236====
+./test/space_overflow.c
+# ====end distribute this for now. See HDFFV-8236====
./test/specmetaread.h5
./test/stab.c
./test/tarray.c
@@ -1061,6 +1071,7 @@
./test/testhdf5.c
./test/testhdf5.h
./test/testlibinfo.sh.in
+./test/test_plugin.sh.in
./test/testmeta.c
./test/tfile.c
./test/tgenprop.c
@@ -1093,6 +1104,7 @@
./test/tvlstr.c
./test/tvltypes.c
./test/unlink.c
+./test/unregister.c
./test/vfd.c
./test/test_filters_le.h5
./test/test_filters_be.h5
diff --git a/README.txt b/README.txt
index 96c1121..bb77343 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.149 currently under development
+HDF5 version 1.9.151 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index fea68cd..cf5bd07 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -96,7 +96,7 @@ INSTALL (
FILES
${CPP_HDRS}
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/cpp
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
cppheaders
)
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 66216d8..bf481c3 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -66,12 +66,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
H5MM_free_t& free, void** free_info ) const;
- // Sets the data transfer property list for the multi-file driver.
- void setMulti(const hid_t *memb_dxpl);
-
- // Returns multi-file data transfer property list information.
- void getMulti(hid_t *memb_dxpl);
-
// Sets the size of a contiguous block reserved for small data.
void setSmallDataBlockSize(hsize_t size);
@@ -109,3 +103,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
}
#endif
#endif
+
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 18a46ba..44499f4 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -459,7 +459,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
# Include src directory
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 0f17cf1..4c86c6a 100644
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -122,8 +122,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -334,20 +335,6 @@ if test "x$do_link" = "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
- # Any libraries in LDFLAGS or H5BLD_LDFLAGS also should have rpaths embedded
- # in the executables created by h5cc (reduces need for LD_LIBRARY_PATH).
- if test -n "$LDFLAGS"; then
- for entry in $LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
- if test -n "$H5BLD_LDFLAGS"; then
- for entry in $H5BLD_LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index ec7b10e..ec7b10e 100755..100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 55a7f58..3af0b48 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -206,6 +206,7 @@ ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
+ CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
ENDIF (NOT WINDOWS)
@@ -368,6 +369,7 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H)
CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
+CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H)
# IF the c compiler found stdint, check the C++ as well. On some systems this
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 93a6bfd..d6831f6 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -127,6 +127,9 @@
/* Define if the direct I/O virtual file driver should be compiled */
#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@
+/* Define to 1 if you have the <dirent.h> header file. */
+#cmakedefine H5_HAVE_DIRENT_H @H5_HAVE_DIRENT_H@
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@
@@ -233,6 +236,9 @@
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
+/* Define to 1 if you have the `dl' library (-ldl). */
+#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@
+
/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index d45ef9e..d45ef9e 100755..100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
diff --git a/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in
index 881985e..fbe97ac 100644
--- a/config/cmake/hdf5-config.cmake.build.in
+++ b/config/cmake/hdf5-config.cmake.build.in
@@ -18,9 +18,17 @@ SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
#-----------------------------------------------------------------------------
+# Dependencies
+#-----------------------------------------------------------------------------
+IF(HDF5_ENABLE_PARALLEL)
+ SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
+ SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
+ENDIF(HDF5_ENABLE_PARALLEL)
+
+#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@")
+SET (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
IF (HDF5_BUILD_FORTRAN)
SET (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index 6b90496..9c5a5a1 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -24,9 +24,17 @@ SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
#-----------------------------------------------------------------------------
+# Dependencies
+#-----------------------------------------------------------------------------
+IF(HDF5_ENABLE_PARALLEL)
+ SET(HDF5_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
+ SET(HDF5_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
+ENDIF(HDF5_ENABLE_PARALLEL)
+
+#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" )
+SET (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
IF (HDF5_BUILD_FORTRAN)
SET (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 8ca3879..8ca3879 100755..100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
diff --git a/config/gnu-flags b/config/gnu-flags
index 40aa1da..a79cc72 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -186,10 +186,10 @@ esac
# the information from the previous version and adding modifications to that.
case "$cc_vendor-$cc_version" in
-# Closer to the gcc 4.8 release, we should check for additional flags to
+# Closer to the gcc 4.9 release, we should check for additional flags to
# include and break it out into it's own section, like the other versions
# below. -QAK
- gcc-4.[78]*)
+ gcc-4.[89]*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
@@ -252,7 +252,81 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
# Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance"
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
+
+ # Try out the new "stack protector" feature in gcc 4.1
+ # (Strictly speaking this isn't really a "warning" flag, so it's added to
+ # the debugging flags)
+ #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
+ ;;
+
+ gcc-4.7*)
+ # Replace -ansi flag with -std=c99 flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+
+ # Append warning flags
+ # Don't use the '-Wtraditional' flag, we're way past having K&R C code
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
+ # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
+ # from GCC's assert macro
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CFLAGS="$H5_CFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc4.0+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
# Try out the new "stack protector" feature in gcc 4.1
# (Strictly speaking this isn't really a "warning" flag, so it's added to
@@ -260,9 +334,6 @@ case "$cc_vendor-$cc_version" in
#DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
;;
-# Closer to the gcc 4.7 release, we should check for additional flags to
-# include and break it out into it's own section, like the other versions
-# below. -QAK
gcc-4.6*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 8df77f3..ac9fc70 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -17,7 +17,7 @@
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure b/configure
index c1f04da..40a4f83 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.9.149.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.151.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.149'
-PACKAGE_STRING='HDF5 1.9.149'
+PACKAGE_VERSION='1.9.151'
+PACKAGE_STRING='HDF5 1.9.151'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -638,6 +638,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+HAVE_SHARED_CONDITIONAL_FALSE
+HAVE_SHARED_CONDITIONAL_TRUE
SETX
SEARCH
BUILD_HDF5_HL_CONDITIONAL_FALSE
@@ -1484,7 +1486,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.9.149 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.151 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1554,7 +1556,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.149:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.151:";;
esac
cat <<\_ACEOF
@@ -1750,7 +1752,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.149
+HDF5 configure 1.9.151
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2844,7 +2846,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.9.149, which was
+It was created by HDF5 $as_me 1.9.151, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3682,7 +3684,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.149'
+ VERSION='1.9.151'
cat >>confdefs.h <<_ACEOF
@@ -5244,6 +5246,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## General Fortran flags
## Only add FFLAGS to FCFLAGS if it's set.
if test "x$FFLAGS" != "x" ; then
+ AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
FCFLAGS="${FCFLAGS} ${FFLAGS}"
fi
@@ -22248,7 +22251,7 @@ $as_echo "user-defined" >&6; }
esac
## ----------------------------------------------------------------------
-## Check for system libraries.
+## Check for system libraries. "dl" stands for dynamically loaded library
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5
$as_echo_n "checking for ceil in -lm... " >&6; }
@@ -22303,6 +22306,59 @@ _ACEOF
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
## ...for Solaris
@@ -22729,6 +22785,18 @@ fi
done
+for ac_header in dirent.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
+if test "x$ac_cv_header_dirent_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRENT_H 1
+_ACEOF
+
+fi
+
+done
+
for ac_header in stdint.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
@@ -25859,7 +25927,7 @@ if test "x$ac_cv_header_szlib_h" = xyes; then :
_ACEOF
HAVE_SZLIB_H="yes"
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZIP
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB
fi
done
@@ -26144,7 +26212,7 @@ fi
done
- if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test "x$HAVE_PTHREAD" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_self+:} false; then :
@@ -26268,7 +26336,7 @@ done
fi
- if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test "x$HAVE_PTHREAD" = "xyes"; then
if test -n "$pthread_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
@@ -31158,223 +31226,18 @@ if test -n "$TESTPARALLEL"; then
FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile
fi
fi
-
-ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
- if test -n "$am_sleep_pid"; then
- # Hide warnings about reused PIDs.
- wait $am_sleep_pid 2>/dev/null
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error $? "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_SHARED_CONDITIONAL_TRUE}" && test -z "${FORTRAN_SHARED_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_SHARED_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${CXX_SHARED_CONDITIONAL_TRUE}" && test -z "${CXX_SHARED_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"CXX_SHARED_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CXX_CONDITIONAL_TRUE}" && test -z "${BUILD_CXX_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CXX_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_PARALLEL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PARALLEL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FORTRAN_CONDITIONAL_TRUE}" && test -z "${BUILD_FORTRAN_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FORTRAN_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+: ${CONFIG_LT=./config.lt}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
+$as_echo "$as_me: creating $CONFIG_LT" >&6;}
as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
+# Run this file to recreate a libtool stub with the current configuration.
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
@@ -31738,203 +31601,71 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
+## --------------------------------- ##
+## Main body of "$CONFIG_LT" script. ##
+## --------------------------------- ##
_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by HDF5 $as_me 1.9.149, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
-Configuration files:
-$config_files
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
-Configuration headers:
-$config_headers
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
-Configuration commands:
-$config_commands
+Usage: $0 [OPTIONS]
-Report bugs to <help@hdfgroup.org>."
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-HDF5 config.status 1.9.149
-configured by $0, generated by GNU Autoconf 2.69,
- with options \\"\$ac_cs_config\\"
+Report bugs to <bug-libtool@gnu.org>."
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
+lt_cl_version="\
+HDF5 config.lt 1.9.151
+configured by $0, generated by GNU Autoconf 2.69.
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
+ -*) as_fn_error $? "unrecognized option: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
+ *) as_fn_error $? "unrecognized argument: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
esac
shift
done
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
+if $lt_cl_silent; then
exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
fi
+_LTEOF
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+cat >>"$CONFIG_LT" <<_LTEOF
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -32398,800 +32129,12 @@ fi
+_LTEOF
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;;
- "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
- "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;;
- "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;;
- "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;;
- "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;;
- "test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;;
- "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;;
- "testpar/testph5.sh") CONFIG_FILES="$CONFIG_FILES testpar/testph5.sh" ;;
- "perform/Makefile") CONFIG_FILES="$CONFIG_FILES perform/Makefile" ;;
- "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
- "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;;
- "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;;
- "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;;
- "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;;
- "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;;
- "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;;
- "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;;
- "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;;
- "tools/h5diff/testh5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testh5diff.sh" ;;
- "tools/h5diff/testph5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testph5diff.sh" ;;
- "tools/h5jam/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5jam/Makefile" ;;
- "tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;;
- "tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;;
- "tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;;
- "tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;;
- "tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
- "tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
- "tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;;
- "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;;
- "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;;
- "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;;
- "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;;
- "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;;
- "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;;
- "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
- "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;;
- "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;;
- "c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;;
- "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;;
- "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;;
- "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;;
- "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;;
- "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;;
- "c++/examples/run-c++-ex.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/run-c++-ex.sh" ;;
- "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;;
- "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;;
- "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;;
- "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;;
- "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;;
- "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;;
- "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;;
- "fortran/examples/run-fortran-ex.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/run-fortran-ex.sh" ;;
- "fortran/examples/testh5fc.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/testh5fc.sh" ;;
- "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;;
- "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;;
- "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;;
- "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;;
- "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;;
- "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;;
- "hl/tools/gif2h5/h52giftest.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/h52giftest.sh" ;;
- "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;;
- "hl/examples/run-hlc-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/examples/run-hlc-ex.sh" ;;
- "hl/c++/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/Makefile" ;;
- "hl/c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/src/Makefile" ;;
- "hl/c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/test/Makefile" ;;
- "hl/c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/Makefile" ;;
- "hl/c++/examples/run-hlc++-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/run-hlc++-ex.sh" ;;
- "hl/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/Makefile" ;;
- "hl/fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/src/Makefile" ;;
- "hl/fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/test/Makefile" ;;
- "hl/fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/Makefile" ;;
- "hl/fortran/examples/run-hlfortran-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/run-hlfortran-ex.sh" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_tt"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
- } >"$ac_tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$ac_tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
+cat >>"$CONFIG_LT" <<\_LTEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
- case $ac_file$ac_mode in
- "pubconf":C)
- echo "creating src/H5pubconf.h"
- sed 's/#define /#define H5_/' <src/H5config.h |\
- sed 's/#undef /#undef H5_/' >pubconf
- if test ! -f src/H5pubconf.h; then
- /bin/mv -f pubconf src/H5pubconf.h
- elif (diff pubconf src/H5pubconf.h >/dev/null); then
- rm -f pubconf
- echo "src/H5pubconf.h is unchanged"
- else
- /bin/mv -f pubconf src/H5pubconf.h
- fi
- echo "Post process src/libhdf5.settings"
- sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
- cp libhdf5.settings.TMP src/libhdf5.settings
- rm -f libhdf5.settings.TMP
- ;;
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
- ;;
- "libtool":C)
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
@@ -34143,57 +33086,308 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_FC
# ### END LIBTOOL TAG CONFIG: FC
_LT_EOF
- ;;
- esac
-done # for ac_tag
+as_fn_exit 0
+_LTEOF
+chmod +x "$CONFIG_LT"
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec 5>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec 5>>config.log
+$lt_cl_success || as_fn_exit 1
+
+no_create=$saved_no_create
+
+## Then the stamp2 file for H5config.h
+touch ./config/stamp2
+
+## Finally the makefiles
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+## Post processing to patch up some deficiencies in libtool
+case $host_os in
+ linux* | freebsd* )
+ ## If gcc is not used, need to set $wl to use "-Wl,"
+ if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
+ : using gcc
+ else
+ echo 'fixing $wl in' $ofile
+ed - $ofile <<EOF 2> /dev/null
+g/^wl=""/s//wl="-Wl,"/
+w
+q
+EOF
+ fi
+ ;;
+esac
+
+## Are we compiling static libraries, shared libraries, or both? This
+## is only used for the libhdf5.settings file. We can't just look at
+## $enable_static and $enable_shared because if they're yes the ltconfig
+## might have decided that one or the other is simply not possible.
+## Therefore we have to ask the generated `libtool' shell script
+## which 'features' it has enabled.
+if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
+ enable_shared=yes
+else
+ enable_shared=no
+fi
+
+if (./libtool --features | grep '^enable static libraries' > /dev/null); then
+ enable_static=yes
+else
+ enable_static=no
+fi
+
+if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="static, shared"
+elif test "X$enable_static" = "Xyes"; then
+ STATIC_SHARED="static"
+elif test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="shared"
+else
+ STATIC_SHARED="none"
+fi
+
+## ----------------------------------------------------------------------
+## Set a macro if shared library is enabled.
+##
+ if test "X$enable_shared" = "Xyes"; then
+ HAVE_SHARED_CONDITIONAL_TRUE=
+ HAVE_SHARED_CONDITIONAL_FALSE='#'
+else
+ HAVE_SHARED_CONDITIONAL_TRUE='#'
+ HAVE_SHARED_CONDITIONAL_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
-as_fn_exit 0
_ACEOF
-ac_clean_files=$ac_clean_files_save
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_SHARED_CONDITIONAL_TRUE}" && test -z "${FORTRAN_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CXX_SHARED_CONDITIONAL_TRUE}" && test -z "${CXX_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"CXX_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_LT=./config.lt}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
-$as_echo "$as_me: creating $CONFIG_LT" >&6;}
+if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_CXX_CONDITIONAL_TRUE}" && test -z "${BUILD_CXX_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_CXX_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_PARALLEL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_PARALLEL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_FORTRAN_CONDITIONAL_TRUE}" && test -z "${BUILD_FORTRAN_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_FORTRAN_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_SHARED_CONDITIONAL_TRUE}" && test -z "${HAVE_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
-cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
-cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
@@ -34557,71 +33751,203 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
-## --------------------------------- ##
-## Main body of "$CONFIG_LT" script. ##
-## --------------------------------- ##
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
_ASEOF
-test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by HDF5 $as_me 1.9.151, which was
+generated by GNU Autoconf 2.69. Invocation command line was
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
-Usage: $0 [OPTIONS]
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
+_ACEOF
-Report bugs to <bug-libtool@gnu.org>."
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
-lt_cl_version="\
-HDF5 config.lt 1.9.149
-configured by $0, generated by GNU Autoconf 2.69.
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <help@hdfgroup.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+HDF5 config.status 1.9.151
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
while test $# != 0
do
case $1 in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
- -*) as_fn_error $? "unrecognized option: $1
-Try \`$0 --help' for more information." "$LINENO" 5 ;;
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
- *) as_fn_error $? "unrecognized argument: $1
-Try \`$0 --help' for more information." "$LINENO" 5 ;;
esac
shift
done
-if $lt_cl_silent; then
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-_LTEOF
-cat >>"$CONFIG_LT" <<_LTEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -35086,12 +34412,801 @@ fi
ac_aux_dir='$ac_aux_dir'
-_LTEOF
-cat >>"$CONFIG_LT" <<\_LTEOF
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
-$as_echo "$as_me: creating $ofile" >&6;}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;;
+ "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+ "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;;
+ "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;;
+ "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;;
+ "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;;
+ "test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;;
+ "test/test_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_plugin.sh" ;;
+ "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;;
+ "testpar/testph5.sh") CONFIG_FILES="$CONFIG_FILES testpar/testph5.sh" ;;
+ "perform/Makefile") CONFIG_FILES="$CONFIG_FILES perform/Makefile" ;;
+ "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+ "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;;
+ "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;;
+ "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;;
+ "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;;
+ "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;;
+ "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;;
+ "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;;
+ "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;;
+ "tools/h5diff/testh5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testh5diff.sh" ;;
+ "tools/h5diff/testph5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testph5diff.sh" ;;
+ "tools/h5jam/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5jam/Makefile" ;;
+ "tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;;
+ "tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;;
+ "tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;;
+ "tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;;
+ "tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
+ "tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
+ "tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;;
+ "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;;
+ "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;;
+ "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;;
+ "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;;
+ "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;;
+ "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;;
+ "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+ "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;;
+ "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;;
+ "c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;;
+ "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;;
+ "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;;
+ "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;;
+ "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;;
+ "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;;
+ "c++/examples/run-c++-ex.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/run-c++-ex.sh" ;;
+ "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;;
+ "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;;
+ "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;;
+ "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;;
+ "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;;
+ "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;;
+ "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;;
+ "fortran/examples/run-fortran-ex.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/run-fortran-ex.sh" ;;
+ "fortran/examples/testh5fc.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/testh5fc.sh" ;;
+ "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;;
+ "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;;
+ "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;;
+ "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;;
+ "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;;
+ "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;;
+ "hl/tools/gif2h5/h52giftest.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/h52giftest.sh" ;;
+ "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;;
+ "hl/examples/run-hlc-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/examples/run-hlc-ex.sh" ;;
+ "hl/c++/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/Makefile" ;;
+ "hl/c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/src/Makefile" ;;
+ "hl/c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/test/Makefile" ;;
+ "hl/c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/Makefile" ;;
+ "hl/c++/examples/run-hlc++-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/run-hlc++-ex.sh" ;;
+ "hl/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/Makefile" ;;
+ "hl/fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/src/Makefile" ;;
+ "hl/fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/test/Makefile" ;;
+ "hl/fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/Makefile" ;;
+ "hl/fortran/examples/run-hlfortran-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/run-hlfortran-ex.sh" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "pubconf":C)
+ echo "creating src/H5pubconf.h"
+ sed 's/#define /#define H5_/' <src/H5config.h |\
+ sed 's/#undef /#undef H5_/' >pubconf
+ if test ! -f src/H5pubconf.h; then
+ /bin/mv -f pubconf src/H5pubconf.h
+ elif (diff pubconf src/H5pubconf.h >/dev/null); then
+ rm -f pubconf
+ echo "src/H5pubconf.h is unchanged"
+ else
+ /bin/mv -f pubconf src/H5pubconf.h
+ fi
+ echo "Post process src/libhdf5.settings"
+ sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
+ cp libhdf5.settings.TMP src/libhdf5.settings
+ rm -f libhdf5.settings.TMP
+ ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
@@ -36043,75 +36158,45 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_FC
# ### END LIBTOOL TAG CONFIG: FC
_LT_EOF
+ ;;
-as_fn_exit 0
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
-exec 5>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec 5>>config.log
-$lt_cl_success || as_fn_exit 1
+ esac
+done # for ac_tag
-no_create=$saved_no_create
-## Then the stamp2 file for H5config.h
-touch ./config/stamp2
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
-## Finally the makefiles
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-## Are we compiling static libraries, shared libraries, or both? This
-## is only used for the libhdf5.settings file. We can't just look at
-## $enable_static and $enable_shared because if they're yes the ltconfig
-## might have decided that one or the other is simply not possible.
-## Therefore we have to ask the generated `libtool' shell script
-## which 'features' it has enabled.
-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
- enable_shared=yes
-else
- enable_shared=no
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
fi
-
-if (./libtool --features | grep '^enable static libraries' > /dev/null); then
- enable_static=yes
-else
- enable_static=no
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="static, shared"
-elif test "X$enable_static" = "Xyes"; then
- STATIC_SHARED="static"
-elif test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="shared"
-else
- STATIC_SHARED="none"
-fi
chmod 755 tools/misc/h5cc
diff --git a/configure.ac b/configure.ac
index a57d149..87e1cea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.149], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.151], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -436,6 +436,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## General Fortran flags
## Only add FFLAGS to FCFLAGS if it's set.
if test "x$FFLAGS" != "x" ; then
+ AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
FCFLAGS="${FCFLAGS} ${FFLAGS}"
fi
@@ -1243,9 +1244,10 @@ case "X-$enable_production" in
esac
## ----------------------------------------------------------------------
-## Check for system libraries.
+## Check for system libraries. "dl" stands for dynamically loaded library
##
AC_CHECK_LIB([m], [ceil])
+AC_CHECK_LIB([dl], [dlopen])
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
## ...for Solaris
@@ -1275,6 +1277,7 @@ AC_CHECK_FUNCS([clock_gettime],[have_clock_gettime="yes"],[have_clock_gettime="n
AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h])
AC_CHECK_HEADERS([sys/socket.h sys/types.h])
AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
+AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
## Darwin
@@ -1848,7 +1851,7 @@ case $withval in
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZIP])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
@@ -1942,7 +1945,7 @@ AC_ARG_WITH([pthread],
case "$withval" in
yes)
AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
- if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test "x$HAVE_PTHREAD" = "xyes"; then
AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD])
fi
;;
@@ -1984,7 +1987,7 @@ case "$withval" in
AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
fi
- if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test "x$HAVE_PTHREAD" = "xyes"; then
if test -n "$pthread_lib"; then
saved_LDFLAGS="$LDFLAGS"
saved_AM_LDFLAGS="$AM_LDFLAGS"
@@ -4433,6 +4436,64 @@ if test -n "$TESTPARALLEL"; then
FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile
fi
fi
+LT_OUTPUT
+no_create=$saved_no_create
+
+## Then the stamp2 file for H5config.h
+touch ./config/stamp2
+
+## Finally the makefiles
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+## Post processing to patch up some deficiencies in libtool
+case $host_os in
+ linux* | freebsd* )
+ ## If gcc is not used, need to set $wl to use "-Wl,"
+ if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
+ : using gcc
+ else
+ echo 'fixing $wl in' $ofile
+ed - $ofile <<EOF 2> /dev/null
+g/^wl=""/s//wl="-Wl,"/
+w
+q
+EOF
+ fi
+ ;;
+esac
+
+## Are we compiling static libraries, shared libraries, or both? This
+## is only used for the libhdf5.settings file. We can't just look at
+## $enable_static and $enable_shared because if they're yes the ltconfig
+## might have decided that one or the other is simply not possible.
+## Therefore we have to ask the generated `libtool' shell script
+## which 'features' it has enabled.
+if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
+ enable_shared=yes
+else
+ enable_shared=no
+fi
+
+if (./libtool --features | grep '^enable static libraries' > /dev/null); then
+ enable_static=yes
+else
+ enable_static=no
+fi
+
+if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="static, shared"
+elif test "X$enable_static" = "Xyes"; then
+ STATIC_SHARED="static"
+elif test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="shared"
+else
+ STATIC_SHARED="none"
+fi
+
+## ----------------------------------------------------------------------
+## Set a macro if shared library is enabled.
+##
+AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"])
AC_CONFIG_FILES([src/libhdf5.settings
Makefile
@@ -4443,6 +4504,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
test/H5srcdir_str.h
test/testlibinfo.sh
test/testlinks_env.sh
+ test/test_plugin.sh
testpar/Makefile
testpar/testph5.sh
perform/Makefile
@@ -4511,59 +4573,6 @@ AC_CONFIG_FILES([src/libhdf5.settings
hl/fortran/examples/run-hlfortran-ex.sh])
AC_OUTPUT
-LT_OUTPUT
-no_create=$saved_no_create
-
-## Then the stamp2 file for H5config.h
-touch ./config/stamp2
-
-## Finally the makefiles
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-
-## Are we compiling static libraries, shared libraries, or both? This
-## is only used for the libhdf5.settings file. We can't just look at
-## $enable_static and $enable_shared because if they're yes the ltconfig
-## might have decided that one or the other is simply not possible.
-## Therefore we have to ask the generated `libtool' shell script
-## which 'features' it has enabled.
-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
- enable_shared=yes
-else
- enable_shared=no
-fi
-
-if (./libtool --features | grep '^enable static libraries' > /dev/null); then
- enable_static=yes
-else
- enable_static=no
-fi
-
-if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="static, shared"
-elif test "X$enable_static" = "Xyes"; then
- STATIC_SHARED="static"
-elif test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="shared"
-else
- STATIC_SHARED="none"
-fi
chmod 755 tools/misc/h5cc
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index c41916a..1bddc56 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -254,7 +254,7 @@ INSTALL (
${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
@@ -264,7 +264,7 @@ IF (WIN32 AND NOT CYGWIN)
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
@@ -273,7 +273,7 @@ ELSE (WIN32 AND NOT CYGWIN)
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index 1437e9f..8a40079 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -191,7 +191,7 @@ CONTAINS
SUBROUTINE h5oclose_f(object_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER , INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5oclose_c(object_id)
@@ -565,7 +565,7 @@ CONTAINS
! obj_id - Object identifier.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! AUTHOR
! M. Scot Breitenfeld
@@ -717,16 +717,16 @@ CONTAINS
! Sets comment for specified object.
!
! Inputs:
-! loc_id - Identifier of a file, group, dataset, or named datatype.
-! name - Name of the object whose comment is to be set or reset,
+! loc_id - Identifier of a file, group, dataset, or named datatype.
+! name - Name of the object whose comment is to be set or reset,
! specified as a path relative to loc_id.
-! comment - The new comment.
+! comment - The new comment.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
-! lapl_id - Link access property list identifier.
+! lapl_id - Link access property list identifier.
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 3ac0d6b..63368dc 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -508,7 +508,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 37f7c71..d052046 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -118,8 +118,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -316,20 +317,6 @@ if test "x$do_link" = "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
- # Any libraries in LDFLAGS or H5BLD_LDFLAGS also should have rpaths embedded
- # in the executables created by h5cc (reduces need for LD_LIBRARY_PATH).
- if test -n "$LDFLAGS"; then
- for entry in $LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
- if test -n "$H5BLD_LDFLAGS"; then
- for entry in $H5BLD_LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index b68e7ca..ea91631 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -535,7 +535,7 @@ SUBROUTINE test_h5o_link(total_error)
! close the datatype
CALL h5tclose_f(tid, error)
- CALL check("h5tclose_f",error)
+ CALL check("h5tclose_f",error, total_error)
CALL h5ocopy_f(file_id, NAME_DATATYPE_SIMPLE, file_id, NAME_DATATYPE_SIMPLE2, error)
CALL check("h5ocopy_f",error,total_error)
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index f7efcc4..a9a6487 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -3137,10 +3137,15 @@ SUBROUTINE t_enum_conv(total_error)
! Enumerated data array
! Some values are out of range for testing. The library should accept them
- INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,&
- E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED,&
- E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,&
- E1_RED, E1_WHITE, INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
+ INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/INT(E1_RED,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), &
+ INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),&
+ INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), &
+ INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
! Reading array for enum data
INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data2
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 1060747..4f73fda 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -115,7 +115,7 @@ END SUBROUTINE verify
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify
+!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
USE HDF5
@@ -129,9 +129,6 @@ SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
RETURN
END SUBROUTINE verify_Fortran_INTEGER_4
-
-
-
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyLogical
@@ -151,7 +148,7 @@ END SUBROUTINE verifyLogical
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
-SUBROUTINE verifystring(string, value,correct_value,total_error)
+SUBROUTINE verifyString(string, value,correct_value,total_error)
CHARACTER*(*) :: string
CHARACTER*(*) :: value, correct_value
INTEGER :: total_error
@@ -160,7 +157,7 @@ SUBROUTINE verifystring(string, value,correct_value,total_error)
WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
ENDIF
RETURN
-END SUBROUTINE verifystring
+END SUBROUTINE verifyString
!----------------------------------------------------------------------
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 5a2a7c4..89de4ca 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -27,7 +27,7 @@ INSTALL (
FILES
${HDF5_HL_CPP_HDRS}
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/hl/cpp
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
hlcppheaders
)
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index ba80103..6b51803 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -450,7 +450,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
# Include src directory
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index c580516..9ab0fb2 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -76,7 +76,7 @@ IF (WIN32 AND NOT CYGWIN)
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
@@ -85,7 +85,7 @@ ELSE (WIN32 AND NOT CYGWIN)
DIRECTORY
${CMAKE_Fortran_MODULE_DIRECTORY}/
DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/fortran
+ ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 1b757db..4a90558 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -464,7 +464,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \
-I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 7c92b81..7cbeb1b 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -449,7 +449,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
# This library is our main target.
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index b81f8d4..1bfa23f 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -219,9 +219,8 @@ static hid_t create_test_file(const char *fileext)
{
char filename[65];
- HDstrcpy(filename, FILENAME);
- HDstrcat(filename, fileext);
- HDstrcat(filename, FILEEXT);
+ HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
+
return H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
@@ -229,9 +228,7 @@ static hid_t open_test_file(const char *fileext)
{
char filename[65];
- HDstrcpy(filename, FILENAME);
- HDstrcat(filename, fileext);
- HDstrcat(filename, FILEEXT);
+ HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
return H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
}
@@ -258,10 +255,10 @@ herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims)
char s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
char s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
char s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,120,120,120};
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
/* make a dataset */
if(H5LTmake_dataset_char(fid, name, rank, dims, buf) >= 0) {
if(fulldims==0) {
@@ -307,14 +304,13 @@ herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims)
short s2_wbuf[DIM2_SIZE] = {100,200,300,400};
short s21_wbuf[DIM2_SIZE] = {10,20,30,40};
short s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- short s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- short s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
- short s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
- short s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
- char name[32];
+ short s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
+ short s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
+ short s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
+ short s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_short(fid, name, rank, dims, buf) >= 0) {
@@ -360,10 +356,9 @@ herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims)
int s2_wbuf[DIM2_SIZE] = {100,200,300,400};
int s21_wbuf[DIM2_SIZE] = {10,20,30,40};
int s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- char name[32];
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_int(fid, name, rank, dims, buf) >= 0) {
@@ -413,12 +408,9 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int
long s42_wbuf[DIM4_SIZE] = {80,80};
long s43_wbuf[DIM4_SIZE] = {180,180};
long s44_wbuf[DIM4_SIZE] = {280,280};
- char name[32];
-
- HDstrcpy(name, dsname);
/* make a dataset */
- if(H5LTmake_dataset_long(fid, name, rank, dims, buf) >= 0) {
+ if(H5LTmake_dataset_long(fid, dsname, rank, dims, buf) >= 0) {
if(fulldims==0) {
/* make a DS dataset for the first dimension */
if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
@@ -468,10 +460,9 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
float s2_wbuf[DIM2_SIZE] = {100,200,300,400};
float s21_wbuf[DIM2_SIZE] = {10,20,30,40};
float s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- char name[32];
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_float(fid, name, rank, dims, buf) >= 0) {
@@ -503,17 +494,17 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
*/
herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -528,25 +519,25 @@ herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -561,33 +552,33 @@ herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -602,17 +593,17 @@ herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -627,26 +618,25 @@ herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -661,34 +651,33 @@ herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -703,18 +692,17 @@ herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -729,26 +717,25 @@ herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -763,34 +750,33 @@ herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -805,18 +791,17 @@ herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -831,26 +816,25 @@ herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -865,34 +849,33 @@ herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -907,42 +890,41 @@ herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_4_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_41_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_41_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_42_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_42_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_43_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_43_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
- if(s4_wbuf!=NULL) {
- HDstrcpy(name, DS_44_NAME);
- HDstrcat(name, dsidx);
+ if(s4_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_44_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s4_wbuf) < 0)
return FAIL;
@@ -957,18 +939,17 @@ herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -983,26 +964,25 @@ herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -1017,34 +997,33 @@ herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -1062,7 +1041,6 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
if(H5DSis_attached(did, dsid, idx) == 0) {
if(H5DSattach_scale(did, dsid, idx) >= 0) {
if(H5DSis_attached(did, dsid, idx) > 0) {
- /* printf(" scale attached "); */
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
@@ -1127,10 +1105,10 @@ herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *sc
if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
if(H5DSis_attached(did, dsid, idx) == 1) {
if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) > 0) {
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
+ name_out = (char*)HDmalloc(((size_t)name_len+1) * sizeof (char));
if(name_out != NULL) {
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) >= 0) {
- if(HDstrcmp(scalename,name_out)==0) {
+ if(HDstrncmp(scalename, name_out, (size_t)name_len)==0) {
ret_value = SUCCEED;
}
HDfree(name_out);
@@ -1294,8 +1272,8 @@ static int test_char_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "ac");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
TESTING2("test_char_attachscales");
@@ -1307,18 +1285,15 @@ static int test_char_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1350,8 +1325,8 @@ static int test_short_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "as");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
TESTING2("test_short_attachscales");
@@ -1363,48 +1338,39 @@ static int test_short_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_31_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_32_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_33_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1436,8 +1402,8 @@ static int test_int_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
TESTING2("test_int_attachscales");
@@ -1449,28 +1415,23 @@ static int test_int_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1502,8 +1463,8 @@ static int test_long_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
TESTING2("test_long_attachscales");
@@ -1515,23 +1476,19 @@ static int test_long_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1563,8 +1520,8 @@ static int test_duplicatelong_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al2");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
TESTING2("test_duplicatelong_attachscales");
@@ -1576,23 +1533,19 @@ static int test_duplicatelong_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1624,8 +1577,8 @@ static int test_float_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "af");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
TESTING2("test_float_attachscales");
@@ -1637,28 +1590,23 @@ static int test_float_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1691,8 +1639,8 @@ static int test_numberofscales(const char *fileext)
int nscales; /* number of scales in DIM */
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
TESTING2("test_numberofscales");
@@ -1718,8 +1666,7 @@ static int test_numberofscales(const char *fileext)
else
goto out;
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "b");
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "b");
/* make a dataset */
if(create_int_dataset(fid, "b", 1) < 0)
@@ -1727,8 +1674,7 @@ static int test_numberofscales(const char *fileext)
/* make a DS dataset for the first dimension */
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "b");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "b");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
@@ -1772,38 +1718,32 @@ static int test_char_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "ac");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set char scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1838,98 +1778,80 @@ static int test_short_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "as");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set short scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_31_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_31_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_31_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_32_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_32_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_32_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_33_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_33_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_33_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1964,58 +1886,48 @@ static int test_int_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set int scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -2050,48 +1962,40 @@ static int test_long_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set long scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_4_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_4_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2126,48 +2030,40 @@ static int test_samelong_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al2");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set same long scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_4_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2202,58 +2098,48 @@ static int test_float_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "af");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set float scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -3150,9 +3036,9 @@ static int test_simple(void)
goto out;
if(H5DSget_label(did,DIM1,dim1_label,sizeof(dim1_label)) < 0)
goto out;
- if(HDstrcmp(DIM0_LABEL,dim0_label)!=0)
+ if(HDstrncmp(DIM0_LABEL,dim0_label,sizeof(dim0_label))!=0)
goto out;
- if(HDstrcmp(DIM1_LABEL,dim1_label)!=0)
+ if(HDstrncmp(DIM1_LABEL,dim1_label,sizeof(dim1_label))!=0)
goto out;
/*-------------------------------------------------------------------------
@@ -3166,8 +3052,8 @@ static int test_simple(void)
goto out;
/* allocate */
- dim0_labeld = (char*)HDmalloc(dim0_label_size * sizeof (char));
- dim1_labeld = (char*)HDmalloc(dim1_label_size * sizeof (char));
+ dim0_labeld = (char*)HDmalloc((size_t)dim0_label_size * sizeof (char));
+ dim1_labeld = (char*)HDmalloc((size_t)dim1_label_size * sizeof (char));
if( dim0_labeld==NULL || dim1_labeld==NULL)
goto out;
if(H5DSget_label(did,DIM0,dim0_labeld,(size_t)dim0_label_size) < 0)
@@ -3197,9 +3083,9 @@ static int test_simple(void)
goto out;
if(H5DSget_label(did,DIM1,dim1_labels,sizeof(dim1_labels)) < 0)
goto out;
- if(HDstrncmp(DIM0_LABEL,dim0_label,sizeof(dim0_labels)-1)!=0)
+ if(HDstrncmp(DIM0_LABEL,dim0_labels,sizeof(dim0_labels)-1)!=0)
goto out;
- if(HDstrncmp(DIM1_LABEL,dim1_label,sizeof(dim1_labels)-1)!=0)
+ if(HDstrncmp(DIM1_LABEL,dim1_labels,sizeof(dim1_labels)-1)!=0)
goto out;
if(H5Dclose(did))
goto out;
@@ -3232,7 +3118,7 @@ static int test_simple(void)
goto out;
/* allocate a buffer */
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
+ name_out = (char*)HDmalloc(((size_t)name_len+1) * sizeof (char));
if(name_out == NULL)
goto out;
@@ -3240,7 +3126,7 @@ static int test_simple(void)
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0)
goto out;
- if(HDstrcmp("Latitude set 0",name_out)!=0)
+ if(HDstrncmp("Latitude set 0",name_out, sizeof(name_out))!=0)
goto out;
if(name_out) {
HDfree(name_out);
@@ -3253,10 +3139,10 @@ static int test_simple(void)
*/
/* get the scale name using this buffer */
- if(H5DSget_scale_name(dsid, sname, sizeof (sname)) < 0)
+ if(H5DSget_scale_name(dsid, sname, sizeof(sname)) < 0)
goto out;
- if(HDstrcmp("Latitude set 0",sname)!=0)
+ if(HDstrncmp("Latitude set 0", sname, sizeof(sname))!=0)
goto out;
/*-------------------------------------------------------------------------
@@ -3642,7 +3528,7 @@ static herr_t read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor
goto out;
if(nelmts) {
- buf=(char *)HDmalloc((size_t)(nelmts*size));
+ buf=(char *)HDmalloc(((size_t)nelmts*size));
if(buf==NULL)
goto out;
if(H5Dread(scale_id,mtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
@@ -4529,9 +4415,9 @@ static int test_rank(void)
goto out;
if(H5DSget_label(did,(unsigned)i,namel,sizeof(namel)) < 0)
goto out;
- if(HDstrcmp(name,names)!=0)
+ if(HDstrncmp(name, names, sizeof(names))!=0)
goto out;
- if(HDstrcmp(name,namel)!=0)
+ if(HDstrncmp(name, namel, sizeof(namel))!=0)
goto out;
}
@@ -4986,8 +4872,8 @@ static int read_data( const char* fname,
for(i=0, nelms=1; i < ndims; i++) {
fscanf( f, "%s %u", str, &j);
fscanf( f, "%d",&n );
- dims[i] = n;
- nelms *= n;
+ dims[i] = (hsize_t)n;
+ nelms *= (size_t)n;
}
*buf = (float*) HDmalloc (nelms * sizeof( float ));
diff --git a/release_docs/CMake.txt b/release_docs/INSTALL_CMake.txt
index 81dfb61..95ebec9 100644
--- a/release_docs/CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -2,65 +2,112 @@
* Build and Install HDF5 C/C++ Library with CMake *
************************************************************************
-Notes: This short instruction is written for users who want to quickly build
- HDF5 library and tools from the HDF5 source code package using the
- CMake tools.
-
- More information about using CMake can be found at the KitWare site,
- www.cmake.org.
-
- CMake uses the command line, however the visual CMake tool is
- recommended for the configuration step. The steps are similar for
- all the operating systems supported by CMake.
+ Table of Contents
+
+Section I: Quick Step Building HDF5 Libraries with CMake
+Section II: Preconditions
+Section III: Building HDF5 C/C++ Libraries with CMake
+Section IV: All Options for HDF5 C/C++ Libraries with CMake
+Section V: APPENDIX
+
+************************************************************************
+
+
+
+========================================================================
+I. Quick Step Building HDF5 Libraries with CMake
+========================================================================
+Notes: This short set of instructions is written for users who want to
+ quickly build the HDF5 Library and tools from the HDF5 source code
+ package using the CMake tools.
- NOTES:
- 1. Using CMake for building and using HDF5 is under active development.
- While we have attempted to provide error-free files, please
- understand that development with CMake has not been extensively
- tested outside of HDF. The CMake specific files may change
- before the next release.
-
- 2. CMake was originally introduced to support development on Windows,
- however it should be usable on any system where CMake is supported.
- Please send us any comments on how CMake support can be improved on
- any system. Visit the KitWare site for more information about CMake.
-
- 3. Build and test results can be submitted to our CDash server at:
- cdash.hdfgroup.uiuc.edu.
- Please read the HDF and CDash document at:
- www.hdfgroup.org/CDash/HowToSubmit.
-
- 4. See the appendix at the bottom of this file for examples of using
- a ctest script for building and testing.
-
+ A. Windows Quick Step Building HDF5 Libraries with CMake Using VS2010
+
+ Go through these steps:
+
+ 1. Locate the source files in:
+ c:\MyHDFstuff\hdf5
+
+ 2. Create a build folder at:
+ c:\MyHDFstuff\hdf5\build
+
+ 3. Open a command prompt at:
+ c:\MyHDFstuff\hdf5\build
+
+ 4. Configure the C library, tools and tests with this command:
+ cmake -G "Visual Studio 10" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
+
+ 3. Build the C library, tools and tests with this command:
+ cmake --build . --config Release
+
+ 4. Test the C library and tools with this command:
+ ctest . -C Release
+
+ 5. Create an install image with this command:
+ cpack -C Release CPackConfig.cmake
+
+ 6. Install with this command:
+ HDF5-1.8.11-win32.exe
+
+ B. Linux Quick Step Building HDF5 Libraries with CMake Using GCC
+
+ Go through these steps:
+ 1. Locate the source files in:
+ ~\MyHDFstuff\hdf5
+
+ 2. Create a build folder at:
+ ~\MyHDFstuff\hdf5\build
+
+ 3. Open a command prompt at:
+ ~\MyHDFstuff\hdf5\build
+
+ 4. Configure the C library, tools and tests with this command:
+ cmake -G "Unix Makefiles" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
+
+ 3. Build the C library, tools and tests with this command:
+ cmake --build . --config Release
+
+ 4. Test the C library and tools with this command:
+ ctest . -C Release
+
+ 5. Create an install image with this command:
+ cpack -C Release CPackConfig.cmake
+
+ 6. Install with this command:
+ HDF5-1.8.11-Linux.sh
+
+
+
+
+========================================================================
+II. Preconditions
========================================================================
- Preconditions
-========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires CMake version 2.8.10.
+ web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.10.
- 2. If you plan to use Zlib or Szip;
- A. Download the packages and install them
- in a central location. For example on Windows, create a folder extlibs
- and install the packages there.
- B. Use source packages from a SVN server by adding the following CMake
+ 2. If you plan to use Zlib or Szip:
+ A. Download the packages and install them in a central location.
+ For example on Windows, create a folder extlibs and install the
+ packages there.
+ B. Use source packages from an SVN server by adding the following CMake
options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
ZLIB_SVN_URL:STRING="http://some_location/zlib/trunk"
SZIP_SVN_URL:STRING="http://some_location/szip/trunk"
where "some_location" is the URL to the SVN repository.
- C. Use source packages from a compressed file by adding the following CMake
- options:
+ C. Use source packages from a compressed file by adding the following
+ CMake options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
TGZ_PATH:STRING="some_location"
- where "some_location" is the URL or full path to the compressed file and
- ext is the type of compression file.
+ where "some_location" is the URL or full path to the compressed
+ file and ext is the type of compression file.
- 3. Building on Apple Darwin platforms should add the following options:
+ 3. If you are building on Apple Darwin platforms, you should add the
+ following options:
Compiler choice - use xcode by setting the ENV variables of CC and CXX
Shared fortran is not supported, build static:
BUILD_SHARED_LIBS:BOOL=OFF
@@ -69,9 +116,55 @@ Notes: This short instruction is written for users who want to quickly build
CTEST_USE_LAUNCHERS:BOOL=ON
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
-
+ 4. Windows developers should install NSIS to create an install image with CPack.
+ Visual Studio Express users will not be able to package HDF5 into
+ an install image executable.
+
+
+Notes: More information about using CMake can be found at the KitWare site,
+ www.cmake.org.
+
+ CMake uses the command line; however, the visual CMake tool is
+ recommended for the configuration step. The steps are similar for
+ all the operating systems supported by CMake.
+
+ NOTES:
+ 1. Using CMake for building and using HDF5 is under active development.
+ While we have attempted to provide error-free files, please
+ understand that development with CMake has not been extensively
+ tested outside of HDF. The CMake specific files may change
+ before the next release.
+
+ 2. CMake support for HDF5 development should be usable on any
+ system where CMake is supported. Please send us any comments on
+ how CMake support can be improved on any system. Visit the
+ KitWare site for more information about CMake.
+
+ 3. Build and test results can be submitted to our CDash server at:
+ cdash.hdfgroup.uiuc.edu.
+ Please read the HDF and CDash document at:
+ www.hdfgroup.org/CDash/HowToSubmit.
+
+ 4. See the appendix at the bottom of this file for examples of using
+ a ctest script for building and testing.
+
+
+
+
========================================================================
- Building HDF5 C/C++ Libraries with CMake
+III. Building HDF5 C/C++ Libraries with CMake
+========================================================================
+
+To build the HDF5 C/C++ Libraries with CMake, go through these five steps:
+
+ 1. Run CMake
+ 2. Configure the cache settings
+ 3. Build HDF5
+ 4. Test HDF5
+ 5. Packaging HDF5 (create install image)
+
+These five steps are described in detail below.
+
========================================================================
1. Run CMake
@@ -80,18 +173,21 @@ Notes: This short instruction is written for users who want to quickly build
available in your Start menu. For Linux, UNIX, and Mac users the
executable is named "cmake-gui" and can be found where CMake was
installed.
+
Specify the source and build directories.
- ***** It is recommemded that you choose a build directory ******
- ***** different then the source directory ******
- (for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then
- use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5).
+
+ ***** Make the build and source directories different. ******
+
+ For example on Windows, if the source is at c:\MyHDFstuff\hdf5,
+ then use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5 as the
+ build directory.
OPTIONAL:
- Users can perform the configuration step without using the visual cmake-gui
- program. We use the file cacheinit.cmake in the config/cmake folder for
- our testing. This file enables all the basic options and we turn specific
- options on or off for testing using the following command line within the build
- directory:
+ Users can perform the configuration step without using the visual
+ cmake-gui program. We use the file cacheinit.cmake in the
+ config/cmake folder for our testing. This file enables all the
+ basic options and we turn specific options on or off for testing
+ using the following command line within the build directory:
cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
@@ -101,6 +197,8 @@ Notes: This short instruction is written for users who want to quickly build
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
+ * Visual Studio 11
+ * Visual Studio 11 Win64
* Visual Studio 10
* Visual Studio 10 Win64
* Visual Studio 6
@@ -119,7 +217,7 @@ Notes: This short instruction is written for users who want to quickly build
* <HDF5OPTION>:BOOL=[ON | OFF]
<cacheinit.cmake> is:
- # This is the CMakeCache file.
+ # This is the CMakeCache file used by HDF Group for daily tests.
########################
# EXTERNAL cache entries
########################
@@ -167,7 +265,7 @@ Notes: This short instruction is written for users who want to quickly build
generator you wish to use (for example on Windows, Visual Studio 9 2008).
CMake will read in the CMakeLists.txt files from the source directory and
display options for the HDF5 project. After the first configure you
- can adjust the cache settings and/or specify locations of other programs.
+ can adjust the cache settings and/or specify the locations of other programs.
Any conflicts or new values will be highlighted by the configure
process in red. Once you are happy with all the settings and there are no
@@ -185,8 +283,8 @@ Notes: This short instruction is written for users who want to quickly build
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 9 2008" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF ..
- 2.3 On Windows, if you are using a VS Express version you must be sure that the
- following two options are correctly set/unset:
+ 2.3 On Windows, if you are using a Visual Studio Express version you must
+ be sure that the following two options are correctly set/unset:
HDF5_NO_PACKAGES:BOOL=ON
HDF5_USE_FOLDERS:BOOL=OFF
@@ -197,7 +295,7 @@ Notes: This short instruction is written for users who want to quickly build
or the command line. The command line is used on linux, Unix, and Mac.
To build from the command line, navigate to your build directory and
- execute the following;
+ execute the following:
cmake --build . --config {Debug | Release}
@@ -209,33 +307,34 @@ Notes: This short instruction is written for users who want to quickly build
Release and build the solution.
3.2.1 The external libraries (zlib and szip) can be configured
- to allow building the libraries by downloading from a SVN repository.
+ to allow building the libraries by downloading from an SVN repository.
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following
configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
- The options to control the SVN URL (config/cmake/cacheinit.cmake file):
+ The options to control the SVN URL (config/cmake/cacheinit.cmake file) are:
ZLIB_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/zlib/trunk"
SZIP_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/szip/trunk"
These should be changed to your location.
3.2.2 Or the external libraries (zlib and szip) can be configured
to allow building the libraries by using a compressed file.
- The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following
- configuration option:
+ The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT' and is enabled by
+ adding the following configuration option:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
- The options to control the SVN URL (config/cmake/cacheinit.cmake file):
+ The options to control the SVN URL (config/cmake/cacheinit.cmake
+ file) are:
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
TGZ_PATH:STRING="some_location"
- where "some_location/xxxx_src.ext" is the URL or full path to the
- compressed file and where ext is the type of the compression file like:
- .bz2, .tar, .tar.gz, .tgz, .zip
+ where "some_location/xxxx_src.ext" is the URL or full path to
+ the compressed file and where ext is the type of the compression
+ file such as .bz2, .tar, .tar.gz, .tgz, or .zip.
- 4. Test HDF5.
+ 4. Test HDF5
- To test the build, navigate to your build directory and execute;
+ To test the build, navigate to your build directory and execute:
ctest . -C {Debug | Release}
@@ -243,7 +342,7 @@ Notes: This short instruction is written for users who want to quickly build
recommend choosing either Debug or Release to match the build
step on Windows.
- 5. Packaging HDF5
+ 5. Packaging HDF5 (create an install image)
To package the build into a simple installer using the NullSoft installer NSIS
on Windows, or into compressed files (.tar.gz, .sh, .zip), use the CPack tool.
@@ -252,17 +351,17 @@ Notes: This short instruction is written for users who want to quickly build
cpack -C {Debug | Release} CPackConfig.cmake
- NOTE: We have just introduced the packaging capability and it has not been
- extensively tested. Please send us comments on how it can be improved.
- See NSIS note 8 of this document.
- Also, if you are using a VS Express version or do not want to enable
- the packaging components, set HDF5_NO_PACKAGES to ON (on the command
- line add -DHDF5_NO_PACKAGES:BOOL=ON)
+ NOTE: See note 8 of this document for NSIS information.
+ Also, if you are using a Visual Studio Express version or do not
+ want to enable the packaging components, set HDF5_NO_PACKAGES
+ to ON (on the command line add -DHDF5_NO_PACKAGES:BOOL=ON)
6. The files that support building HDF5 with CMake are all the files in the
config/cmake folder, the CMakeLists.txt files in each source folder, and
CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
- performed by The HDF Group. It should be altered for the users
+ performed by The HDF Group. It should be altered for the user's
+ installation and needs. The cacheinit.cmake file settings are used by
+ The HDF Group for daily testing. It should be altered/ignored for the user's
installation and needs.
7. More information about using CMake can be found at the KitWare site,
@@ -276,90 +375,104 @@ Notes: This short instruction is written for users who want to quickly build
"output directory", which is where the program will be installed. These
options are case-sensitive, so be sure to type them in upper case.
-
+
+
========================================================================
- All options for HDF5 C/C++ Libraries with CMake
- Option Name --- Option Description --- Option Default
+IV. All Options for HDF5 C/C++ Libraries with CMake
========================================================================
+
+In the options listed below, there are three columns of information:
+Option Name, Option Description, and Option Default.
+
---------------- General Build Options ---------------------
-BUILD_SHARED_LIBS "Build Shared Libraries" OFF
+BUILD_SHARED_LIBS "Build Shared Libraries" OFF
BUILD_STATIC_EXECS "Build Static Executabless" OFF
-BUILD_STATIC_PIC "Build Static PIC" OFF
-BUILD_TESTING "Build HDF5 Unit Testing" OFF
+BUILD_STATIC_PIC "Build Static PIC" OFF
+BUILD_TESTING "Build HDF5 Unit Testing" OFF
---------------- HDF5 Build Options ---------------------
-HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF
-HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF
-HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
-HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF
-HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF
+HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF
+HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF
+HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
+HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF
+HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF
IF (HDF5_BUILD_FORTRAN)
HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF
---------------- HDF5 Advanced Options ---------------------
-HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
-HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON
-HDF5_Enable_Instrument "Instrument The library" HDF5_Enable_Instrument
-HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF
-HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF
-HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON
-HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON
-HDF5_ENABLE_GPFS "Enable GPFS hints for the MPI/POSIX file driver" OFF
-HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON
-HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON
-HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF
-HDF5_ENABLE_TRACE "Enable API tracing capability" OFF
-HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF
-HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF
-HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF
-HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF
-HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
-HDF5_TEST_VFD "Execute tests with different VFDs" OFF
-HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
-HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
-HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
-HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
-HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
+HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
+HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON
+HDF5_Enable_Instrument "Instrument The library" OFF
+HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF
+HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF
+HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON
+HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON
+HDF5_ENABLE_GPFS "Enable GPFS hints for the MPI/POSIX file driver" OFF
+HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON
+HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON
+HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF
+HDF5_ENABLE_TRACE "Enable API tracing capability" OFF
+HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF
+HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF
+HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF
+HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF
+HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
+HDF5_TEST_VFD "Execute tests with different VFDs" OFF
+HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
+HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
+HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
+HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
+HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
+HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
IF (APPLE)
- HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
+ HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
IF (CMAKE_BUILD_TYPE MATCHES Debug)
- HDF5_ENABLE_TRACE "Enable API tracing capability" ON
+ HDF5_ENABLE_TRACE "Enable API tracing capability" ON
IF (HDF5_TEST_VFD)
- HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
+ HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
IF (WIN32 AND NOT CYGWIN)
- HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF
-HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
+ HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF
---------------- External Library Options ---------------------
-HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO"
-HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
-HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
-ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
-SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
-HDF5_USE_FILTER_FLETCHER32 "Use the FLETCHER32 Filter" ON
-HDF5_USE_FILTER_NBIT "Use the NBIT Filter" ON
-HDF5_USE_FILTER_SCALEOFFSET "Use the SCALEOFFSET Filter" ON
-HDF5_USE_FILTER_SHUFFLE "Use the SHUFFLE Filter" ON
+HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO"
+HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
+HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
+ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
+SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
+HDF5_USE_FILTER_FLETCHER32 "Use the FLETCHER32 Filter" ON
+HDF5_USE_FILTER_NBIT "Use the NBIT Filter" ON
+HDF5_USE_FILTER_SCALEOFFSET "Use the SCALEOFFSET Filter" ON
+HDF5_USE_FILTER_SHUFFLE "Use the SHUFFLE Filter" ON
IF (HDF5_ENABLE_SZIP_SUPPORT)
- HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
+ HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
-************************************************************************
- APPENDIX
+
+========================================================================
+V. APPENDIX
+========================================================================
Below are examples of the ctest scripts used by The HDF Group.
See the script, cmakehdf5, in the bin folder for a smaller and limited
function shell script version of the following general scripts.
The example is for a linux machine, but the same scripts can be used on
-a windows machine by adjusting the CTEST_CMAKE_GENERATOR option in the
+a Windows machine by adjusting the CTEST_CMAKE_GENERATOR option in the
product specific script.
-
-************************************************************************
-CTestScript.cmake: common ctest script used to build, test and package
+CTestScript.cmake
+
+
+
========================================================================
+CTestScript.cmake
+========================================================================
+
+The CTestScript.cmake script, shown below, is a common ctest script that
+is used to build, test, and package HDF5 Library files.
+
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -569,108 +682,86 @@ endforeach(v)
message("Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
-if(${MODEL} STREQUAL "Continuous")
- ## Continuous mode is used for commit test processing
- ## --------------------------
- while (${CTEST_ELAPSED_TIME} LESS 36000)
- set(START_TIME ${CTEST_ELAPSED_TIME})
- CTEST_START (Continuous)
- CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
- set (CTEST_CHECKOUT_COMMAND) # checkout on first iteration only
- message("Dashboard updated files: ${res}\n")
- if(res GREATER 0)
- CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
- CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
- CTEST_SUBMIT (PARTS Update Configure Notes)
- CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- CTEST_SUBMIT (PARTS Build)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- CTEST_SUBMIT (PARTS Test)
-
- execute_process (COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION}
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- endif(${res} GREATER 0)
-
- CTEST_SLEEP(${START_TIME} 300 ${CTEST_ELAPSED_TIME})
- endwhile (${CTEST_ELAPSED_TIME} LESS 36000)
-#-----------------------------------------------------------------------------
-else(${MODEL} STREQUAL "Continuous")
-#-----------------------------------------------------------------------------
- ## NORMAL process
- ## -- LOCAL_SKIP_UPDATE skips updating the source folder from svn
- ## -- LOCAL_NO_SUBMIT skips reporting to CDash server
- ## -- LOCAL_SKIP_TEST skips the test process (only builds)
- ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
- ## -- LOCAL_COVERAGE_TEST executes code coverage process
- ## --------------------------
- CTEST_START (${MODEL} TRACK ${MODEL})
- if(NOT LOCAL_SKIP_UPDATE)
- CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
- endif(NOT LOCAL_SKIP_UPDATE)
- CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
- CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
- if(NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Update Configure Notes)
- endif(NOT LOCAL_NO_SUBMIT)
- CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Build)
- endif(NOT LOCAL_NO_SUBMIT)
- if(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if(NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Test)
- endif(NOT LOCAL_NO_SUBMIT)
- else(NOT LOCAL_MEMCHECK_TEST)
- CTEST_MEMCHECK (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if(NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS MemCheck)
- endif(NOT LOCAL_NO_SUBMIT)
- endif(NOT LOCAL_MEMCHECK_TEST)
- if(LOCAL_COVERAGE_TEST)
- CTEST_COVERAGE (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(NOT LOCAL_NO_SUBMIT)
- CTEST_SUBMIT (PARTS Coverage)
- endif(NOT LOCAL_NO_SUBMIT)
- endif(LOCAL_COVERAGE_TEST)
- endif(NOT LOCAL_SKIP_TEST)
+## NORMAL process
+## -- LOCAL_SKIP_UPDATE skips updating the source folder from svn
+## -- LOCAL_NO_SUBMIT skips reporting to CDash server
+## -- LOCAL_SKIP_TEST skips the test process (only builds)
+## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
+## -- LOCAL_COVERAGE_TEST executes code coverage process
+## --------------------------
+CTEST_START (${MODEL} TRACK ${MODEL})
+if(NOT LOCAL_SKIP_UPDATE)
+ CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+endif(NOT LOCAL_SKIP_UPDATE)
+CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Update Configure Notes)
+endif(NOT LOCAL_NO_SUBMIT)
+ CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Build)
+endif(NOT LOCAL_NO_SUBMIT)
+if(NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
- ##-----------------------------------------------
- ## Package the product
- ##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Test)
+ endif(NOT LOCAL_NO_SUBMIT)
+ else(NOT LOCAL_MEMCHECK_TEST)
+ CTEST_MEMCHECK (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS MemCheck)
+ endif(NOT LOCAL_NO_SUBMIT)
endif(NOT LOCAL_MEMCHECK_TEST)
-endif(${MODEL} STREQUAL "Continuous")
+ if(LOCAL_COVERAGE_TEST)
+ CTEST_COVERAGE (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if(NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Coverage)
+ endif(NOT LOCAL_NO_SUBMIT)
+ endif(LOCAL_COVERAGE_TEST)
+endif(NOT LOCAL_SKIP_TEST)
+if(NOT LOCAL_MEMCHECK_TEST)
+ ##-----------------------------------------------
+ ## Package the product
+ ##-----------------------------------------------
+ execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE cpackResult
+ OUTPUT_VARIABLE cpackLog
+ ERROR_VARIABLE cpackLog.err
+ )
+ file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+endif(NOT LOCAL_MEMCHECK_TEST)
#-----------------------------------------------------------------------------
-
message("DONE:CTestScript")
-************************************************************************
-************************************************************************
-Product specific script, HDF518Static.cmake, that uses the
-CTestScript.cmake file (see above). Usage:
-"ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log"
-where hdf518 is the source folder relative to the location of these scripts
+
+
+========================================================================
+ctest
========================================================================
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+Below is an example of the ctest script used by The HDF Group. The
+CTestScript.cmake file used by this script is shown above. Adjust the values
+as necessary. Note that the source folder is entered on the command line
+and the build folder is created as a sub-folder.
+
+
+
+############################################################################
+# Product specific script, HDF518Static.cmake, that uses the
+# CTestScript.cmake file (see above). Usage:
+# "ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log"
+# where hdf518 is the source folder relative to the location of these scripts
+############################################################################
+
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
# CTEST_SCRIPT_ARG is the source folder passed on the command line
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/buildstatic)
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
set(CTEST_BUILD_CONFIGURATION "Release")
@@ -703,7 +794,11 @@ include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
message("DONE")
-************************************************************************
-Need further assistance, send email to help@hdfgroup.org
+
+========================================================================
+For further assistance, send email to help@hdfgroup.org
+========================================================================
+
+
diff --git a/release_docs/INSTALL_MinGW.txt b/release_docs/INSTALL_MinGW.txt
deleted file mode 100644
index 245e3ff..0000000
--- a/release_docs/INSTALL_MinGW.txt
+++ /dev/null
@@ -1,269 +0,0 @@
-************************************************************************
- HDF5 Build and Install Instructions for MinGW
-************************************************************************
-
-NOTE:
-We are no longer actively supporting MinGW as of 1.8.5.
------- 1.8.9 notes ------
-Autotools configure failed to correctly generate the *config.h files.
-CMake 2.8.6 can configure and build the library, however fortran programs did
- not execute correctly. Some tests may fail. Used the "MSYS Makefiles"
- generator for the "-G" parameter. Follow the CMake.txt document.
-
-Below are the old instructions from the 1.8.4 release.
-
-************************************************************************
-************************************************************************
-************************************************************************
-
-Preconditions:
---------------
-
-1. Installed MinGW (5.1.6 or higher) and MSYS (1.0.11 or higher)
-
- To install the MinGW net release, go to http://www.mingw.org and
- follow the instructions for a manual installation.
-
-2. Compilers Installed
-
- 2.1 C/C++ Compilers HDF5-1.8.4 Supported
-
- gcc-4.4.0 is included in MinGW, which includes:
- gcc : GNU C compiler
- gcc-g++: GNU C++ compiler
- gfortran: GNU Fortran compiler
-
- 2.2 Using Compilers Not Supported
-
- The compilers in 2.1 are supported and tested by The HDF
- Group. Any other compilers may still work but they are not
- guaranteed by HDF group.
-
- If users want to use other compilers except those in 2.1,
- try to set the following variables to override the default
- choices.
-
- CC : C compiler command
- CXX : C++ compiler command
- FC : Fortran compiler command
-
-3. HDF5 Dependencies
-
- 3.1 Zlib
-
- zlib-1.2.2 or later is supported and tested on MinGW.
-
- 3.2 Szip
- The HDF5 library has a predefined compression filter that uses
- the extended-Rice lossless compression algorithm for chunked
- datatsets. For more information about Szip compression and
- license terms see
- http://hdfgroup.org/HDF5/doc_resource/SZIP/index.html.
-
- Szip is currently not supported on MinGW, although we plan to add
- support in the future.
-
-
-Build HDF5 on MinGW
-----------------------
-
-1. Get HDF5 source code package
- Users can download HDF5 source code package from HDF website
- (http://hdfgroup.org).
-
-2. Unpacking the distribution
-
- The HDF5 source code is distributed in a variety of formats which
- can be unpacked with the following commands, each of which creates
- an `hdf5-1.8.4' directory.
-
- 2.1 Non-compressed tar archive (*.tar)
-
- $ tar xf hdf5-1.8.4.tar
-
- 2.2 Gzip'd tar archive (*.tar.gz)
-
- $ gunzip < hdf5-1.8.4.tar.gz | tar xf -
-
- 2.3 Bzip'd tar archive (*.tar.bz2)
-
- $ bunzip2 < hdf5-1.8.4.tar.bz2 | tar xf -
-
-3. Setup Environment
-
- Building HDF5 1.8.4 requires an explicit link to libws2_32.a
- to handle Windows Sockets. To do this, issue the command:
-
- $ export LIBS=-lws2_32
-
- Also, the default search path can cause trouble using ./configure in HDF5
- 1.8.4. Check that non-MinGW or non-msys directories are not added to the
- PATH. You can do this by:
-
- $ echo $PATH
-
- If there are spurious entries, specifically those related to other Windows
- compilers or tools, remove them by setting a new PATH without them. For
- example,
-
- $ export PATH=.:/usr/local/bin:/mingw/bin:/bin
-
-
-4. Remove Unsupported Source
-
- There are some projects which are built by default to test performance on
- POSIX systems. They are irrelevent on MinGW, and can cause compiler errors.
-
- To remove these projects from the build script, open ./perform/Makefile.in
- Find all instances of "h5perf_serial", and remove them (along with their
- respective extension or targets, if they exist). Then save the file.
-
-
-5. Remove Tests
-
- When building with MinGW, many tests must be removed from the
- test suite run with "make check". This is because of the way
- MinGW and Windows handles certain parsing. For example, MinGW
- treats any command parameter starting with '/' as a path, and
- replaces it with it's root directory on Windows, such as
- 'C:\msys\1.0\'.
-
- To remove the tests, open the given 'Makefile.in' and edit the
- line begining with "TEST_SCRIPT = " to remove the test script.
- For example, to remove the "testerror.sh" from ./test/Makefile.in:
-
- 1) Open ./test/Makefile.in
-
- 2) Find the line "TEST_SCRIPT = $(top_srcdir)/test/testerror.sh"
-
- 3) Change it to simply read "TEST_SCRIPT =", and save.
-
- Do this for the following Makefiles and tests:
-
- - ./test/Makefile.in: "testerror.sh testlibinfo.sh testcheckinfo.sh"
-
- - ./tools/h5diff/Makefile.in: "testh5diff.sh"
-
- - ./tools/h5ls/Makefile.in: "testh5ls.sh"
-
- - ./tools/misc/Makefile.in: "testh5mkgrp.sh"
-
- - ./tools/h5copy/Makefile.in: "testh5copy.sh"
-
- - ./tools/h5stat/Makefile.in: "testh5stat.sh"
-
- - ./tools/h5dump/Makefile.in: "testh5dump.sh" and "testh5dumpxml.sh"
-
-
-6. Configuring
-
- Notes:
- 1) Note: MinGW is c++ package is missing the libstdc++.dll.a file
- and c++ linking fails. Do not enable c++ option in configure.
-
- 2) See detailed information in hdf5/release_docs/INSTALL,
- part 5. Full installation instructions for source
- distributions
-
- In short,
-
- To configure HDF5 with C Library, use
-
- $ ./configure
-
- If you would like to build the C++ library, add the parameter:
-
- --enable-cxx (12-11-2009 MinGW C++ package is missing a file)
-
- If you would like to build without the Zlib library, add the parameter:
-
- --without-zlib
-
- If you would like to specify the the Zlib library, there are two ways:
-
- Using
-
- --with-zlib=INCDIR,LIBDIR
-
- For example, if the zlib library is installed in
- /usr, which is the parent directory of directories
- "include" and "lib",
-
- --with-zlib=/usr/include,/usr/lib
-
- Through the CPPFLAGS and LDFLAGS Variables
-
- For example, if zlib was installed in the directory
- /c/usr then using the following command to configure
- HDF5 with zib
-
- $ export CPPFLAGS=-I/usr/include
- $ export LDFLAGS=-L/usr/lib
-
- If you would like to specify the install directory, add the parameter:
-
- --prefix="path for installation"
-
- By default, HDF5 library, header files, examples, and
- support programs will be installed in /usr/local/lib,
- /usr/local/include, /usr/local/doc/hdf5/examples, and
- /usr/local/bin. To use a path other than /usr/local specify
- the path with the `--prefix=PATH' switch as in the above
- command.
-
- Combination of Switches
-
- All of the above switches can be combined together. For
- example, if users want to configure HDF5 C/Fortran
- library, with zlib library at /c/usr/, and
- install HDF5 into directory /c/hdf5 using
- gcc/gfortran as C/Fortran compiler:
-
- $ ./configure
- --with-zlib=/usr/include,/usr/lib
- --prefix=/c/hdf5
- --enable-fortran
- <"If no more switches, then hit Enter">
-
- Notes: The command format above is for readilibity. In practice,
- please type in the command above with at least one
- space between each line, No "Enter" until users finish
- the switches and want to run the configure.
-
-
- or do it through CPPFLAGS and LDFLAGS variables:
-
- $ CPPFLAGS=-I/usr/include \
- $ LDFLAGS=-L/usr/lib \
-
- $ ./configure
- --prefix=/c/hdf5
- --enable-fortran
- <"If no more switches, then hit Enter">
-
-7. Make and Make Check
-
- After configuration is done successfully, run the following series of
- commands to build, test and install HDF5
-
- $ make > "output file name"
- $ make check > "output file name"
-
- Before run "make install", check output file for "make check", there
- should be no failures at all.
-
-8. Make Install
-
- $ make install > "output file name"
-
-
-9. Check installed HDF5 library
-
- After step 8, go to your installation directory, there should be
- three subdirectories: "bin" "include" and "lib".
-
- $ make installcheck > "output file name"
-
------------------------------------------------------------------------
-
-Need Further assistance, email help@hdfgroup.org
diff --git a/release_docs/INSTALL_Windows.txt b/release_docs/INSTALL_Windows.txt
index 4344ea4..7873709 100644
--- a/release_docs/INSTALL_Windows.txt
+++ b/release_docs/INSTALL_Windows.txt
@@ -6,8 +6,11 @@
We now recommend that users build, test and install HDF5 using CMake.
-Instructions for building and testing HDF5 using CMake can be found in
-the CMake.txt file found in this folder.
+Instructions for building and testing HDF5 using CMake can be found in the
+INSTALL_CMake.txt file found in this folder.
-The old INSTALL_Windows documentation can be found in the
-obsolete_windows_docs\ folder located with this document.
+For instructions of building and testing an application with HDF5, see
+USING_HDF5_CMake.txt file found in this folder.
+
+Users who want to build and run an application with HDF5 in Visual Studio
+without using CMake should consult the USING_HDF5_VS.txt file.
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index dbd3b75..9961c55 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.149 currently under development
+HDF5 version 1.9.151 currently under development
================================================================================
@@ -106,6 +106,9 @@ New Features
Library:
--------
+ - The library can load filter libraries dynamically during runtime. Users
+ can set the search path through environment variable HDF5_PLUGIN_PATH
+ and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08)
- Added new API functions H5Dscatter and H5Dgather to scatter data to and
and gather data from a selection within a memory buffer.
(NAF - 2013/02/05)
@@ -407,12 +410,20 @@ Support for new platforms, languages and compilers.
- Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08)
- PathScale compilers are recognized and can build the HDF5 library
properly. AKC - 2009/7/28 -
+ - SunOS 5.11 (emu) 32-bit and 64-bit with Sun C/C++ 5.12 compiler and
+ Sun Fortran 95 8.6 compiler. (SLU - 2013/04/15)
Bug Fixes since HDF5-1.8.0 release
==================================
Library
-------
+ - Fixed an error involving failure to write fill values to the user's
+ buffer when reading unallocated chunks from datasets that have a
+ fill value set to H5D_FILL_VALUE_DEFAULT. A consequence of this
+ was the reporting of spurious data values in h5dump and h5diff
+ output.
+ (HDFFV-8247; JP - 2013/05/03)
- Fixed an error that could occur when calling H5Ocopy within an
H5Literate callback (and possibly other situations).
(NAF - 2012/7/25 - HDFFV-5853)
@@ -1126,10 +1137,11 @@ Supported Platforms
MPICH mpich2-1.4.1p1 compiled with
gcc 4.1.2 and gfortran 4.1.2
- Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
- (ostrich) GNU Fortran (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
-
+ Linux 2.6.32-358.2.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ IBM XL C/C++ V11.1
+ IBM XL Fortran V13.1
Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers
ch5.x86_64 GNU/Linux Version 12.1.5.339
(LLNL Aztec)
@@ -1138,12 +1150,9 @@ Supported Platforms
(LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0
XL Fortran for Blue Gene/P, bgxlf90 V11.1
- SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16
- (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13
- Sun C++ 5.9 Sun OS_sparc Patch 124863-26
- Sun C 5.11 SunOS_sparc
- Sun Fortran 95 8.5 SunOS_sparc
- Sun C++ 5.11 SunOS_sparc
+ SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc
+ (emu) Sun Fortran 95 8.6 SunOS_sparc
+ Sun C++ 5.12 SunOS_sparc
Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files)
@@ -1161,15 +1170,9 @@ Supported Platforms
Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6
Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- (fred) gfortran GNU Fortran (GCC) 4.6.2
- Intel C (icc), Fortran (ifort), C++ (icpc)
- 12.1.0.038 Build 20110811
-
- Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- Intel 32-bit gfortran GNU Fortran (GCC) 4.6.1
- (tejeda) Intel C (icc), Fortran (ifort), C++ (icpc)
- 12.1.0.038 Build 20110811
+ 64-bit gfortran GNU Fortran (GCC) 4.6.2
+ (fred) Intel C (icc), Fortran (ifort), C++ (icpc)
+ 12.1 Build 20120928
Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1
32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1
@@ -1197,11 +1200,10 @@ Tested Configuration Features Summary
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
-Solaris2.10 32-bit n y/y n y y y
-Solaris2.10 64-bit n y/n n y y y
+Solaris2.11 32-bit n y/y n y y y
+Solaris2.11 64-bit n y/n n y y y
Windows 7 y y/n n y y y
Windows 7 x64 y y/n n y y y
-Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y
Mac OS X Lion 10.7.3 32-bit n y/y n y y n
Mac OS X Lion 10.7.3 64-bit n y/y n y y y
@@ -1213,16 +1215,15 @@ CentOS 5.5 Linux 2.6.18-308 i686 PGI n y/y n y y y
CentOS 5.5 Linux 2.6.18 x86_64 GNU y y/y y y y y
CentOS 5.5 Linux 2.6.18 x86_64 Intel n y/y n y y y
CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y
-Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y
+Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y
Platform Shared Shared Shared Thread-
C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit n n n n
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
-Mac OS X Snow Leopard 10.6.8 32-bit y n y n
Mac OS X Snow Leopard 10.6.8 64-bit y n y n
Mac OS X Lion 10.7.3 32-bit y n y y
Mac OS X Lion 10.7.3 64-bit y n y y
@@ -1234,7 +1235,7 @@ CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
-Linux 2.6.32-220.7.1.el6.ppc64 y y y n
+Linux 2.6.32-358.2.1.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 0e980ea..2b3c02b 100644
--- a/release_docs/USING_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -1,79 +1,96 @@
************************************************************************
-* Build and Install HDF5 Applications with CMake *
+* Build and Install HDF5 Applications with CMake *
************************************************************************
-Notes: This short instruction is written for users who want to quickly build
- HDF5 Applications from the HDF5 Examples package using the CMake tools.
- Users can adapt these instructions for their own applications, see the
- "Minimum Project Files" section.
+Notes: This short instruction is written for users who want to quickly
+ build HDF5 applications using the CMake tools. Users can adapt
+ these instructions for their own applications. For more information,
+ see the "Minimum C Project Files for CMake" section.
- More information about using CMake can be found at the KitWare site,
- www.cmake.org.
+ More information about using CMake can be found at the KitWare
+ site, www.cmake.org.
- CMake uses the command line, however the visual CMake tool is
+ CMake uses the command line; however, the visual CMake tool is
available for the configuration step. The steps are similar for
- all the operating systems supported by CMake.
+ all of the operating systems supported by CMake.
NOTES:
- 1. Using CMake for building and using HDF5 is under active development.
- While we have attempted to provide error-free files, please
- understand that development with CMake has not been extensively
- tested outside of HDF. The CMake specific files may change
- before the next release.
+ 1. Using CMake for building and using HDF5 is under active
+ development. While we have attempted to provide error-free
+ files, please understand that development with CMake has not
+ been extensively tested outside of HDF. The CMake specific
+ files may change before the next release.
- 2. CMake was originally introduced to support development on Windows,
- however it should be usable on any system where CMake is supported.
- Please send us any comments on how CMake support can be improved on
- any system. Visit the KitWare site for more information about CMake.
-
- 3. HDF5 library build and test results can be submitted to our CDash server at:
- cdash.hdfgroup.uiuc.edu.
- Please read the HDF and CDash document at:
- www.hdfgroup.org/CDash/HowToSubmit.
-
- 4. See the appendix at the bottom of this file for an example of using
- a ctest script for building and testing. See CMake.txt for more
- information.
+ 2. CMake for HDF5 development should be usable on any system
+ where CMake is supported. Please send us any comments on how
+ CMake support can be improved on any system.
+ 3. See the appendix at the bottom of this file for an example
+ of using a ctest script for building and testing. See
+ CMake.txt for more information.
+
+
========================================================================
- Preconditions
-========================================================================
+I. Preconditions
+========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires CMake version 2.8.10 (minimum).
-
- 2. You have installed the HDF5 library built with CMake, by executing the
- HDF Install Utility (The *.exe file in the binary package for Windows).
- If you are using a Windows platform, you can obtain a pre-built Windows
- binary from The HDF Group's website at www.hdfgroup.org.
-
- 3. On Windows with Visual Studio, if you have installed the static HDF5
- library, you will need to add the HDF5\lib folder to the library
- search list. See the "Using Static Libraries with Visual Studio" section.
-
- 4. Set the environment variable HDF5_ROOT to the installed location of HDF5.
- On Windows HDF5_ROOT=C:\Program Files\HDF Group\HDF5\hdf5-1.8.x
- (Note there are no quote characters used on windows)
+ web site. The HDF5 1.8.x product requires a minimum CMake version
+ of 2.8.10.
+ 2. You have installed the HDF5 library built with CMake, by executing
+ the HDF Install Utility (the *.exe file in the binary package for
+ Windows). If you are using a Windows platform, you can obtain a
+ pre-built Windows binary from The HDF Group's website at
+ www.hdfgroup.org.
+
+ 3. Set the environment variable HDF5_DIR to the installed location of
+ the config files for HDF5. On Windows:
+ HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.8.x/cmake/hdf5
+
+ (Note there are no quote characters used on Windows and all platforms
+ use forward slashes)
+
+ 4. Created separate source and build directories.
+ (CMake commands are executed in the build directory)
+
+ 5. Created a CMakeLists.txt file(s) for your source. See Section III
+ below.
+
+
+
========================================================================
- Building HDF5 Applications with CMake
+II. Building HDF5 Applications with CMake
========================================================================
+Go through these steps to build HDF5 applications with CMake.
+
+ 1. Run CMake
+ 2. Configure the cache settings
+ 3. Build HDF5 Applications
+ 4. Test HDF5 Applications.
+
+These steps are described in more detail below.
+
+
+
1. Run CMake
The CMake executable is named "cmake-gui.exe" on Windows and should be
available in your Start menu. For Linux, UNIX, and Mac users the
executable is named "cmake-gui" and can be found where CMake was
installed.
- Specify the source and build directories. It is recommended that you
- choose a build directory different then the source directory
- (for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then
- use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5).
+
+ Specify the source and build directories. Make the build and source
+ directories different. For example on Windows, if the source is at
+ c:\MyHDFstuff\hdf5, then use c:\MyHDFstuff\hdf5\build or
+ c:\MyHDFstuff\build\hdf5 for the build directory.
OPTIONAL:
- Users can perform the configuration step without using the visual cmake-gui
- program. Example configuration step executed within the build directory:
+ Users can perform the configuration step without using the visual
+ cmake-gui program. The following is an example command line
+ configuration step executed within the build directory:
cmake -G "<generator>" [-D<options>] <sourcepath>
@@ -83,6 +100,8 @@ Notes: This short instruction is written for users who want to quickly build
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
+ * Visual Studio 11
+ * Visual Studio 11 Win64
* Visual Studio 10
* Visual Studio 10 Win64
* Visual Studio 6
@@ -127,7 +146,7 @@ Notes: This short instruction is written for users who want to quickly build
or the command line. The command line is normally used on linux, Unix, and Mac.
To build from the command line, navigate to your build directory and
- execute the following;
+ execute the following:
cmake --build . --config {Debug | Release}
@@ -139,9 +158,9 @@ Notes: This short instruction is written for users who want to quickly build
file in your build directory. Be sure to select either Debug or
Release and build the solution.
- 4. Test HDF5 Applications.
+ 4. Test HDF5 Applications
- To test the build, navigate to your build directory and execute;
+ To test the build, navigate to your build directory and execute:
ctest . -C {Debug | Release}
@@ -149,95 +168,74 @@ Notes: This short instruction is written for users who want to quickly build
recommend choosing either Debug or Release to match the build
step on Windows.
- 6. The files that support building with CMake are all the files in the
+ 5. The files that support building with CMake are all of the files in the
config/cmake folder, the CMakeLists.txt files in each source folder, and
CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
- performed by The HDF Group. It should be altered for the users
- installation and needs.
+ performed by The HDF Group. It should be altered for the user's
+ installation and needs. The cacheinit.cmake file settings are used by
+ The HDF Group for daily testing. It should be altered/ignored for the user's
+ installation and needs.
+
+
- 7. More information about using CMake can be found at the KitWare site,
- www.cmake.org.
-
-
========================================================================
- Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
+III. Minimum C Project Files for CMake
========================================================================
- 8. Set up path for external libraries and headers
-
- Invoke Microsoft Visual Studio and go to "Tools" and select "Options",
- find "Projects", and then "VC++ Directories".
-
- 8.1 If you are building on 64-bit Windows, find the "Platform" dropdown
- and select "x64".
+ 6. Create a CMakeLists.txt file at the source root. Include the
+ following text in the file:
- 8.2 Find the box "Show directories for", choose "Include files", add the
- header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\include)
- to the included directories.
+##########################################################
+cmake_minimum_required (VERSION 2.8.10)
+PROJECT (HDF5MyApp C CXX)
- 8.3 Find the box "Show directories for", choose "Library files", add the
- library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\lib)
- to the library directories.
-
- 8.4 If using Fortran libraries, you will also need to setup the path
- for the Intel Fortran compiler.
+FIND_PACKAGE (HDF5 NAMES hdf5)
+# FIND_PACKAGE (HDF5) # Find non-cmake built HDF5
+INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
+SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
-
-========================================================================
- Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010
-========================================================================
+SET (example hdf_example)
- 9. Set up path for external libraries and headers
+ADD_EXECUTABLE (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
+TARGET_LINK_LIBRARIES (${example} ${LINK_LIBS})
- The path settings will need to be in project property sheets per project.
- Go to "Project" and select "Properties", find "Configuration Properties",
- and then "VC++ Directories".
-
- 9.1 If you are building on 64-bit Windows, find the "Platform" dropdown
- and select "x64".
-
- 9.2 Add the header path to the "Include Directories" setting.
-
- 9.3 Add the library path to the "Library Directories" setting.
+ENABLE_TESTING ()
+INCLUDE (CTest)
-
-========================================================================
- Minimum C Project Files for CMake
-========================================================================
+ADD_TEST (NAME test_example COMMAND ${example})
+##########################################################
- 10. Create a CMakeLists.txt file at the source root.
-..........................................................................
-cmake_minimum_required (VERSION 2.8.10)
-PROJECT (HDF5MyApp C CXX)
-FIND_PACKAGE (HDF5 REQURIED)
-INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS})
-SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
-ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c)
-TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS})
-..........................................................................
+========================================================================
+IV. APPENDIX
+========================================================================
+Below is an example of the ctest script used by The HDF Group. See the
+Appendix in the INSTALL_CMake.txt file for the CTestScript.cmake file used
+by this script. Adjust the values as necessary. Note that the source folder
+is entered on the command line and the build folder is created as a sub-folder.
+Windows should adjust the forward slash to double backslashes, except for
+the HDF_DIR environment variable.
-************************************************************************
- APPENDIX
-Below ia an example of the ctest script used by The HDF Group. See the
-Appendix in the CMake.txt file for the CTestScript.cmake file used by this
-script.
-************************************************************************
-Product specific script, HDF518Example.cmake, that uses the
-CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
-"ctest -S HDF518Example.cmake,hdf518Examples -C Release -O hdf518EX.log"
-where hdf518Examples is the source folder relative to the location of these scripts
+========================================================================
+ctest
========================================================================
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+############################################################################
+# Product specific script, HDF518Example.cmake, that uses the
+# CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
+# "ctest -S HDF518Example.cmake,hdf518Examples -C Release -O hdf518EX.log"
+# where hdf518Examples is the source folder relative to the location of these scripts
+############################################################################
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
set(CTEST_BUILD_CONFIGURATION "Release")
@@ -254,6 +252,10 @@ set(SITE_OS_BITS "os size")
set(SITE_COMPILER_NAME "compiler name")
set(SITE_COMPILER_VERSION "compiler version")
+# skip submit to cdash
+set(LOCAL_NO_SUBMIT "True")
+# skip update source from repository
+set(LOCAL_SKIP_UPDATE "True")
# needed for source updates, change as required
set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/1_8")
@@ -266,7 +268,12 @@ set(ENV{HDF5_DIR} "/usr/share/cmake/hdf5")
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
message("DONE")
+#################################################################################
+
-Need further assistance, send email to help@hdfgroup.org
+========================================================================
+For further assistance, send email to help@hdfgroup.org
+========================================================================
+
diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt
new file mode 100644
index 0000000..bd928bc
--- /dev/null
+++ b/release_docs/USING_HDF5_VS.txt
@@ -0,0 +1,88 @@
+
+***********************************************************************
+* HDF5 Build and Install Suggestions for Windows and Visual Studio *
+* (Full Version) *
+***********************************************************************
+
+These suggestions are for Visual Studio users.
+
+Instructions for building and testing HDF5 applications using CMake can
+be found in the USING_CMake.txt file found in this folder.
+
+The following two sections are helpful if you do not use CMake to build
+your applications.
+
+========================================================================
+Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010
+========================================================================
+
+ 1. Set up path for external libraries and headers
+
+ The path settings will need to be in project property sheets per project.
+ Go to "Project" and select "Properties", find "Configuration Properties",
+ and then "VC++ Directories".
+
+ 1.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
+
+ 1.2 Add the header path to the "Include Directories" setting.
+
+ 1.3 Add the library path to the "Library Directories" setting.
+
+ 1.4 Select Linker->Input and beginning with the
+ "Additional Dependencies" line, enter the library names. The
+ external libraries should be listed first, followed by the HDF5
+ library, and then optionally the HDF5 High Level, Fortran or C++
+ libraries. For example, to compile a C++ application, enter:
+
+ szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib
+
+
+==========================================================================
+Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
+==========================================================================
+
+ 2. Set up path for external libraries and headers
+
+ Invoke Microsoft Visual Studio and go to "Tools" and select "Options",
+ find "Projects", and then "VC++ Directories".
+
+ 2.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
+
+ 2.2 Find the box "Show directories for", choose "Include files", add the
+ header path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\include)
+ to the included directories.
+
+ 2.3 Find the box "Show directories for", choose "Library files", add the
+ library path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\lib)
+ to the library directories.
+
+ 2.4 If using Fortran libraries, you will also need to setup the path
+ for the Intel Fortran compiler.
+
+ 2.5 Select Project->Properties->Linker->Input and beginning with the
+ "Additional Dependencies" line, enter the library names. The
+ external libraries should be listed first, followed by the HDF5
+ library, and then optionally the HDF5 High Level, Fortran or C++
+ libraries. For example, to compile a C++ application, enter:
+
+ szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib
+
+========================================================================
+3. Helpful Pointers
+========================================================================
+
+ 3.1 FAQ
+
+ Many other common questions and hints are located online and being updated
+ in the HDF5 FAQ. For Windows-specific questions, please see:
+
+ http://www.hdfgroup.org/windows/faq.html
+
+ For all other general questions, you can look in the general FAQ:
+
+ http://hdfgroup.org/HDF5-FAQ.html
+
+************************************************************************
+ Please send email to help@hdfgroup.org for further assistance.
diff --git a/release_docs/USING_Windows.txt b/release_docs/USING_Windows.txt
deleted file mode 100644
index 97ac4ad..0000000
--- a/release_docs/USING_Windows.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-
-***********************************************************************
-* HDF5 Build and Install Instructions for Windows *
-* (Full Version) *
-***********************************************************************
-
-We now recommend that users build, test and install HDF5 using CMake.
-
-Instructions for building and testing HDF5 applications using CMake can be found in
-the USING_CMake.txt file found in this folder.
-
-
-========================================================================
- Section VI: Misc.
-========================================================================
-
-1. Helpful Pointers
-
-Here are some helpful notes if you are not familiar with
-using the Visual C++ Development Environment.
-
- 1.1 FAQ
-
- Many other common questions and hints are located online and being updated
- in the HDF5 FAQ. For Windows-specific questions, please see:
-
- http://www.hdfgroup.org/windows/faq.html
-
- For all other general questions, you can look in the general FAQ:
-
- http://hdfgroup.org/HDF5-FAQ.html
-
-
-************************************************************************
- Please send email to help@hdfgroup.org for further assistance.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3048484..d04197e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -478,6 +478,15 @@ SET (H5P_HDRS
)
IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" )
+SET (H5PL_SRCS
+ ${HDF5_SRC_DIR}/H5PL.c
+)
+
+SET (H5PL_HDRS
+ ${HDF5_SRC_DIR}/H5PLextern.h
+)
+IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" )
+
SET (H5R_SRCS
${HDF5_SRC_DIR}/H5R.c
@@ -674,6 +683,7 @@ SET (common_SRCS
${H5MP_SRCS}
${H5O_SRCS}
${H5P_SRCS}
+ ${H5PL_SRCS}
${H5R_SRCS}
${H5RC_SRCS}
${H5RS_SRCS}
@@ -714,6 +724,7 @@ SET (H5_PUBLIC_HEADERS
${H5MP_HDRS}
${H5O_HDRS}
${H5P_HDRS}
+ ${H5PL_HDRS}
${H5R_HDRS}
${H5S_HDRS}
${H5SM_HDRS}
@@ -753,6 +764,7 @@ SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5MPprivate.h
${HDF5_SRC_DIR}/H5Oprivate.h
${HDF5_SRC_DIR}/H5Pprivate.h
+ ${HDF5_SRC_DIR}/H5PLprivate.h
${HDF5_SRC_DIR}/H5RCprivate.h
${HDF5_SRC_DIR}/H5Rprivate.h
${HDF5_SRC_DIR}/H5RSprivate.h
@@ -840,6 +852,9 @@ SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
ADD_LIBRARY (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} ${LINK_LIBS})
+IF (NOT WIN32)
+ TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} dl)
+ENDIF (NOT WIN32)
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
diff --git a/src/H5.c b/src/H5.c
index 8c0be08..88dd17f 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -273,6 +273,7 @@ H5_term_library(void)
pending += DOWN(Z);
pending += DOWN(FD);
pending += DOWN(P);
+ pending += DOWN(PL);
/* Don't shut down the error code until other APIs which use it are shut down */
if(pending == 0)
pending += DOWN(E);
diff --git a/src/H5AC.c b/src/H5AC.c
index db8446a..a26fae1 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -259,6 +259,7 @@ H5AC_init_interface(void)
H5P_genclass_t *xfer_pclass; /* Dataset transfer property list class object */
H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
unsigned block_before_meta_write; /* "block before meta write" property value */
+ unsigned coll_meta_write; /* "collective metadata write" property value */
unsigned library_internal=1; /* "library internal" property value */
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
herr_t ret_value=SUCCEED; /* Return value */
@@ -272,6 +273,7 @@ H5AC_init_interface(void)
if (NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list class")
+
/* Get an ID for the blocking, collective H5AC dxpl */
if ((H5AC_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
@@ -291,10 +293,12 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_COLLECTIVE;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 1;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+
/* Get an ID for the non-blocking, collective H5AC dxpl */
if ((H5AC_noblock_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
@@ -315,10 +319,12 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_COLLECTIVE;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 1;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+
/* Get an ID for the non-blocking, independent H5AC dxpl */
if ((H5AC_ind_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
@@ -339,10 +345,11 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_INDEPENDENT;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 0;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 17ce310..cc669a7 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -199,6 +199,11 @@ typedef H5C_t H5AC_t;
#define H5AC_BLOCK_BEFORE_META_WRITE_SIZE sizeof(unsigned)
#define H5AC_BLOCK_BEFORE_META_WRITE_DEF 0
+/* Definitions for "collective metadata write" property */
+#define H5AC_COLLECTIVE_META_WRITE_NAME "H5AC_collective_metadata_write"
+#define H5AC_COLLECTIVE_META_WRITE_SIZE sizeof(unsigned)
+#define H5AC_COLLECTIVE_META_WRITE_DEF 0
+
/* Definitions for "library internal" property */
#define H5AC_LIBRARY_INTERNAL_NAME "H5AC_library_internal"
#define H5AC_LIBRARY_INTERNAL_SIZE sizeof(unsigned)
diff --git a/src/H5C.c b/src/H5C.c
index c229a46..fa385fa 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -75,6 +75,9 @@
#include "H5private.h" /* Generic Functions */
+#ifdef H5_HAVE_PARALLEL
+#include "H5ACprivate.h" /* Metadata cache */
+#endif /* H5_HAVE_PARALLEL */
#include "H5Cpkg.h" /* Cache */
#include "H5Dprivate.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
@@ -8277,37 +8280,27 @@ H5C_flush_single_entry(H5F_t * f,
#ifdef H5_HAVE_PARALLEL
#ifndef NDEBUG
-
/* If MPI based VFD is used, do special parallel I/O sanity checks.
* Note that we only do these sanity checks when the clear_only flag
* is not set, and the entry to be flushed is dirty. Don't bother
* otherwise as no file I/O can result.
*/
- if ( ( ! clear_only ) &&
- ( entry_ptr->is_dirty ) &&
- (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI) ) ) {
-
- H5P_genplist_t *dxpl; /* Dataset transfer property list */
- H5FD_mpio_xfer_t xfer_mode; /* I/O xfer mode property value */
+ if(!clear_only && entry_ptr->is_dirty &&
+ H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ H5P_genplist_t *dxpl; /* Dataset transfer property list */
+ unsigned coll_meta; /* Collective metadata write flag */
/* Get the dataset transfer property list */
- if ( NULL == (dxpl = H5I_object(primary_dxpl_id)) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, \
- "not a dataset transfer property list")
- }
+ if(NULL == (dxpl = H5I_object(primary_dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
- /* Get the transfer mode property */
- if( H5P_get(dxpl, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0 ) {
-
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, \
- "can't retrieve xfer mode")
- }
-
- /* Sanity check transfer mode */
- HDassert( xfer_mode == H5FD_MPIO_COLLECTIVE );
- }
+ /* Get the collective metadata write property */
+ if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode")
+ /* Sanity check collective metadata write flag */
+ HDassert(coll_meta);
+ } /* end if */
#endif /* NDEBUG */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5D.c b/src/H5D.c
index 399e67c..6c34bec 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -569,7 +569,7 @@ H5Dget_create_plist(hid_t dset_id)
{
H5VL_t *vol_plugin;
void *dset;
- hid_t ret_value = FAIL; /* Return value */
+ hid_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dset_id);
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 497846b..31e3179 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1709,8 +1709,9 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_
/* If the fill value needs to be written then we will need
* to use the cache to write the fill value */
if(fill->fill_time == H5D_FILL_TIME_ALLOC ||
- (fill->fill_time == H5D_FILL_TIME_IFSET
- && fill_status == H5D_FILL_VALUE_USER_DEFINED))
+ (fill->fill_time == H5D_FILL_TIME_IFSET &&
+ (fill_status == H5D_FILL_VALUE_USER_DEFINED ||
+ fill_status == H5D_FILL_VALUE_DEFAULT)))
ret_value = TRUE;
else
ret_value = FALSE;
@@ -1796,7 +1797,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
* but they aren't set, set the flag to skip missing chunks.
*/
if(fill->fill_time == H5D_FILL_TIME_NEVER ||
- (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status != H5D_FILL_VALUE_USER_DEFINED))
+ (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status != H5D_FILL_VALUE_USER_DEFINED &&
+ fill_status != H5D_FILL_VALUE_DEFAULT))
skip_missing_chunks = TRUE;
}
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 402ff8d..ee7cc83 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -2464,15 +2464,16 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D_get_create_plist
*
- * Purpose: Returns a copy of the dataset creation property list.
+ * Purpose: Private function for H5Dget_create_plist
*
* Return: Success: ID for a copy of the dataset creation
- * property list.
+ * property list. The template should be
+ * released by calling H5P_close().
*
* Failure: FAIL
*
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Programmer: Robb Matzke
+ * Tuesday, February 3, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2482,19 +2483,19 @@ H5D_get_create_plist(H5D_t *dset)
H5P_genplist_t *dcpl_plist; /* Dataset's DCPL */
H5P_genplist_t *new_plist; /* Copy of dataset's DCPL */
H5O_fill_t copied_fill; /* Fill value to tweak */
- hid_t new_id = FAIL;
- hid_t ret_value = FAIL;
+ hid_t new_dcpl_id = FAIL;
+ hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (dcpl_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Copy the creation property list */
- if((new_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0)
+ if((new_dcpl_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_id)))
+ if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
@@ -2565,14 +2566,13 @@ H5D_get_create_plist(H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property list fill value")
/* Set the return value */
- ret_value = new_id;
+ ret_value = new_dcpl_id;
done:
- if(ret_value < 0) {
- if(new_id > 0)
- if(H5I_dec_app_ref(new_id) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't free")
- } /* end if */
+ if(ret_value < 0)
+ if(new_dcpl_id > 0)
+ if(H5I_dec_app_ref(new_dcpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_create_plist() */
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 8baafe9..fe26137 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -171,8 +171,8 @@ H5_DLL H5O_loc_t *H5D_oloc(H5D_t *dataset);
H5_DLL H5G_name_t *H5D_nameof(H5D_t *dataset);
H5_DLL H5T_t *H5D_typeof(const H5D_t *dset);
H5_DLL herr_t H5D_flush(const H5F_t *f, hid_t dxpl_id);
-H5_DLL hid_t H5D_get_access_plist(H5D_t *dset);
H5_DLL hid_t H5D_get_create_plist(H5D_t *dset);
+H5_DLL hid_t H5D_get_access_plist(H5D_t *dset);
H5_DLL hid_t H5D_get_space(H5D_t *dset);
H5_DLL hid_t H5D_get_type(H5D_t *dset);
diff --git a/src/H5Edefin.h b/src/H5Edefin.h
index 51a1f66..a2ee0be5 100644
--- a/src/H5Edefin.h
+++ b/src/H5Edefin.h
@@ -25,6 +25,7 @@ hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
hid_t H5E_FILE_g = FAIL; /* File accessibilty */
hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
hid_t H5E_SYM_g = FAIL; /* Symbol table */
+hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */
hid_t H5E_VOL_g = FAIL; /* Virtual Object Layer */
hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */
@@ -132,6 +133,9 @@ hid_t H5E_PATH_g = FAIL; /* Problem with path to object */
/* No error */
hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
+/* Plugin errors */
+hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
+
/* File accessibilty errors */
hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
diff --git a/src/H5Einit.h b/src/H5Einit.h
index d62d6aa..6ab28bb 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.h
@@ -44,6 +44,11 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_PLUGIN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_VFL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
@@ -482,6 +487,13 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+/* Plugin errors */
+assert(H5E_OPENERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+
/* File accessibilty errors */
assert(H5E_FILEEXISTS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL)
diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h
index eef9b2c..ab2d885 100644
--- a/src/H5Epubgen.h
+++ b/src/H5Epubgen.h
@@ -28,6 +28,7 @@
#define H5E_FILE (H5OPEN H5E_FILE_g)
#define H5E_SOHM (H5OPEN H5E_SOHM_g)
#define H5E_SYM (H5OPEN H5E_SYM_g)
+#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g)
#define H5E_VFL (H5OPEN H5E_VFL_g)
#define H5E_VOL (H5OPEN H5E_VOL_g)
#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g)
@@ -61,6 +62,7 @@ H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */
H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */
H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */
+H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */
H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */
H5_DLLVAR hid_t H5E_VOL_g; /* Virtual Object Layer */
H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */
@@ -223,6 +225,10 @@ H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */
#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g)
H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */
+/* Plugin errors */
+#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g)
+H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */
+
/* File accessibilty errors */
#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g)
#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g)
diff --git a/src/H5Eterm.h b/src/H5Eterm.h
index ae1eb95..eda59c5 100644
--- a/src/H5Eterm.h
+++ b/src/H5Eterm.h
@@ -26,6 +26,7 @@ H5E_FUNC_g=
H5E_FILE_g=
H5E_SOHM_g=
H5E_SYM_g=
+H5E_PLUGIN_g=
H5E_VFL_g=
H5E_VOL_g=
H5E_INTERNAL_g=
@@ -134,6 +135,9 @@ H5E_PATH_g=
/* No error */
H5E_NONE_MINOR_g=
+/* Plugin errors */
+H5E_OPENERROR_g=
+
/* File accessibilty errors */
H5E_FILEEXISTS_g=
H5E_FILEOPEN_g=
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 9d6e065..a3ce7f8 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -73,10 +73,6 @@
#define END_MEMBERS }}
-
-#define H5FD_MULTI_DXPL_PROP_NAME "H5FD_MULTI_DXPL"
-#define H5FD_MULTI_DXPL_PROP_SIZE sizeof(H5FD_multi_dxpl_t)
-
#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
/* The driver identification number, initialized at runtime */
@@ -1792,18 +1788,6 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- /* Get the data transfer properties */
- if(H5P_FILE_ACCESS_DEFAULT != dxpl_id) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Get the DXPL value, if it exists */
- if(prop_exists)
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
- } /* end if */
-
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
mmt = file->fa.memb_map[mt];
@@ -1856,18 +1840,6 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- /* Get the data transfer properties */
- if(H5P_FILE_ACCESS_DEFAULT != dxpl_id) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Get the DXPL value, if it exists */
- if(prop_exists)
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
- } /* end if */
-
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
mmt = file->fa.memb_map[mt];
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 3eb374c..2d305a2 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -1188,15 +1188,16 @@ done:
/*-------------------------------------------------------------------------
* Function: H5G_get_create_plist
*
- * Purpose: Returns a copy of the group creation property list.
+ * Purpose: Private function for H5Gget_create_plist
*
* Return: Success: ID for a copy of the group creation
- * property list.
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
* Failure: FAIL
*
- * Programmer: Mohamad Chaarawi
- * March, 2012
+ * Programmer: Quincey Koziol
+ * Tuesday, October 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -1209,17 +1210,17 @@ H5G_get_create_plist(H5G_t *grp)
htri_t pline_exists;
H5P_genplist_t *gcpl_plist;
H5P_genplist_t *new_plist;
- hid_t new_id = FAIL;
- hid_t ret_value = FAIL;
+ hid_t new_gcpl_id = FAIL;
+ hid_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI(FAIL)
/* Copy the default group creation property list */
if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default group creation property list")
- if((new_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default group creation property list")
+ if((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to copy the creation property list")
- if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_id)))
+ if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
@@ -1228,7 +1229,7 @@ H5G_get_create_plist(H5G_t *grp)
/* Check for the group having a group info message */
if((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(ginfo_exists) {
H5O_ginfo_t ginfo; /* Group info message */
@@ -1243,7 +1244,7 @@ H5G_get_create_plist(H5G_t *grp)
/* Check for the group having a link info message */
if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(linfo_exists) {
/* Set the link info for the property list */
if(H5P_set(new_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
@@ -1266,12 +1267,12 @@ H5G_get_create_plist(H5G_t *grp)
} /* end if */
/* Set the return value */
- ret_value = new_id;
+ ret_value = new_gcpl_id;
done:
if(ret_value < 0) {
- if(new_id > 0)
- if(H5I_dec_app_ref(new_id) < 0)
+ if(new_gcpl_id > 0)
+ if(H5I_dec_app_ref(new_gcpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't free")
} /* end if */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 328ef93..e159695 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -244,6 +244,7 @@ H5_DLL herr_t H5G_obj_remove_by_idx(const struct H5O_loc_t *grp_oloc, H5RS_str_t
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
H5_DLL herr_t H5G_obj_lookup_by_idx(const struct H5O_loc_t *grp_oloc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, struct H5O_link_t *lnk, hid_t dxpl_id);
+H5_DLL hid_t H5G_get_create_plist(H5G_t *grp);
/*
* These functions operate on symbol table nodes.
diff --git a/src/H5PL.c b/src/H5PL.c
new file mode 100644
index 0000000..07e90af
--- /dev/null
+++ b/src/H5PL.c
@@ -0,0 +1,661 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/****************/
+/* Module Setup */
+/****************/
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5PL__init_interface
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5PLprivate.h" /* Plugin */
+#include "H5Zprivate.h" /* Filter pipeline */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+#define H5PL_MAX_PATH_NUM 16
+
+/****************************/
+/* Macros for supporting
+ * both Windows and Unix */
+/****************************/
+/* Windows support */
+#ifdef H5_HAVE_WIN32_API
+
+#define H5PL_DEFAULT_PATH "%ALLUSERSPROFILE%/hdf5/lib/plugin"
+#define H5PL_PATH_SEPARATOR ";"
+
+/* Handle for dynamic library */
+#define H5PL_HANDLE HINSTANCE
+
+/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
+#define H5PL_OPEN_DLIB(S) LoadLibraryEx(TEXT(S), NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
+
+/* Get the address of a symbol in dynamic library */
+#define H5PL_GET_LIB_FUNC(H,N) GetProcAddress(H,N)
+
+/* Close dynamic library */
+#define H5PL_CLOSE_LIB(H) FreeLibrary(H)
+
+/* Clear error - nothing to do */
+#define H5PL_CLR_ERROR
+
+typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
+
+/* Unix support */
+#else /* H5_HAVE_WIN32_API */
+
+#define H5PL_DEFAULT_PATH "/usr/local/hdf5/lib/plugin"
+#define H5PL_PATH_SEPARATOR ":"
+
+/* Handle for dynamic library */
+#define H5PL_HANDLE void *
+
+/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
+#define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_NOW)
+
+/* Get the address of a symbol in dynamic library */
+#define H5PL_GET_LIB_FUNC(H,N) dlsym(H,N)
+
+/* Close dynamic library */
+#define H5PL_CLOSE_LIB(H) dlclose(H)
+
+/* Clear error */
+#define H5PL_CLR_ERROR dlerror()
+
+typedef const void *(*H5PL_get_plugin_info_t)(void);
+#endif /* H5_HAVE_WIN32_API */
+
+/* Special symbol to indicate no plugin loading */
+#define H5PL_NO_PLUGIN "::"
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/* Type for the list of info for opened plugin libraries */
+typedef struct H5PL_table_t {
+ H5PL_type_t pl_type; /* plugin type */
+ int pl_id; /* ID for the plugin */
+ H5PL_HANDLE handle; /* plugin handle */
+} H5PL_table_t;
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+static herr_t H5PL__init_path_table(void);
+static htri_t H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info);
+static htri_t H5PL__open(H5PL_type_t pl_type, char *libname, int plugin_id, const void **pl_info);
+static htri_t H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info);
+static herr_t H5PL__close(H5PL_HANDLE handle);
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+/* Table for opened plugin libraries */
+static size_t H5PL_table_alloc_g = 0;
+static size_t H5PL_table_used_g = 0;
+static H5PL_table_t *H5PL_table_g = NULL;
+
+/* Table of location paths for plugin libraries */
+static char *H5PL_path_table_g[H5PL_MAX_PATH_NUM];
+static size_t H5PL_num_paths_g = 0;
+static hbool_t H5PL_path_found_g = FALSE;
+
+/* Whether to preload pathnames for plugin libraries */
+static hbool_t H5PL_no_plugin_g = FALSE;
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5PL__init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5PL__init_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines.
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5PL__init_interface(void)
+{
+ char *preload_path;
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Retrieve pathnames from HDF5_PLUGIN_PRELOAD if the user sets it
+ * to tell the library to load plugin libraries without search.
+ */
+ if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) {
+ /* Special symbal "::" means no plugin during data reading. */
+ if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
+ H5PL_no_plugin_g = TRUE;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5PL__init_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_no_plugin
+ *
+ * Purpose: Quick way for filter module to query whether to load plugin
+ *
+ * Return: TRUE: No plugin loading during data reading
+ *
+ * FALSE: Load plugin during data reading
+ *
+ * Programmer: Raymond Lu
+ * 20 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5PL_no_plugin(void)
+{
+ htri_t ret_value;
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ ret_value = (htri_t)H5PL_no_plugin_g;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL_no_plugin() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_term_interface
+ *
+ * Purpose: Terminate the H5PL interface: release all memory, reset all
+ * global variables to initial values. This only happens if all
+ * types have been destroyed from other interfaces.
+ *
+ * Return: Success: Positive if any action was taken that might
+ * affect some other interface; zero otherwise.
+ *
+ * Failure: Negative.
+ *
+ * Programmer: Raymond Lu
+ * 20 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5PL_term_interface(void)
+{
+ int i = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ if(H5_interface_initialize_g) {
+ size_t u; /* Local index variable */
+
+ /* Close opened dynamic libraries */
+ for(u = 0; u < H5PL_table_used_g; u++)
+ H5PL__close((H5PL_table_g[u]).handle);
+
+ /* Free the table of dynamic libraries */
+ H5PL_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_table_g);
+ H5PL_table_used_g = H5PL_table_alloc_g = 0;
+
+ /* Free the table of search paths */
+ for(u = 0; u < H5PL_num_paths_g; u++)
+ if(H5PL_path_table_g[u])
+ H5PL_path_table_g[u] = (char *)H5MM_xfree(H5PL_path_table_g[u]);
+ H5PL_num_paths_g = 0;
+ H5PL_path_found_g = FALSE;
+
+ H5_interface_initialize_g = 0;
+ i = 1;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(i)
+} /* end H5PL_term_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_load
+ *
+ * Purpose: Given the plugin type and identifier, this function searches
+ * and/or loads a dynamic plugin library first among the already
+ * opened libraries then in the designated location paths.
+ *
+ * Return: Non-NULL on success/NULL on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+const void *
+H5PL_load(H5PL_type_t type, int id)
+{
+ htri_t found; /* Whether the plugin was found */
+ const void *plugin_info = NULL;
+ const void *ret_value = NULL;
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* Initialize the location paths for dynamic libraries, if they aren't
+ * already set up.
+ */
+ if(FALSE == H5PL_path_found_g)
+ if(H5PL__init_path_table() < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, NULL, "can't initialize search path table")
+
+ /* Search in the table of already loaded plugin libraries */
+ if((found = H5PL__search_table(type, id, &plugin_info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in table failed")
+
+ /* If not found, iterate through the path table to find the right dynamic library */
+ if(!found) {
+ size_t i; /* Local index variable */
+
+ for(i = 0; i < H5PL_num_paths_g; i++) {
+ if((found = H5PL__find(type, id, H5PL_path_table_g[i], &plugin_info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in paths failed")
+
+ /* Break out if found */
+ if(found) {
+ HDassert(plugin_info);
+ break;
+ } /* end if */
+ } /* end for */
+ } /* end if */
+
+ /* Check if we found the plugin */
+ if(found)
+ ret_value = plugin_info;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL_load() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__init_path_table
+ *
+ * Purpose: Initialize the path table.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 18 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5PL__init_path_table(void)
+{
+ char *dl_path = NULL;
+ char *origin_dl_path;
+ char *dir;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it
+ * or from the default paths if it isn't set.
+ */
+ origin_dl_path = HDgetenv("HDF5_PLUGIN_PATH");
+ if(NULL == origin_dl_path)
+ dl_path = HDstrdup(H5PL_DEFAULT_PATH);
+ else
+ dl_path = HDstrdup(origin_dl_path);
+ if(NULL == dl_path)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+
+ /* Put paths in the path table. They are separated by ":" */
+ dir = HDstrtok(dl_path, H5PL_PATH_SEPARATOR);
+ while(dir) {
+ /* Check for too many directories in path */
+ if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
+ if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = HDstrdup(dir)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ H5PL_num_paths_g++;
+ dir = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
+ } /* end while */
+
+ H5PL_path_found_g = TRUE;
+
+done:
+ if(dl_path)
+ dl_path = (char *)H5MM_xfree(dl_path);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__init_path_table() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__find
+ *
+ * Purpose: Given a path, this function opens the directory and envokes
+ * another function to go through all files to find the right
+ * plugin library. Two function definitions are for Unix and
+ * Windows.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef H5_HAVE_WIN32_API
+static htri_t
+H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
+{
+ char *pathname = NULL;
+ DIR *dirp = NULL;
+ struct dirent *dp;
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Open the directory */
+ if(!(dirp = HDopendir(dir)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
+
+ /* Iterates through all entries in the directory to find the right plugin library */
+ while(NULL != (dp = HDreaddir(dirp))) {
+ /* The library we are looking for should be called libxxx.so... on Unix
+ * or libxxx.xxx.dylib on Mac.
+ */
+ if(!HDstrncmp(dp->d_name, "lib", (size_t)3) &&
+ (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, ".dylib"))) {
+ h5_stat_t my_stat;
+ size_t pathname_len;
+ htri_t found_in_dir;
+
+ /* Allocate & initialize the path name */
+ pathname_len = HDstrlen(dir) + HDstrlen(dp->d_name) + 2;
+ if(NULL == (pathname = (char *)H5MM_malloc(pathname_len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ HDsnprintf(pathname, pathname_len, "%s/%s", dir, dp->d_name);
+
+ /* Get info for directory entry */
+ if(HDstat(pathname, &my_stat) == -1)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't stat file: %s", strerror(errno))
+
+ /* If it is a directory, skip it */
+ if(S_ISDIR(my_stat.st_mode))
+ continue;
+
+ /* Attempt to open the dynamic library as a filter library */
+ if((found_in_dir = H5PL__open(plugin_type, pathname, type_id, info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
+ if(found_in_dir) {
+ /* Indicate success */
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ else
+ HDassert(pathname);
+ pathname = (char *)H5MM_xfree(pathname);
+ } /* end if */
+ } /* end while */
+
+done:
+ if(dirp)
+ if(HDclosedir(dirp) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "can't close directory: %s", strerror(errno))
+ if(pathname)
+ pathname = (char *)H5MM_xfree(pathname);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__find() */
+#else /* H5_HAVE_WIN32_API */
+static htri_t
+H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
+{
+ WIN32_FIND_DATA fdFile;
+ HANDLE hFind;
+ char *pathname = NULL;
+ char service[2048];
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Specify a file mask. *.* = We want everything! */
+ sprintf(service, "%s\/*.dll", dir);
+ if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
+
+ do {
+ /* Find first file will always return "."
+ * and ".." as the first two directories.
+ */
+ if(HDstrcmp(fdFile.cFileName, ".") != 0 && HDstrcmp(fdFile.cFileName, "..") != 0) {
+ size_t pathname_len;
+ htri_t found_in_dir;
+
+ /* Allocate & initialize the path name */
+ pathname_len = HDstrlen(dir) + HDstrlen(fdFile.cFileName) + 2;
+ if(NULL == (pathname = (char *)H5MM_malloc(pathname_len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ HDsnprintf(pathname, pathname_len, "%s\\%s", dir, fdFile.cFileName);
+
+ /* Is the entity a File or Folder? */
+ if(fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ continue;
+
+ if((found_in_dir = H5PL__open(plugin_type, pathname, type_id, info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
+ if(found_in_dir) {
+ /* Indicate success */
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ else
+ HDassert(pathname);
+ pathname = (char *)H5MM_xfree(pathname);
+ } /* end if */
+ } while(FindNextFile(hFind, &fdFile)); /* Find the next file. */
+
+done:
+ if(hFind)
+ FindClose(hFind);
+ if(pathname)
+ pathname = (char *)H5MM_xfree(pathname);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__find() */
+#endif /* H5_HAVE_WIN32_API */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__open
+ *
+ * Purpose: Iterates through all files to find the right plugin library.
+ * It loads the dynamic plugin library and keeps it on the list
+ * of loaded libraries.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static htri_t
+H5PL__open(H5PL_type_t pl_type, char *libname, int pl_id, const void **pl_info)
+{
+ H5PL_HANDLE handle = NULL;
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* There are different reasons why a library can't be open, e.g. wrong architecture.
+ * simply continue if we can't open it.
+ */
+ if(NULL == (handle = H5PL_OPEN_DLIB(libname))) {
+ H5PL_CLR_ERROR; /* clear error */
+ } /* end if */
+ else {
+ H5PL_get_plugin_info_t get_plugin_info = NULL;
+
+ /* Return a handle for the function H5PLget_plugin_info in the dynamic library.
+ * The plugin library is suppose to define this function.
+ */
+ if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC(handle, "H5PLget_plugin_info"))) {
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ } /* end if */
+ else {
+ const H5Z_class2_t *plugin_info;
+
+ /* Invoke H5PLget_plugin_info to verify this is the right library we are looking for.
+ * Move on if it isn't.
+ */
+ if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)())) {
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info")
+ } /* end if */
+
+ /* Successfully found plugin library, check if it's the right one */
+ if(plugin_info->id == pl_id) {
+ /* Expand the table if it is too small */
+ if(H5PL_table_used_g >= H5PL_table_alloc_g) {
+ size_t n = MAX(H5Z_MAX_NFILTERS, 2 * H5PL_table_alloc_g);
+ H5PL_table_t *table = (H5PL_table_t *)H5MM_realloc(H5PL_table_g, n * sizeof(H5PL_table_t));
+
+ if(!table)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend dynamic library table")
+
+ H5PL_table_g = table;
+ H5PL_table_alloc_g = n;
+ } /* end if */
+
+ (H5PL_table_g[H5PL_table_used_g]).handle = handle;
+ (H5PL_table_g[H5PL_table_used_g]).pl_type = pl_type;
+ (H5PL_table_g[H5PL_table_used_g]).pl_id = plugin_info->id;
+ H5PL_table_used_g++;
+
+ /* Set the plugin info to return */
+ *pl_info = (const void *)plugin_info;
+
+ /* Indicate success */
+ ret_value = TRUE;
+ } /* end if */
+ else
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ } /* end if */
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__open() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__search_table
+ *
+ * Purpose: Search in the list of already opened dynamic libraries
+ * to see if the one we are looking for is already opened.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static htri_t
+H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info)
+{
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Search in the table of already opened dynamic libraries */
+ if(H5PL_table_used_g > 0) {
+ size_t i;
+
+ for(i = 0; i < H5PL_table_used_g; i++) {
+ if((plugin_type == (H5PL_table_g[i]).pl_type) && (type_id == (H5PL_table_g[i]).pl_id)) {
+ H5PL_get_plugin_info_t get_plugin_info;
+ const H5Z_class2_t *plugin_info;
+
+ if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_table_g[i]).handle, "H5PLget_plugin_info")))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info")
+
+ if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)()))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get plugin info")
+
+ *info = plugin_info;
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end for */
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__search_table() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__close
+ *
+ * Purpose: Closes the handle for dynamic library
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5PL__close(H5PL_HANDLE handle)
+{
+ FUNC_ENTER_STATIC_NOERR
+
+ H5PL_CLOSE_LIB(handle);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5PL__close() */
+
diff --git a/src/H5PLextern.h b/src/H5PLextern.h
new file mode 100644
index 0000000..943e3aa
--- /dev/null
+++ b/src/H5PLextern.h
@@ -0,0 +1,84 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * 13 February 2013
+ */
+#ifndef _H5PLextern_H
+#define _H5PLextern_H
+
+/* Include HDF5 header */
+#include "hdf5.h"
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
+/* Plugin type */
+typedef enum H5PL_type_t {
+ H5PL_TYPE_ERROR = -1, /*error */
+ H5PL_TYPE_FILTER = 0, /*filter */
+ H5PL_TYPE_NONE = 1 /*this must be last! */
+} H5PL_type_t;
+
+
+#ifdef H5_BUILT_AS_DYNAMIC_LIB
+
+ #if defined (hdf5_EXPORTS)
+ /* hdf5 library imports from plugin */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #else
+ /* plugins always export */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #endif
+
+#elif defined(H5_BUILT_AS_STATIC_LIB)
+ #define H5PLUGIN_DLL
+#else
+
+ #if defined(H5_HAVE_WIN32_API)
+ #if defined(_HDF5DLL_)
+ #pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif defined(_HDF5USEDLL_)
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #endif /* _HDF5DLL_ */
+ #else /*H5_HAVE_WIN32_API*/
+ #define H5PLUGIN_DLL
+ #endif /*H5_HAVE_WIN32_API*/
+
+#endif /* H5_BUILT_AS_xxx_LIB */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5PLUGIN_DLL H5PL_type_t H5PLget_plugin_type(void);
+H5PLUGIN_DLL const void *H5PLget_plugin_info(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H5PLextern_H */
+
diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h
new file mode 100644
index 0000000..b117613
--- /dev/null
+++ b/src/H5PLprivate.h
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * 13 February 2013
+ */
+
+#ifndef _H5PLprivate_H
+#define _H5PLprivate_H
+
+/* Include package's "external" header */
+#include "H5PLextern.h"
+
+/* Private headers needed by this file */
+#include "H5private.h" /* Generic Functions */
+
+
+/**************************/
+/* Library Private Macros */
+/**************************/
+
+
+/****************************/
+/* Library Private Typedefs */
+/****************************/
+
+
+/*****************************/
+/* Library-private Variables */
+/*****************************/
+
+
+/***************************************/
+/* Library-private Function Prototypes */
+/***************************************/
+
+/* Internal API routines */
+H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, int type_id);
+H5_DLL htri_t H5PL_no_plugin(void);
+
+#endif /* _H5PLprivate_H */
+
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index d8ddfee..f80e4e7 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -40,6 +40,8 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
+#include "H5PLprivate.h" /* Dynamic plugin */
+#include "H5Zprivate.h" /* Filter pipeline */
/****************/
@@ -90,6 +92,9 @@ static herr_t H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size
static herr_t H5P__ocrt_pipeline_dec(const void **_pp, void *value);
static int H5P__ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size);
+/* Local routines */
+static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter,
+ unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]);
/*********************/
/* Package Variables */
@@ -747,7 +752,6 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/])
{
H5P_genplist_t *plist; /* Property list */
- H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value=SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
@@ -765,6 +769,74 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ /* Call the private function */
+ if(H5P__set_filter(plist, filter, flags, cd_nelmts, cd_values) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "failed to call private function")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pset_filter() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5P__set_filter
+ *
+ * Purpose: Adds the specified FILTER and corresponding properties to the
+ * end of the data or link output filter pipeline
+ * depending on whether PLIST is a dataset creation or group
+ * creation property list. The FLAGS argument specifies certain
+ * general properties of the filter and is documented below.
+ * The CD_VALUES is an array of CD_NELMTS integers which are
+ * auxiliary data for the filter. The integer vlues will be
+ * stored in the dataset object header as part of the filter
+ * information.
+ *
+ * The FLAGS argument is a bit vector of the following fields:
+ *
+ * H5Z_FLAG_OPTIONAL(0x0001)
+ * If this bit is set then the filter is optional. If the
+ * filter fails during an H5Dwrite() operation then the filter
+ * is just excluded from the pipeline for the chunk for which it
+ * failed; the filter will not participate in the pipeline
+ * during an H5Dread() of the chunk. If this bit is clear and
+ * the filter fails then the entire I/O operation fails.
+ * If this bit is set but encoding is disabled for a filter,
+ * attempting to write will generate an error.
+ *
+ * If the filter is not registered, this function tries to load
+ * it dynamically during run time.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Robb Matzke
+ * Wednesday, April 15, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags,
+ size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/])
+{
+ H5O_pline_t pline; /* Filter pipeline */
+ htri_t filter_avail; /* Filter availability */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if filter is already available */
+ if((filter_avail = H5Z_filter_avail(filter)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't check filter availability")
+
+ /* If filter is not available, try to dynamically load it */
+ if(!filter_avail) {
+ const H5Z_class2_t *filter_info;
+
+ if(NULL == (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)filter)))
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, FAIL, "failed to load dynamically loaded plugin")
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
+ } /* end if */
+
/* Get the pipeline property to append to */
if(H5P_get(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline")
@@ -778,8 +850,8 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline")
done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Pset_filter() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__set_filter() */
/*-------------------------------------------------------------------------
@@ -1105,6 +1177,43 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5P_filter_in_pline
+ *
+ * Purpose: Check whether the filter is in the pipeline of the object
+ * creation property list.
+ *
+ * Return: TRUE: found
+ * FALSE: not found
+ * FAIL: error
+ *
+ * Programmer: Raymond Lu
+ * 26 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id)
+{
+ H5O_pline_t pline; /* Filter pipeline */
+ H5Z_filter_info_t *filter; /* Pointer to filter information */
+ htri_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Get pipeline info */
+ if(H5P_get(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline")
+
+ /* Check if the file is in the pipeline */
+ if((ret_value = H5Z_filter_in_pline(&pline, id)) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTCOMPARE, FAIL, "can't find filter")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P_get_filter_by_id() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Premove_filter
*
* Purpose: Deletes a filter from the dataset creation property list;
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 3835a16..0c3b5aa 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -112,6 +112,7 @@ H5_DLL herr_t H5P_modify_filter(H5P_genplist_t *plist, H5Z_filter_t filter,
H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id,
unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
size_t namelen, char name[], unsigned *filter_config);
+H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id);
/* *SPECIAL* Don't make more of these! -QAK */
H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id);
diff --git a/src/H5Z.c b/src/H5Z.c
index 3bb3a44..5861e0e 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -22,10 +22,12 @@
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Oprivate.h" /* Object headers */
#include "H5Pprivate.h" /* Property lists */
+#include "H5PLprivate.h" /* Plugins */
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5Zpkg.h" /* Data filters */
@@ -44,12 +46,20 @@ typedef struct H5Z_stats_t {
} H5Z_stats_t;
#endif /* H5Z_DEBUG */
+typedef struct H5Z_object_t {
+ H5Z_filter_t filter_id; /* ID of the filter we're looking for */
+ htri_t found; /* Whether we find an object using the filter */
+} H5Z_object_t;
+
/* Enumerated type for dataset creation prelude callbacks */
typedef enum {
H5Z_PRELUDE_CAN_APPLY, /* Call "can apply" callback */
H5Z_PRELUDE_SET_LOCAL /* Call "set local" callback */
} H5Z_prelude_type_t;
+/* Maximal number of the list of opened objects (2^16) */
+#define NUM_OBJS 65536
+
/* Local variables */
static size_t H5Z_table_alloc_g = 0;
static size_t H5Z_table_used_g = 0;
@@ -60,6 +70,8 @@ static H5Z_stats_t *H5Z_stat_table_g = NULL;
/* Local functions */
static int H5Z_find_idx(H5Z_filter_t id);
+static int H5Z_get_object_cb(void *obj_ptr, hid_t obj_id, void *key);
+static int H5Z_get_file_cb(void *obj_ptr, hid_t obj_id, void *key);
/*-------------------------------------------------------------------------
@@ -402,29 +414,52 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Z_unregister (H5Z_filter_t id)
+H5Z_unregister (H5Z_filter_t filter_id)
{
- size_t i; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
+ size_t filter_index; /* Local index variable for filter */
+ H5Z_object_t object;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- assert (id>=0 && id<=H5Z_FILTER_MAX);
+ assert (filter_id>=0 && filter_id<=H5Z_FILTER_MAX);
/* Is the filter already registered? */
- for (i=0; i<H5Z_table_used_g; i++)
- if (H5Z_table_g[i].id==id)
+ for (filter_index=0; filter_index<H5Z_table_used_g; filter_index++)
+ if (H5Z_table_g[filter_index].id==filter_id)
break;
/* Fail if filter not found */
- if (i>=H5Z_table_used_g)
+ if (filter_index>=H5Z_table_used_g)
HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered")
+ /* Initialize the structure object for iteration */
+ object.filter_id = filter_id;
+ object.found = FALSE;
+
+ /* Iterate through all opened datasets, returns a failure if any of them uses the filter */
+ if(H5I_iterate(H5I_DATASET, H5Z_get_object_cb, &object, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed")
+
+ if(object.found)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, "can't unregister filter because a dataset is still using it")
+
+ /* Iterate through all opened groups, returns a failure if any of them uses the filter */
+ if(H5I_iterate(H5I_GROUP, H5Z_get_object_cb, &object, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed")
+
+ if(object.found)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, "can't unregister filter because a group is still using it")
+
+ /* Iterate through all opened files and flush them */
+ if(H5I_iterate(H5I_FILE, H5Z_get_file_cb, NULL, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed")
+
/* Remove filter from table */
/* Don't worry about shrinking table size (for now) */
- HDmemmove(&H5Z_table_g[i],&H5Z_table_g[i+1],sizeof(H5Z_class2_t)*((H5Z_table_used_g-1)-i));
+ HDmemmove(&H5Z_table_g[filter_index],&H5Z_table_g[filter_index+1],sizeof(H5Z_class2_t)*((H5Z_table_used_g-1)-filter_index));
#ifdef H5Z_DEBUG
- HDmemmove(&H5Z_stat_table_g[i],&H5Z_stat_table_g[i+1],sizeof(H5Z_stats_t)*((H5Z_table_used_g-1)-i));
+ HDmemmove(&H5Z_stat_table_g[filter_index],&H5Z_stat_table_g[filter_index+1],sizeof(H5Z_stats_t)*((H5Z_table_used_g-1)-filter_index));
#endif /* H5Z_DEBUG */
H5Z_table_used_g--;
@@ -434,6 +469,111 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Z_get_object_cb
+ *
+ * Purpose: The callback function for H5Z_unregister. It iterates
+ * through all opened objects. If the object is a dataset
+ * or a group and it uses the filter to be unregistered, the
+ * function returns TRUE.
+ *
+ * Return: TRUE if the object uses the filter.
+ * FALSE otherwise.
+ *
+ * Programmer: Raymond Lu
+ * 6 May 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+H5Z_get_object_cb(void *obj_ptr, hid_t obj_id, void *key)
+{
+ H5I_type_t id_type;
+ hid_t ocpl_id;
+ H5P_genplist_t *plist; /* Property list */
+ H5Z_object_t *object = (H5Z_object_t *)key;
+ htri_t filter_in_pline = FALSE;
+ int ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(obj_ptr);
+
+ if((id_type = H5I_get_type(obj_id)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "bad object id");
+
+ switch(id_type) {
+ case H5I_GROUP:
+ if((ocpl_id = H5G_get_create_plist(obj_ptr)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get group creation property list")
+
+ break;
+
+ case H5I_DATASET:
+ if((ocpl_id = H5D_get_create_plist(obj_ptr)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get dataset creation property list")
+
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
+ } /* end switch */
+
+ /* Get the plist structure of object creation */
+ if(NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Check if the object creation property list uses the filter */
+ if((filter_in_pline = H5P_filter_in_pline(plist, object->filter_id)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't check filter in pipeline")
+
+ /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and let
+ * H5Z_unregister return failure */
+ if(filter_in_pline) {
+ object->found = TRUE;
+ ret_value = TRUE;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_object_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_get_file_cb
+ *
+ * Purpose: The callback function for H5Z_unregister. It iterates
+ * through all opened files and flush them.
+ *
+ * Return: FALSE if finishes flushing and moves on
+ * FAIL if there is an error
+ *
+ * Programmer: Raymond Lu
+ * 6 May 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+H5Z_get_file_cb(void *obj_ptr, hid_t obj_id, void *key)
+{
+ int ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(obj_ptr);
+
+ /* Call the flush routine for mounted file hierarchies. Do a global flush
+ * if the file is opened for write */
+ if(H5F_ACC_RDWR & H5F_INTENT((H5F_t *)obj_ptr)) {
+ if(H5F_flush_mounts((H5F_t *)obj_ptr, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_file_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Zfilter_avail
*
* Purpose: Check if a filter is available
@@ -450,7 +590,6 @@ done:
htri_t
H5Zfilter_avail(H5Z_filter_t id)
{
- size_t i; /* Local index variable */
htri_t ret_value=FALSE; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -459,13 +598,9 @@ H5Zfilter_avail(H5Z_filter_t id)
/* Check args */
if(id<0 || id>H5Z_FILTER_MAX)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
-
- /* Is the filter already registered? */
- for(i=0; i<H5Z_table_used_g; i++)
- if(H5Z_table_g[i].id==id) {
- ret_value=TRUE;
- break;
- } /* end if */
+
+ if((ret_value = H5Z_filter_avail(id)) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter")
done:
FUNC_LEAVE_API(ret_value)
@@ -473,6 +608,36 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_avail
+ *
+ * Purpose: Private function to check if a filter is available
+ *
+ * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5Z_filter_avail(H5Z_filter_t id)
+{
+ size_t i; /* Local index variable */
+ htri_t ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Is the filter already registered? */
+ for(i = 0; i < H5Z_table_used_g; i++)
+ if(H5Z_table_g[i].id == id)
+ HGOTO_DONE(TRUE)
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5Z_filter_avail() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Z_prelude_callback
*
* Purpose: Makes a dataset creation "prelude" callback for the "can_apply"
@@ -1088,16 +1253,45 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
failed |= (unsigned)1 << idx;
continue;/*filter excluded*/
}
- if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
- /* Print out the filter name to give more info. But the name is optional for
- * the filter */
- if(pline->filter[idx].name)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered",
- pline->filter[idx].name)
- else
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
- }
+ /* If the filter isn't registered and the application doesn't
+ * indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"),
+ * try to load it dynamically and register it. Otherwise, return failure
+ */
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
+ hbool_t issue_error = FALSE;
+
+ /* Check for "no plugins" indicated" */
+ if(H5PL_no_plugin())
+ issue_error = TRUE;
+ else {
+ const H5Z_class2_t *filter_info;
+
+ /* Try loading the filter */
+ if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) {
+ /* Register the filter we loaded */
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
+
+ /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
+ issue_error = TRUE;
+ } /* end if */
+ else
+ issue_error = TRUE;
+ } /* end else */
+
+ /* Check for error */
+ if(issue_error) {
+ /* Print out the filter name to give more info. But the name is optional for
+ * the filter */
+ if(pline->filter[idx].name)
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name)
+ else
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
+ } /* end if */
+ } /* end if */
+
fclass=&H5Z_table_g[fclass_idx];
#ifdef H5Z_DEBUG
fstats=&H5Z_stat_table_g[fclass_idx];
@@ -1220,6 +1414,49 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_in_pline
+ *
+ * Purpose: Check wheter a filter is in the filter pipeline using the
+ * filter ID. This function is very similar to H5Z_filter_info
+ *
+ * Return: TRUE - found filter
+ * FALSE - not found
+ * FAIL - error
+ *
+ * Programmer: Raymond Lu
+ * 26 April 2013
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
+{
+ size_t idx; /* Index of filter in pipeline */
+ htri_t ret_value = TRUE; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ assert(pline);
+ assert(filter>=0 && filter<=H5Z_FILTER_MAX);
+
+ /* Locate the filter in the pipeline */
+ for(idx=0; idx<pline->nused; idx++)
+ if(pline->filter[idx].id==filter)
+ break;
+
+ /* Check if the filter was not already in the pipeline */
+ if(idx>=pline->nused)
+ ret_value = FALSE;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5Z_filter_in_pline() */
+
+
+
+/*-------------------------------------------------------------------------
* Function: H5Z_all_filters_avail
*
* Purpose: Verify that all the filters in a pipeline are currently
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index c1528b3..6c0a46f 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -91,7 +91,9 @@ H5_DLL herr_t H5Z_can_apply_direct(const struct H5O_pline_t *pline);
H5_DLL herr_t H5Z_set_local_direct(const struct H5O_pline_t *pline);
H5_DLL H5Z_filter_info_t *H5Z_filter_info(const struct H5O_pline_t *pline,
H5Z_filter_t filter);
+H5_DLL htri_t H5Z_filter_in_pline(const struct H5O_pline_t *pline, H5Z_filter_t filter);
H5_DLL htri_t H5Z_all_filters_avail(const struct H5O_pline_t *pline);
+H5_DLL htri_t H5Z_filter_avail(H5Z_filter_t id);
H5_DLL herr_t H5Z_delete(struct H5O_pline_t *pline, H5Z_filter_t filter);
/* Data Transform Functions */
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index 5d9b5ed..8daa5f4 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -42,6 +42,7 @@ typedef int H5Z_filter_t;
#define H5Z_FILTER_NBIT 5 /*nbit compression */
#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */
#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */
+
#define H5Z_FILTER_MAX 65535 /*maximum filter id */
/* General macros */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index d9016dc..8c57b62 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -90,6 +90,9 @@
/* Define if the direct I/O virtual file driver should be compiled */
#undef HAVE_DIRECT
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -190,6 +193,9 @@
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
+/* Define to 1 if you have the `dl' library (-ldl). */
+#undef HAVE_LIBDL
+
/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
#undef HAVE_LIBDMALLOC
diff --git a/src/H5err.txt b/src/H5err.txt
index ab3277f..5a38cdf 100644
--- a/src/H5err.txt
+++ b/src/H5err.txt
@@ -76,6 +76,7 @@ MAJOR, H5E_FSPACE, Free Space Manager
MAJOR, H5E_SOHM, Shared Object Header Messages
MAJOR, H5E_EARRAY, Extensible Array
MAJOR, H5E_FARRAY, Fixed Array
+MAJOR, H5E_PLUGIN, Plugin for dynamically loaded library
MAJOR, H5E_NONE_MAJOR, No error
# Sections (for grouping minor errors)
@@ -98,6 +99,7 @@ SECTION, HEAP, Heap errors
SECTION, FSPACE, Free space errors
SECTION, PIPELINE, I/O pipeline errors
SECTION, SYSTEM, System level errors
+SECTION, PLUGIN, Plugin errors
SECTION, NONE, No error
# Minor errors
@@ -258,5 +260,8 @@ MINOR, PIPELINE, H5E_CANTFILTER, Filter operation failed
# System level errors
MINOR, SYSTEM, H5E_SYSERRSTR, System error message
+# Plugin errors
+MINOR, PLUGIN, H5E_OPENERROR, Can't open directory or file
+
# No error, for backward compatibility */
MINOR, NONE, H5E_NONE_MINOR, No error
diff --git a/src/H5private.h b/src/H5private.h
index 46c02e7..b4db8c5 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -149,6 +149,17 @@
# include <io.h>
#endif
+/*
+ * Dynamic library handling. These are needed for dynamically loading I/O
+ * filters and VFDs.
+ */
+#ifdef H5_HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+#ifdef H5_HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
#ifdef H5_HAVE_WIN32_API
/* The following two defines must be before any windows headers are included */
@@ -2352,6 +2363,7 @@ H5_DLL int H5G_term_interface(void);
H5_DLL int H5I_term_interface(void);
H5_DLL int H5L_term_interface(void);
H5_DLL int H5P_term_interface(void);
+H5_DLL int H5PL_term_interface(void);
H5_DLL int H5R_term_interface(void);
H5_DLL int H5S_term_interface(void);
H5_DLL int H5T_term_interface(void);
diff --git a/src/H5public.h b/src/H5public.h
index deb4587..88d8984 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -75,10 +75,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 149 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 151 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.149" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.151" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.am b/src/Makefile.am
index 47bdb61..8220df4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,6 +91,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
H5Pgcpl.c H5Pint.c \
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
+ H5PL.c \
H5R.c H5Rdeprec.c \
H5RC.c \
H5RS.c \
@@ -119,7 +120,9 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5VLpublic.h H5VLnative.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
- H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
+ H5MMpublic.h H5Opublic.h H5Ppublic.h \
+ H5PLextern.h \
+ H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
# install libhdf5.settings in lib directory
diff --git a/src/Makefile.in b/src/Makefile.in
index d04c4e1..4cf6542 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -161,18 +161,18 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \
H5Pdxpl.lo H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo \
H5Pgcpl.lo H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo \
- H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo \
- H5RC.lo H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo \
- H5Smpio.lo H5Snone.lo H5Spoint.lo H5Sselect.lo H5Stest.lo \
- H5SL.lo H5SM.lo H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo \
- H5SMtest.lo H5ST.lo H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo \
- H5Tcompound.lo H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo \
- H5Tenum.lo H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo \
- H5Tnative.lo H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo \
- H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo \
- H5TS.lo H5V.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \
- H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \
- H5Ztrans.lo
+ H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo H5PL.lo H5R.lo \
+ H5Rdeprec.lo H5RC.lo H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo \
+ H5Shyper.lo H5Smpio.lo H5Snone.lo H5Spoint.lo H5Sselect.lo \
+ H5Stest.lo H5SL.lo H5SM.lo H5SMbtree2.lo H5SMcache.lo \
+ H5SMmessage.lo H5SMtest.lo H5ST.lo H5T.lo H5Tarray.lo \
+ H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo H5Tcset.lo \
+ H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo H5Tfields.lo H5Tfixed.lo \
+ H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo H5Toh.lo \
+ H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo \
+ H5Tvisit.lo H5Tvlen.lo H5TS.lo H5V.lo H5WB.lo H5Z.lo \
+ H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo H5Zshuffle.lo \
+ H5Zszip.lo H5Zscaleoffset.lo H5Ztrans.lo
libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -514,7 +514,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 139
+LT_VERS_REVISION = 141
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
@@ -580,6 +580,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
H5Pgcpl.c H5Pint.c \
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
+ H5PL.c \
H5R.c H5Rdeprec.c \
H5RC.c \
H5RS.c \
@@ -608,7 +609,9 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5VLpublic.h H5VLnative.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
- H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
+ H5MMpublic.h H5Opublic.h H5Ppublic.h \
+ H5PLextern.h \
+ H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
@@ -930,6 +933,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Otest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ounknown.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5P.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5PL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pacpl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdapl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdcpl.Plo@am__quote@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 6af1e94..766ed7b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,7 +7,14 @@ PROJECT (HDF5_TEST)
ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
-# Define Sources
+# Generate the H5srcdir_str.h file containing user settings needed by compilation
+#-----------------------------------------------------------------------------
+SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
+INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
+
+#-----------------------------------------------------------------------------
+# Define Test Library Sources
#-----------------------------------------------------------------------------
SET (TEST_LIB_SRCS
${HDF5_TEST_SOURCE_DIR}/h5test.c
@@ -19,13 +26,6 @@ SET (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
)
-#-----------------------------------------------------------------------------
-# Generate the H5srcdir_str.h file containing user settings needed by compilation
-#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-
ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
IF (MSVC)
TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
@@ -37,6 +37,86 @@ TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test)
+#-----------------------------------------------------------------------------
+# If plugin library tests can be tested
+#-----------------------------------------------------------------------------
+IF (BUILD_SHARED_LIBS)
+ # make plugins dir
+ FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
+ FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
+
+ #-----------------------------------------------------------------------------
+ # Define Test Library Sources
+ #-----------------------------------------------------------------------------
+ SET (TEST_PLUGIN_LIBS
+ dynlib1
+ dynlib3
+ )
+ SET (TEST2_PLUGIN_LIBS
+ dynlib2
+ )
+
+ FOREACH (test_lib ${TEST_PLUGIN_LIBS})
+ SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+
+ ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
+ ${LIB_TYPE}
+ HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
+ )
+ SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ )
+ ENDFOREACH (test_lib ${TEST_PLUGIN_LIBS})
+
+ FOREACH (test_lib ${TEST2_PLUGIN_LIBS})
+ SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+
+ ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
+ ${LIB_TYPE}
+ HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
+ )
+ SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ )
+ ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS})
+ENDIF (BUILD_SHARED_LIBS)
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
@@ -317,6 +397,8 @@ ADD_TEST (
testmeta.h5
tstint1.h5
tstint2.h5
+ unregister_filter_1.h5
+ unregister_filter_2.h5
)
SET (H5_TESTS
@@ -373,6 +455,7 @@ SET (H5_TESTS
file_image
enc_dec_plist
enc_dec_plist_with_endianess
+ unregister
)
FOREACH (test ${H5_TESTS})
@@ -508,6 +591,7 @@ ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
+SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
#-- Adding test for links_env
ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
@@ -553,6 +637,32 @@ ENDIF (\${TEST_RESULT} STREQUAL \"0\")
ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+
+ IF (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP "\;")
+ ELSE (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP ":")
+ ENDIF(WIN32 AND NOT CYGWIN)
+
+ ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin ${LIB_TYPE})
+ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
+
+ ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
+ SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
+ELSE (BUILD_SHARED_LIBS)
+ MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ ADD_TEST (
+ NAME H5PLUGIN-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ )
+ENDIF (BUILD_SHARED_LIBS)
+
+##############################################################################
##############################################################################
### V F D T E S T S ###
##############################################################################
@@ -621,6 +731,7 @@ IF (HDF5_TEST_VFD)
tcheck_version
testmeta
links_env
+ unregister
)
IF (DIRECT_VFD)
diff --git a/test/Makefile.am b/test/Makefile.am
index f1f98f1..b7fd1a9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -26,9 +26,13 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_builddir)/src
# Test script for error_test and err_compat
#TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh
TEST_SCRIPT = testlibinfo.sh testcheck_version.sh testlinks_env.sh
-check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT)
+if HAVE_SHARED_CONDITIONAL
+ TEST_SCRIPT += test_plugin.sh
+ SCRIPT_DEPEND += plugin$(EXEEXT)
+endif
+check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
@@ -43,7 +47,7 @@ TEST_PROG= testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \
big mtime fillval mount flush1 flush2 app_ref enum \
set_extent ttsafe enc_dec_plist enc_dec_plist_with_endianess\
getname vfd ntypes dangle dtransform reserved cross_read \
- freespace mf farray earray btree2 fheap file_image
+ freespace mf farray earray btree2 fheap file_image unregister
# List programs to be built when testing here. error_test and err_compat are
# built at the same time as the other tests, but executed by testerror.sh.
@@ -52,7 +56,9 @@ TEST_PROG= testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \
# Also build testmeta, which is used for timings test. It builds quickly,
# and this lets automake keep all its test programs in one place.
check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env
-
+if HAVE_SHARED_CONDITIONAL
+ check_PROGRAMS+= plugin
+endif
# These programs generate test files for the tests. They don't need to be
# compiled every time we want to test the library. However, putting
@@ -70,8 +76,25 @@ if BUILD_ALL_CONDITIONAL
noinst_PROGRAMS=$(BUILD_ALL_PROGS)
endif
-# The libh5test library provides common support code for the tests.
-noinst_LTLIBRARIES=libh5test.la
+if HAVE_SHARED_CONDITIONAL
+ # The libh5test library provides common support code for the tests.
+ noinst_LTLIBRARIES=libh5test.la
+
+ # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c.
+ # Build it as shared library if configure is enabled for shared library.
+ lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la
+ libdynlib1_la_SOURCES=dynlib1.c
+ libdynlib2_la_SOURCES=dynlib2.c
+ libdynlib3_la_SOURCES=dynlib3.c
+
+install-exec-hook:
+ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+
+else
+ # The libh5test library provides common support code for the tests.
+ noinst_LTLIBRARIES=libh5test.la
+endif
+
libh5test_la_SOURCES=h5test.c testframe.c cache_common.c
# Use libhd5test.la to compile all of the tests
@@ -81,10 +104,9 @@ LDADD=libh5test.la $(LIBHDF5)
ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
+VFD_LIST = sec2 stdio core split multi family
if DIRECT_VFD_CONDITIONAL
- VFD_LIST = sec2 stdio core split multi family direct
-else
- VFD_LIST = sec2 stdio core split multi family
+ VFD_LIST += direct
endif
# Additional target for running timing test
@@ -121,7 +143,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin \
getname.h5 getname[1-3].h5 sec2_file.h5 direct_file.h5 \
family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \
- multi_file-[rs].h5 core_file \
+ multi_file-[rs].h5 core_file plugin.h5 \
new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \
dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \
@@ -129,7 +151,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
earray.h5 efc[0-5].h5 log_vfd_out.log \
new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \
split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \
- file_image_core_test.h5.copy
+ file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
@@ -138,7 +160,7 @@ testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
tvlstr.c tvltypes.c
# Temporary files.
-#DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh
-DISTCLEANFILES=testlibinfo.sh testcheck_version.sh testlinks_env.sh
+#DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh
+DISTCLEANFILES=testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh
include $(top_srcdir)/config/conclude.am
diff --git a/test/Makefile.in b/test/Makefile.in
index e736e59..2ba8975 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -70,16 +70,20 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/testcheck_version.sh.in \
- $(srcdir)/testerror.sh.in $(srcdir)/testlibinfo.sh.in \
- $(srcdir)/testlinks_env.sh.in $(top_srcdir)/bin/depcomp \
- $(top_srcdir)/bin/mkinstalldirs \
+ $(srcdir)/Makefile.in $(srcdir)/test_plugin.sh.in \
+ $(srcdir)/testcheck_version.sh.in $(srcdir)/testerror.sh.in \
+ $(srcdir)/testlibinfo.sh.in $(srcdir)/testlinks_env.sh.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am COPYING
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_1 = test_plugin.sh
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_2 = plugin$(EXEEXT)
check_PROGRAMS = $(am__EXEEXT_1) error_test$(EXEEXT) \
err_compat$(EXEEXT) tcheck_version$(EXEEXT) testmeta$(EXEEXT) \
- links_env$(EXEEXT)
-@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_2)
+ links_env$(EXEEXT) $(am__EXEEXT_2)
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_3 = plugin
+@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_3)
+@DIRECT_VFD_CONDITIONAL_TRUE@am__append_4 = direct
TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT)
subdir = test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -89,15 +93,63 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/H5config.h
CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \
- testlibinfo.sh testlinks_env.sh
+ testlibinfo.sh testlinks_env.sh test_plugin.sh
CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libh5test_la_LIBADD =
-am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo
-libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+libdynlib1_la_LIBADD =
+am__libdynlib1_la_SOURCES_DIST = dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_OBJECTS = dynlib1.lo
+libdynlib1_la_OBJECTS = $(am_libdynlib1_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libdynlib2_la_LIBADD =
+am__libdynlib2_la_SOURCES_DIST = dynlib2.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_OBJECTS = dynlib2.lo
+libdynlib2_la_OBJECTS = $(am_libdynlib2_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libdynlib3_la_LIBADD =
+am__libdynlib3_la_SOURCES_DIST = dynlib3.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_OBJECTS = dynlib3.lo
+libdynlib3_la_OBJECTS = $(am_libdynlib3_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libh5test_la_LIBADD =
+am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo
+libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_FALSE@am_libh5test_la_rpath =
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libh5test_la_rpath =
am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \
stab$(EXEEXT) gheap$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \
cache_tagging$(EXEEXT) pool$(EXEEXT) accum$(EXEEXT) \
@@ -113,8 +165,10 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \
vfd$(EXEEXT) ntypes$(EXEEXT) dangle$(EXEEXT) \
dtransform$(EXEEXT) reserved$(EXEEXT) cross_read$(EXEEXT) \
freespace$(EXEEXT) mf$(EXEEXT) farray$(EXEEXT) earray$(EXEEXT) \
- btree2$(EXEEXT) fheap$(EXEEXT) file_image$(EXEEXT)
-am__EXEEXT_2 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \
+ btree2$(EXEEXT) fheap$(EXEEXT) file_image$(EXEEXT) \
+ unregister$(EXEEXT)
+@HAVE_SHARED_CONDITIONAL_TRUE@am__EXEEXT_2 = plugin$(EXEEXT)
+am__EXEEXT_3 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \
gen_cross$(EXEEXT) gen_deflate$(EXEEXT) gen_filters$(EXEEXT) \
gen_new_array$(EXEEXT) gen_new_fill$(EXEEXT) \
gen_new_group$(EXEEXT) gen_new_mtime$(EXEEXT) \
@@ -377,6 +431,10 @@ ohdr_SOURCES = ohdr.c
ohdr_OBJECTS = ohdr.$(OBJEXT)
ohdr_LDADD = $(LDADD)
ohdr_DEPENDENCIES = libh5test.la $(LIBHDF5)
+plugin_SOURCES = plugin.c
+plugin_OBJECTS = plugin.$(OBJEXT)
+plugin_LDADD = $(LDADD)
+plugin_DEPENDENCIES = libh5test.la $(LIBHDF5)
pool_SOURCES = pool.c
pool_OBJECTS = pool.$(OBJEXT)
pool_LDADD = $(LDADD)
@@ -427,6 +485,10 @@ unlink_SOURCES = unlink.c
unlink_OBJECTS = unlink.$(OBJEXT)
unlink_LDADD = $(LDADD)
unlink_DEPENDENCIES = libh5test.la $(LIBHDF5)
+unregister_SOURCES = unregister.c
+unregister_OBJECTS = unregister.$(OBJEXT)
+unregister_LDADD = $(LDADD)
+unregister_DEPENDENCIES = libh5test.la $(LIBHDF5)
vfd_SOURCES = vfd.c
vfd_OBJECTS = vfd.$(OBJEXT)
vfd_LDADD = $(LDADD)
@@ -457,38 +519,43 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libh5test_la_SOURCES) accum.c app_ref.c big.c bittests.c \
- btree2.c cache.c cache_api.c cache_tagging.c cmpd_dset.c \
- cross_read.c dangle.c dsets.c dt_arith.c dtransform.c dtypes.c \
- earray.c efc.c enc_dec_plist.c enc_dec_plist_with_endianess.c \
- enum.c err_compat.c error_test.c extend.c external.c farray.c \
- fheap.c file_image.c fillval.c filter_fail.c flush1.c flush2.c \
+SOURCES = $(libdynlib1_la_SOURCES) $(libdynlib2_la_SOURCES) \
+ $(libdynlib3_la_SOURCES) $(libh5test_la_SOURCES) accum.c \
+ app_ref.c big.c bittests.c btree2.c cache.c cache_api.c \
+ cache_tagging.c cmpd_dset.c cross_read.c dangle.c dsets.c \
+ dt_arith.c dtransform.c dtypes.c earray.c efc.c \
+ enc_dec_plist.c enc_dec_plist_with_endianess.c enum.c \
+ err_compat.c error_test.c extend.c external.c farray.c fheap.c \
+ file_image.c fillval.c filter_fail.c flush1.c flush2.c \
freespace.c gen_bad_ohdr.c gen_bogus.c gen_cross.c \
gen_deflate.c gen_file_image.c gen_filespace.c gen_filters.c \
gen_new_array.c gen_new_fill.c gen_new_group.c gen_new_mtime.c \
gen_new_super.c gen_noencoder.c gen_nullspace.c gen_plist.c \
gen_sizes_lheap.c gen_specmetaread.c gen_udlinks.c getname.c \
gheap.c hyperslab.c istore.c lheap.c links.c links_env.c mf.c \
- mount.c mtime.c ntypes.c objcopy.c ohdr.c pool.c reserved.c \
- set_extent.c space_overflow.c stab.c tcheck_version.c \
- $(testhdf5_SOURCES) testmeta.c $(ttsafe_SOURCES) unlink.c \
- vfd.c
-DIST_SOURCES = $(libh5test_la_SOURCES) accum.c app_ref.c big.c \
- bittests.c btree2.c cache.c cache_api.c cache_tagging.c \
- cmpd_dset.c cross_read.c dangle.c dsets.c dt_arith.c \
- dtransform.c dtypes.c earray.c efc.c enc_dec_plist.c \
- enc_dec_plist_with_endianess.c enum.c err_compat.c \
- error_test.c extend.c external.c farray.c fheap.c file_image.c \
- fillval.c filter_fail.c flush1.c flush2.c freespace.c \
- gen_bad_ohdr.c gen_bogus.c gen_cross.c gen_deflate.c \
- gen_file_image.c gen_filespace.c gen_filters.c gen_new_array.c \
- gen_new_fill.c gen_new_group.c gen_new_mtime.c gen_new_super.c \
- gen_noencoder.c gen_nullspace.c gen_plist.c gen_sizes_lheap.c \
- gen_specmetaread.c gen_udlinks.c getname.c gheap.c hyperslab.c \
- istore.c lheap.c links.c links_env.c mf.c mount.c mtime.c \
- ntypes.c objcopy.c ohdr.c pool.c reserved.c set_extent.c \
- space_overflow.c stab.c tcheck_version.c $(testhdf5_SOURCES) \
- testmeta.c $(ttsafe_SOURCES) unlink.c vfd.c
+ mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \
+ reserved.c set_extent.c space_overflow.c stab.c \
+ tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ $(ttsafe_SOURCES) unlink.c unregister.c vfd.c
+DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \
+ $(am__libdynlib2_la_SOURCES_DIST) \
+ $(am__libdynlib3_la_SOURCES_DIST) $(libh5test_la_SOURCES) \
+ accum.c app_ref.c big.c bittests.c btree2.c cache.c \
+ cache_api.c cache_tagging.c cmpd_dset.c cross_read.c dangle.c \
+ dsets.c dt_arith.c dtransform.c dtypes.c earray.c efc.c \
+ enc_dec_plist.c enc_dec_plist_with_endianess.c enum.c \
+ err_compat.c error_test.c extend.c external.c farray.c fheap.c \
+ file_image.c fillval.c filter_fail.c flush1.c flush2.c \
+ freespace.c gen_bad_ohdr.c gen_bogus.c gen_cross.c \
+ gen_deflate.c gen_file_image.c gen_filespace.c gen_filters.c \
+ gen_new_array.c gen_new_fill.c gen_new_group.c gen_new_mtime.c \
+ gen_new_super.c gen_noencoder.c gen_nullspace.c gen_plist.c \
+ gen_sizes_lheap.c gen_specmetaread.c gen_udlinks.c getname.c \
+ gheap.c hyperslab.c istore.c lheap.c links.c links_env.c mf.c \
+ mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \
+ reserved.c set_extent.c space_overflow.c stab.c \
+ tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ $(ttsafe_SOURCES) unlink.c unregister.c vfd.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -802,21 +869,24 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \
tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin getname.h5 \
getname[1-3].h5 sec2_file.h5 direct_file.h5 \
family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \
- multi_file-[rs].h5 core_file new_move_[ab].h5 ntypes.h5 \
- dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \
+ multi_file-[rs].h5 core_file plugin.h5 new_move_[ab].h5 \
+ ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \
test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \
objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \
earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \
new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \
- split_get_file_image_test-r.h5 file_image_core_test.h5.copy
+ split_get_file_image_test-r.h5 file_image_core_test.h5.copy \
+ unregister_filter_1.h5 unregister_filter_2.h5
INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
# Test script for error_test and err_compat
#TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh
-TEST_SCRIPT = testlibinfo.sh testcheck_version.sh testlinks_env.sh
+TEST_SCRIPT = testlibinfo.sh testcheck_version.sh testlinks_env.sh \
+ $(am__append_1)
+SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) \
+ links_env$(EXEEXT) $(am__append_2)
check_SCRIPTS = $(TEST_SCRIPT)
-SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
@@ -831,7 +901,7 @@ TEST_PROG = testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \
big mtime fillval mount flush1 flush2 app_ref enum \
set_extent ttsafe enc_dec_plist enc_dec_plist_with_endianess\
getname vfd ntypes dangle dtransform reserved cross_read \
- freespace mf farray earray btree2 fheap file_image
+ freespace mf farray earray btree2 fheap file_image unregister
# These programs generate test files for the tests. They don't need to be
@@ -846,9 +916,12 @@ BUILD_ALL_PROGS = gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_n
gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \
gen_sizes_lheap gen_file_image gen_plist
-
-# The libh5test library provides common support code for the tests.
-noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_FALSE@noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_TRUE@lib_LTLIBRARIES = libdynlib1.la libdynlib2.la libdynlib3.la
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_SOURCES = dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_SOURCES = dynlib2.c
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_SOURCES = dynlib3.c
libh5test_la_SOURCES = h5test.c testframe.c cache_common.c
# Use libhd5test.la to compile all of the tests
@@ -858,8 +931,7 @@ LDADD = libh5test.la $(LIBHDF5)
ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
-@DIRECT_VFD_CONDITIONAL_FALSE@VFD_LIST = sec2 stdio core split multi family
-@DIRECT_VFD_CONDITIONAL_TRUE@VFD_LIST = sec2 stdio core split multi family direct
+VFD_LIST = sec2 stdio core split multi family $(am__append_4)
# Sources for testhdf5 executable
testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
@@ -869,8 +941,8 @@ testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
# Temporary files.
-#DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh
-DISTCLEANFILES = testlibinfo.sh testcheck_version.sh testlinks_env.sh
+#DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh
+DISTCLEANFILES = testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,
@@ -936,6 +1008,42 @@ testlibinfo.sh: $(top_builddir)/config.status $(srcdir)/testlibinfo.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
testlinks_env.sh: $(top_builddir)/config.status $(srcdir)/testlinks_env.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+test_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_plugin.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -947,8 +1055,14 @@ clean-noinstLTLIBRARIES:
echo rm -f $${locs}; \
rm -f $${locs}; \
}
+libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) $(LIBS)
+libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) $(LIBS)
+libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) $(LIBS)
libh5test.la: $(libh5test_la_OBJECTS) $(libh5test_la_DEPENDENCIES) $(EXTRA_libh5test_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(am_libh5test_la_rpath) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -1156,6 +1270,9 @@ objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES) $(EXTRA_objcopy_DEP
ohdr$(EXEEXT): $(ohdr_OBJECTS) $(ohdr_DEPENDENCIES) $(EXTRA_ohdr_DEPENDENCIES)
@rm -f ohdr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ohdr_OBJECTS) $(ohdr_LDADD) $(LIBS)
+plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES) $(EXTRA_plugin_DEPENDENCIES)
+ @rm -f plugin$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
pool$(EXEEXT): $(pool_OBJECTS) $(pool_DEPENDENCIES) $(EXTRA_pool_DEPENDENCIES)
@rm -f pool$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pool_OBJECTS) $(pool_LDADD) $(LIBS)
@@ -1186,6 +1303,9 @@ ttsafe$(EXEEXT): $(ttsafe_OBJECTS) $(ttsafe_DEPENDENCIES) $(EXTRA_ttsafe_DEPENDE
unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES)
@rm -f unlink$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS)
+unregister$(EXEEXT): $(unregister_OBJECTS) $(unregister_DEPENDENCIES) $(EXTRA_unregister_DEPENDENCIES)
+ @rm -f unregister$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(unregister_OBJECTS) $(unregister_LDADD) $(LIBS)
vfd$(EXEEXT): $(vfd_OBJECTS) $(vfd_DEPENDENCIES) $(EXTRA_vfd_DEPENDENCIES)
@rm -f vfd$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(vfd_OBJECTS) $(vfd_LDADD) $(LIBS)
@@ -1212,6 +1332,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dt_arith.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtransform.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtypes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enc_dec_plist.Po@am__quote@
@@ -1261,6 +1384,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntypes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objcopy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ohdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reserved.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_extent.Po@am__quote@
@@ -1300,6 +1424,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvltypes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unregister.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfd.Po@am__quote@
.c.o:
@@ -1431,6 +1556,9 @@ check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local
installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -1462,10 +1590,12 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_SHARED_CONDITIONAL_FALSE@install-exec-hook:
clean: clean-am
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
+clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -1491,8 +1621,9 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am:
-
+install-exec-am: install-libLTLIBRARIES
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
@@ -1531,24 +1662,25 @@ ps: ps-am
ps-am:
-uninstall-am:
+uninstall-am: uninstall-libLTLIBRARIES
-.MAKE: check-am install-am install-strip
+.MAKE: check-am install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
- clean clean-checkPROGRAMS clean-generic clean-libtool \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscopelist ctags \
- distclean distclean-compile distclean-generic \
+ clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ cscopelist ctags distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
- pdf-am ps ps-am tags uninstall uninstall-am
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-libLTLIBRARIES
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
@@ -1562,6 +1694,16 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
+@HAVE_SHARED_CONDITIONAL_TRUE@ # The libh5test library provides common support code for the tests.
+
+@HAVE_SHARED_CONDITIONAL_TRUE@ # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c.
+@HAVE_SHARED_CONDITIONAL_TRUE@ # Build it as shared library if configure is enabled for shared library.
+
+@HAVE_SHARED_CONDITIONAL_TRUE@install-exec-hook:
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+
+@HAVE_SHARED_CONDITIONAL_FALSE@ # The libh5test library provides common support code for the tests.
+
# Additional target for running timing test
timings _timings: testmeta
@for timing in $(TIMINGS) dummy; do \
diff --git a/test/dynlib1.c b/test/dynlib1.c
new file mode 100644
index 0000000..1ccc33a
--- /dev/null
+++ b/test/dynlib1.c
@@ -0,0 +1,97 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB1 257
+
+static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB1[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib1
+ *
+ * Purpose: A dynlib1 filter method that adds on and subtract from
+ * the original value with another value. It will be built
+ * as a shared library. plugin.c test will load and use
+ * this filter library.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 29 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int add_on = 0;
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts == 0)
+ return(0);
+
+ /* Check that permanent parameters are set correctly */
+ if(cd_values[0] > 9)
+ return(0);
+
+ add_on = (int)cd_values[0];
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ /* Substract the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ -= add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /*write*/
+ /* Add the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ += add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+} /* end H5Z_filter_dynlib1() */
+
diff --git a/test/dynlib2.c b/test/dynlib2.c
new file mode 100644
index 0000000..a853ed0
--- /dev/null
+++ b/test/dynlib2.c
@@ -0,0 +1,91 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB2 258
+#define MULTIPLIER 3
+
+static size_t H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB2[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB2, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib2, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB2;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib2
+ *
+ * Purpose: A dynlib2 filter method that multiplies the original value
+ * during write and divide the original value during read. It
+ * will be built as a shared library. plugin.c test will load
+ * and use this filter library.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 29 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts > 0)
+ return(0);
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ /* Divide the original value with MULTIPLIER */
+ while(buf_left > 0) {
+ *int_ptr++ /= MULTIPLIER;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /*write*/
+ /* Multiply the original value with MULTIPLIER */
+ while(buf_left > 0) {
+ *int_ptr++ *= MULTIPLIER;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+} /* end H5Z_filter_dynlib2() */
+
diff --git a/test/dynlib3.c b/test/dynlib3.c
new file mode 100644
index 0000000..9560b86
--- /dev/null
+++ b/test/dynlib3.c
@@ -0,0 +1,102 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB3 259
+#define SUFFIX_LEN 8
+#define GROUP_SUFFIX ".h5group"
+
+static size_t H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB3[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB3, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib3", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib3, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB3;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib3
+ *
+ * Purpose: A dynlib3 filter method that is used to test groups. It
+ * appends the suffix ".h5group" to each group name during
+ * write and takes it out during read.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ size_t ret_value; /* Return value */
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts > 0)
+ return(0);
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ ret_value = *buf_size = nbytes - SUFFIX_LEN;
+ } /* end if */
+ else { /*write*/
+ void *outbuf = NULL; /* Pointer to new buffer */
+ unsigned char *dst; /* Temporary pointer to destination buffer */
+
+ dst = (unsigned char *)(outbuf = malloc(nbytes + SUFFIX_LEN));
+
+ /* Copy raw data */
+ memcpy((void*)dst, (void*)(*buf), nbytes);
+
+ /* Append suffix to raw data for storage */
+ dst += nbytes;
+ memcpy(dst, (void*)GROUP_SUFFIX, SUFFIX_LEN);
+
+ /* Free input buffer */
+ free(*buf);
+
+ /* Set return values */
+ *buf_size = nbytes + SUFFIX_LEN;
+ *buf = outbuf;
+ outbuf = NULL;
+ ret_value = *buf_size;
+ } /* end else */
+
+ return ret_value;
+} /* H5Z_filter_dynlib3() */
+
diff --git a/test/file_image.c b/test/file_image.c
index c734db8..d4056a7 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -1207,6 +1207,9 @@ test_get_file_image_error_rejection(void)
err = H5Fclose(file_id);
VERIFY(err == SUCCEED, "H5Fclose(2) failed.");
+ /* tidy up */
+ result = h5_cleanup(FILENAME2, fapl_id);
+ VERIFY(result != 0, "h5_cleanup(2 failed.");
/************************** Test #4 **********************************/
/* set up a family file driver test file, and try to get its image
diff --git a/test/fillval.c b/test/fillval.c
index 847dfbd..9271f80 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -37,6 +37,7 @@ const char *FILENAME[] = {
"fillval_6",
"fillval_7",
"fillval_8",
+ "fillval_9",
NULL
};
@@ -2085,6 +2086,266 @@ error:
return 1;
}
+/*-------------------------------------------------------------------------
+ * Function: test_partalloc_cases
+ *
+ * Purpose: Tests fill values read and write for datasets.
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Joel Plutchak
+ * April 15, 2013
+ *
+ * Modifications:
+ * This function is called by test_rdwr to write and read
+ * dataset for different cases of chunked datasets with
+ * unallocated chunks.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static int
+test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t fill_time)
+{
+ hid_t fspace=-1, dset1=-1, rspace = -1;
+ herr_t ret;
+ hsize_t ds_size[2] = {4, 4};
+ hsize_t max_size[2] = {H5S_UNLIMITED,4};
+ hsize_t chunk_size[2] = {1, 4};
+ int fillval=(-1);
+ int w_values[] = {42}; /* New value to be written */
+ int f_values[4] = {88,88,88,88}; /* pre-seed read buffer with known values */
+ int r_values[4] = {88,88,88,88}; /* pre-seed read buffer with known values */
+ hsize_t coord[1][2]; /* coordinate(s) of point to write */
+ hsize_t start[2], count[2];
+
+ fillval = 0; /* default fill value is zero */
+
+ /* Create dataset with 4x4 integer dataset */
+ if((fspace = H5Screate_simple(2, ds_size, max_size)) < 0)
+ goto error;
+ if((dset1 = H5Dcreate2(file, dname, H5T_NATIVE_INT, fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /*
+ * Select a point in the file dataspace.
+ */
+ coord[0][0]=0; coord[0][1]=0;
+ if (H5Sselect_elements( fspace, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord))
+ goto error;
+
+ /*
+ * Write single data point to the dataset.
+ */
+ if ((ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, fspace, H5P_DEFAULT, w_values))< 0) {
+ goto error;
+ }
+
+ /* Read a line/chunk and make sure values are right */
+ rspace = H5Screate_simple(2, chunk_size, NULL);
+
+ /* Read the first row of elements: one known plus three fill */
+ start[0] = 0;
+ start[1] = 0;
+ count[0] = 1;
+ count[1] = 4;
+ if ((ret = H5Sselect_hyperslab(fspace, H5S_SELECT_SET, start, NULL, count, NULL)) < 0)
+ goto error;
+ if ((ret = H5Sselect_all(rspace)) < 0)
+ goto error;
+ if(H5Dread(dset1, H5T_NATIVE_INT, rspace, fspace, H5P_DEFAULT, &r_values) < 0)
+ goto error;
+
+ /* Read the third row of elements: all fill */
+ start[0] = 2;
+ start[1] = 0;
+ count[0] = 1;
+ count[1] = 4;
+ if ((ret = H5Sselect_hyperslab(fspace, H5S_SELECT_SET, start, NULL, count, NULL)) < 0)
+ goto error;
+ if(H5Dread(dset1, H5T_NATIVE_INT, rspace, fspace, H5P_DEFAULT, &f_values) < 0)
+ goto error;
+
+ if(fill_time != H5D_FILL_TIME_NEVER) {
+ /* check allocated chunk */
+ if ((r_values[0] != w_values[0]) ||
+ (r_values[1] != fillval) ||
+ (r_values[2] != fillval) ||
+ (r_values[3] != fillval)) {
+ H5_FAILED();
+ HDfprintf(stdout, "%u: Allocated chunk value read was not correct.\n", (unsigned)__LINE__);
+ printf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n",
+ (long)r_values[0], (long)r_values[1],
+ (long)r_values[2], (long)r_values[3],
+ (long)w_values[0], (long)fillval,
+ (long)fillval, (long)fillval );
+ goto error;
+ }
+ /* check unallocated chunk */
+ if ((f_values[0] != fillval) ||
+ (f_values[1] != fillval) ||
+ (f_values[2] != fillval) ||
+ (f_values[3] != fillval)) {
+ H5_FAILED();
+ HDfprintf(stdout, "%u: Unallocated chunk value read was not correct.\n", (unsigned)__LINE__);
+ printf(" {%ld,%ld,%ld,%ld} should be {%ld,%ld,%ld,%ld}\n",
+ (long)f_values[0], (long)f_values[1],
+ (long)f_values[2], (long)f_values[3],
+ (long)fillval, (long)fillval,
+ (long)fillval, (long)fillval );
+ goto error;
+ }
+ /* for the "never fill" case expect to get trash values, so skip */
+ }
+ else if(fill_time == H5D_FILL_TIME_NEVER) {
+ }
+
+ if(H5Sclose(rspace) < 0) goto error;
+ if(H5Dclose(dset1) < 0) goto error;
+ if(H5Sclose(fspace) < 0) goto error;
+ return 0;
+
+ error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset1);
+ H5Sclose(fspace);
+ H5Sclose(rspace);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_partalloc
+ *
+ * Purpose: Tests fill values for chunked, partially-allocated datasets.
+ * Regression test for HDFFV-8247.
+ *
+ * Return: Success: 0
+ *
+ * Failure: number of errors
+ *
+ * Programmer: Joel Plutchak
+ * April 15, 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_partalloc(hid_t fapl, const char *base_name)
+{
+ char filename[1024];
+ hid_t file=-1, dcpl=-1;
+ hsize_t ch_size[2] = {1, 4};
+ int nerrors=0;
+
+ TESTING("chunked dataset partially allocated I/O");
+
+ h5_fixname(base_name, fapl, filename, sizeof filename);
+ if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk(dcpl, 2, ch_size) < 0) goto error;
+
+ /* I. Test H5D_ALLOC_TIME_LATE space allocation cases */
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, "\nALLOC_TIME_LATE\n" );
+#endif
+
+ /* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_ALLOC\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset1", H5D_FILL_TIME_ALLOC);
+
+ /* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_NEVER\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset2", H5D_FILL_TIME_NEVER );
+
+ /* case for H5D_FILL_TIME_IFSET as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_IFSET\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset3", H5D_FILL_TIME_IFSET );
+
+ /* II. Test H5D_ALLOC_TIME_INCR space allocation cases */
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, "\nALLOC_TIME_INCR\n" );
+#endif
+
+ /* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_ALLOC\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset4", H5D_FILL_TIME_ALLOC );
+
+ /* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_NEVER\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset5", H5D_FILL_TIME_NEVER );
+
+ /* case for H5D_FILL_TIME_IFSET as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_IFSET\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset6", H5D_FILL_TIME_IFSET );
+
+ /* III. Test H5D_ALLOC_TIME_EARLY space allocation cases */
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, "\nALLOC_TIME_EARLY\n" );
+#endif
+
+ /* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_ALLOC\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset7", H5D_FILL_TIME_ALLOC );
+
+ /* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_NEVER\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset8", H5D_FILL_TIME_NEVER );
+
+ /* case for H5D_FILL_TIME_IFSET as fill write time and fill value to be default */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0) goto error;
+#ifdef DEBUG
+ fprintf( stdout, " FILL_TIME_IFSET\n" );
+#endif
+ nerrors += test_partalloc_cases(file, dcpl, "dset9", H5D_FILL_TIME_IFSET );
+
+ if(nerrors)
+ goto error;
+ if(H5Pclose(dcpl) < 0) goto error;
+ if(H5Fclose(file) < 0) goto error;
+ PASSED();
+ return 0;
+
+ error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return nerrors;
+}
+
/*-------------------------------------------------------------------------
* Function: main
@@ -2157,6 +2418,7 @@ main(int argc, char *argv[])
nerrors += test_create(my_fapl, FILENAME[0], H5D_CHUNKED);
nerrors += test_rdwr (my_fapl, FILENAME[2], H5D_CHUNKED);
nerrors += test_extend(my_fapl, FILENAME[4], H5D_CHUNKED);
+ nerrors += test_partalloc(my_fapl, FILENAME[8]);
} /* end if */
/* Contiguous storage layout tests */
diff --git a/test/plugin.c b/test/plugin.c
new file mode 100644
index 0000000..86bc952
--- /dev/null
+++ b/test/plugin.c
@@ -0,0 +1,732 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+#include <stdlib.h>
+#include <time.h>
+
+#include "h5test.h"
+#include "H5srcdir.h"
+
+/*
+ * This file needs to access private datatypes from the H5Z package.
+ */
+#define H5Z_PACKAGE
+#include "H5Zpkg.h"
+
+/* Filters for HDF5 internal test */
+#define H5Z_FILTER_DYNLIB1 257
+#define H5Z_FILTER_DYNLIB2 258
+#define H5Z_FILTER_DYNLIB3 259
+
+const char *FILENAME[] = {
+ "plugin",
+ NULL
+};
+#define FILENAME_BUF_SIZE 1024
+
+/* Dataset names for testing filters */
+#define DSET_DEFLATE_NAME "deflate"
+#define DSET_DYNLIB1_NAME "dynlib1"
+#define DSET_DYNLIB2_NAME "dynlib2"
+
+/* Parameters for internal filter test */
+#define FILTER_CHUNK_DIM1 2
+#define FILTER_CHUNK_DIM2 25
+#define FILTER_HS_OFFSET1 7
+#define FILTER_HS_OFFSET2 30
+#define FILTER_HS_SIZE1 4
+#define FILTER_HS_SIZE2 50
+
+/* Shared global arrays */
+#define DSET_DIM1 100
+#define DSET_DIM2 200
+
+/* Limit random number within 20000 */
+#define RANDOM_LIMIT 20000
+
+#define GROUP_ITERATION 1000
+
+int points_deflate[DSET_DIM1][DSET_DIM2],
+ points_dynlib1[DSET_DIM1][DSET_DIM2],
+ points_dynlib2[DSET_DIM1][DSET_DIM2],
+ points_bzip2[DSET_DIM1][DSET_DIM2];
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_filter_internal
+ *
+ * Purpose: Tests writing entire data and partial data with filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 27 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filter_internal(hid_t fid, const char *name, hid_t dcpl)
+{
+ hid_t dataset; /* Dataset ID */
+ hid_t dxpl; /* Dataset xfer property list ID */
+ hid_t write_dxpl; /* Dataset xfer property list ID for writing */
+ hid_t sid; /* Dataspace ID */
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
+ const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
+ size_t i, j; /* Local index variables */
+ int n = 0;
+
+ /* Create the data space */
+ if((sid = H5Screate_simple(2, size, NULL)) < 0) goto error;
+
+ /*
+ * Create a small conversion buffer to test strip mining. We
+ * might as well test all we can!
+ */
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error;
+ tconv_buf = HDmalloc((size_t)1000);
+ if(H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0) goto error;
+ if((write_dxpl = H5Pcopy(dxpl)) < 0) TEST_ERROR;
+
+ TESTING(" filters (setup)");
+
+ /* Check if all the filters are available */
+ if(H5Pall_filters_avail(dcpl)!=TRUE) {
+ H5_FAILED();
+ printf(" Line %d: Incorrect filter availability\n",__LINE__);
+ goto error;
+ } /* end if */
+
+ /* Create the dataset */
+ if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT)) < 0) goto error;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 1: Read uninitialized data. It should be zero.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (uninitialized read)");
+
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ for(i=0; i<(size_t)size[0]; i++) {
+ for(j=0; j<(size_t)size[1]; j++) {
+ if(0!=check[i][j]) {
+ H5_FAILED();
+ printf(" Read a non-zero value.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
+ }
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 2: Test filters by setting up a chunked dataset and writing
+ * to it.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (write)");
+
+ n = 0;
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ points[i][j] = (int)(n++);
+ }
+ }
+
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 3: Try to read the data we just wrote.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (read)");
+
+ /* Read the dataset back */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr," At original: %d\n", (int)points[i][j]);
+ fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 4: Write new data over the top of the old data. The new data is
+ * random thus not very compressible, and will cause the chunks to move
+ * around as they grow. We only change values for the left half of the
+ * dataset although we rewrite the whole thing.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (modify)");
+
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]/2; j++) {
+ points[i][j] = (int)HDrandom () % RANDOM_LIMIT;
+ }
+ }
+ if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ TEST_ERROR;
+
+ /* Read the dataset back and check it */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 5: Close the dataset and then open it and read it again. This
+ * insures that the filters message is picked up properly from the
+ * object header.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (re-open)");
+
+ if(H5Dclose(dataset) < 0) TEST_ERROR;
+ if((dataset = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < size[0]; i++)
+ for(j = 0; j < size[1]; j++)
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ } /* end if */
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 6: Test partial I/O by writing to and then reading from a
+ * hyperslab of the dataset. The hyperslab does not line up on chunk
+ * boundaries (we know that case already works from above tests).
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (partial I/O)");
+
+ for(i=0; i<(size_t)hs_size[0]; i++) {
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom() % RANDOM_LIMIT;
+ }
+ }
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
+ NULL) < 0) TEST_ERROR;
+ /* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing) */
+ if(H5Dwrite (dataset, H5T_NATIVE_INT, sid, sid, dxpl, points) < 0)
+ TEST_ERROR;
+
+ if(H5Dread (dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<(size_t)hs_size[0]; i++) {
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
+ check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n",
+ (unsigned long)((size_t)hs_offset[0]+i),
+ (unsigned long)((size_t)hs_offset[1]+j));
+ fprintf(stderr," At original: %d\n",
+ (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ fprintf(stderr," At returned: %d\n",
+ (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /* Save the data written to the file for later comparison when the file
+ * is reopened for read test */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(!HDstrcmp(name, DSET_DEFLATE_NAME)) {
+ points_deflate[i][j] = points[i][j];
+ } else if(!HDstrcmp(name, DSET_DYNLIB1_NAME)) {
+ points_dynlib1[i][j] = points[i][j];
+ } else if(!HDstrcmp(name, DSET_DYNLIB2_NAME)) {
+ points_dynlib2[i][j] = points[i][j];
+ }
+ }
+ }
+
+ /* Clean up objects used for this test */
+ if(H5Dclose (dataset) < 0) goto error;
+ if(H5Sclose (sid) < 0) goto error;
+ if(H5Pclose (dxpl) < 0) goto error;
+ free (tconv_buf);
+
+ return(0);
+
+error:
+ if(tconv_buf)
+ free (tconv_buf);
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_filters_for_datasets
+ *
+ * Purpose: Tests creating datasets and writing data with dynamically
+ * loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filters_for_datasets(hid_t file)
+{
+ hid_t dc; /* Dataset creation property list ID */
+ const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
+ unsigned int compress_level = 9;
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ puts("Testing deflate filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_deflate (dc, 6) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DEFLATE_NAME,dc) < 0) goto error;
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+#else /* H5_HAVE_FILTER_DEFLATE */
+ TESTING("deflate filter");
+ SKIPPED();
+ puts(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test DYNLIB1 by itself.
+ *----------------------------------------------------------
+ */
+ puts("Testing DYNLIB1 filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_filter (dc, H5Z_FILTER_DYNLIB1, H5Z_FLAG_MANDATORY, (size_t)1, &compress_level) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DYNLIB1_NAME,dc) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+
+ /* Unregister the dynamic filter DYNLIB1 for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter. */
+ if(H5Zunregister(H5Z_FILTER_DYNLIB1) < 0) goto error;
+
+ /*----------------------------------------------------------
+ * STEP 3: Test DYNLIB2 by itself.
+ *----------------------------------------------------------
+ */
+ puts("Testing DYNLIB2 filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_filter (dc, H5Z_FILTER_DYNLIB2, H5Z_FLAG_MANDATORY, 0, NULL) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DYNLIB2_NAME,dc) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+
+ /* Unregister the dynamic filter DYNLIB2 for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter. */
+ if(H5Zunregister(H5Z_FILTER_DYNLIB2) < 0) goto error;
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_read_data
+ *
+ * Purpose: Tests reading data and compares values
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_read_data(hid_t dataset, int *origin_data)
+{
+ int check[DSET_DIM1][DSET_DIM2];
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ int *data_p = origin_data;
+ size_t i, j; /* Local index variables */
+
+ /* Read the dataset back */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(*data_p != check[i][j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr," At original: %d\n", *data_p);
+ fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ goto error;
+ }
+ data_p++;
+ }
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_read_with_filters
+ *
+ * Purpose: Tests reading dataset created with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_read_with_filters(hid_t file)
+{
+ hid_t dset; /* Dataset ID */
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ TESTING("Testing deflate filter");
+
+ if(H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) TEST_ERROR
+
+ if((dset = H5Dopen2(file,DSET_DEFLATE_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_deflate) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ /* Clean up objects used for this test */
+#else /* H5_HAVE_FILTER_DEFLATE */
+ TESTING("deflate filter");
+ SKIPPED();
+ puts(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test DYNLIB1 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING("Testing DYNLIB1 filter");
+
+ if((dset = H5Dopen2(file,DSET_DYNLIB1_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_dynlib1) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ /*----------------------------------------------------------
+ * STEP 3: Test Bogus2 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING("Testing DYNLIB2 filter");
+
+ if((dset = H5Dopen2(file,DSET_DYNLIB2_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_dynlib2) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_filters_for_groups
+ *
+ * Purpose: Tests creating group with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filters_for_groups(hid_t file)
+{
+ hid_t gcpl, gid, group;
+ int i;
+ char gname[256];
+
+ TESTING("Testing DYNLIB3 filter for group");
+
+ if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto error;
+
+ /* Use DYNLIB3 for creating groups */
+ if(H5Pset_filter (gcpl, H5Z_FILTER_DYNLIB3, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) goto error;
+
+ /* Create a group using this filter */
+ if((gid = H5Gcreate2(file, "group1", H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) goto error;
+
+ /* Create multiple groups under "group1" */
+ for (i=0; i < GROUP_ITERATION; i++) {
+ sprintf(gname, "group_%d", i);
+ if((group = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(group) < 0) goto error;
+ }
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (gcpl) < 0) goto error;
+
+ PASSED();
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_groups_with_filters
+ *
+ * Purpose: Tests opening group with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_groups_with_filters(hid_t file)
+{
+ hid_t gid, group;
+ int i;
+ char gname[256];
+
+ TESTING("Testing opening groups with DYNLIB3 filter");
+
+ /* Open the top group */
+ if((gid = H5Gopen2(file, "group1", H5P_DEFAULT)) < 0) goto error;
+
+ /* Create multiple groups under "group1" */
+ for (i=0; i < GROUP_ITERATION; i++) {
+ sprintf(gname, "group_%d", i);
+ if((group = H5Gopen2(gid, gname, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(group) < 0) goto error;
+ }
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ PASSED();
+
+ return 0;
+
+error:
+ return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file, fapl, fapl2;
+ hbool_t new_format;
+ int mdc_nelmts;
+ size_t rdcc_nelmts;
+ size_t rdcc_nbytes;
+ double rdcc_w0;
+ int nerrors = 0;
+
+ /* Testing setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Turn off the chunk cache, so all the chunks are immediately written to disk */
+ if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0)
+ TEST_ERROR
+ rdcc_nbytes = 0;
+ if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0)
+ TEST_ERROR
+
+ /* Copy the file access property list */
+ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
+
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR
+
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+
+ /* Test with old & new format groups */
+ for(new_format = FALSE; new_format <= TRUE; new_format++) {
+ hid_t my_fapl;
+
+ /* Set the FAPL for the type of format */
+ if(new_format) {
+ puts("\nTesting with new file format:");
+ my_fapl = fapl2;
+ } /* end if */
+ else {
+ puts("Testing with old file format:");
+ my_fapl = fapl;
+ } /* end else */
+
+ /* Create the file for this test */
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0)
+ TEST_ERROR
+
+ /* Test dynamically loaded filters for chunked dataset */
+ nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0);
+
+ /* Test dynamically loaded filters for groups */
+ nerrors += (test_filters_for_groups(file) < 0 ? 1 : 0);
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+ } /* end for */
+
+ /* Close FAPL */
+ if(H5Pclose(fapl2) < 0) TEST_ERROR
+ if(H5Pclose(fapl) < 0) TEST_ERROR
+
+ puts("\nTesting reading data with with dynamic plugin filters:");
+
+ /* Close the library so that all loaded plugin libraries are unloaded */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Reopen the file for testing data reading */
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+
+ /* Read the data with filters */
+ nerrors += (test_read_with_filters(file) < 0 ? 1 : 0);
+
+ /* Open the groups with filters */
+ nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0);
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ if(nerrors)
+ TEST_ERROR
+ printf("All plugin tests passed.\n");
+ h5_cleanup(FILENAME, fapl);
+
+ return 0;
+
+error:
+ nerrors = MAX(1, nerrors);
+ printf("***** %d PLUGIN TEST%s FAILED! *****\n",
+ nerrors, 1 == nerrors ? "" : "S");
+ return 1;
+}
+
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
new file mode 100644
index 0000000..569e938
--- /dev/null
+++ b/test/test_plugin.sh.in
@@ -0,0 +1,93 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic document set and is
+# linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
+# to either file, you may request a copy from help@hdfgroup.org.
+#
+srcdir=@srcdir@
+TOP_BUILDDIR=@top_builddir@
+
+# Determine backward compatibility options enabled
+DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+nerrors=0
+verbose=yes
+exit_code=$EXIT_SUCCESS
+
+TEST_NAME=plugin
+TEST_BIN=`pwd`/$TEST_NAME
+FROM_DIR=`pwd`/.libs
+PLUGIN_LIB1="$FROM_DIR/libdynlib1.* $FROM_DIR/libdynlib3.*"
+PLUGIN_LIB2="$FROM_DIR/libdynlib2.*"
+PLUGIN_LIBDIR1=testdir1
+PLUGIN_LIBDIR2=testdir2
+CP="cp -p" # Use -p to preserve mode,ownership,timestamps
+RM="rm -rf"
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Main Body
+# Create test directories if not exists yet.
+test -d $PLUGIN_LIBDIR1 || mkdir -p $PLUGIN_LIBDIR1
+if [ $? != 0 ]; then
+ echo "Failed to create test directory($PLUGIN_LIBDIR1)"
+ exit $EXIT_FAILURE
+fi
+
+test -d $PLUGIN_LIBDIR2 || mkdir -p $PLUGIN_LIBDIR2
+if [ $? != 0 ]; then
+ echo "Failed to create test directory($PLUGIN_LIBDIR2)"
+ exit $EXIT_FAILURE
+fi
+
+# copy plugin library for test
+$CP $PLUGIN_LIB1 $PLUGIN_LIBDIR1
+if [ $? != 0 ]; then
+ echo "Failed to copy plugin library ($PLUGIN_LIB1) for test."
+ exit $EXIT_FAILURE
+fi
+
+$CP $PLUGIN_LIB2 $PLUGIN_LIBDIR2
+if [ $? != 0 ]; then
+ echo "Failed to copy plugin library ($PLUGIN_LIB2) for test."
+ exit $EXIT_FAILURE
+fi
+
+# setup plugin path
+ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR1}:${PLUGIN_LIBDIR2}"
+
+# Run the test
+$ENVCMD $TEST_BIN
+if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+fi
+
+# print results
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit_code=$EXIT_FAILURE
+else
+ echo "All Plugin API tests passed."
+ exit_code=$EXIT_SUCCESS
+fi
+
+# Clean up temporary files/directories and leave
+$RM $PLUGIN_LIBDIR2
+exit $exit_code
diff --git a/test/testerror.sh.in b/test/testerror.sh.in
index b68fa7e..eb01fb1 100644
--- a/test/testerror.sh.in
+++ b/test/testerror.sh.in
@@ -23,6 +23,9 @@ DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
CMP='cmp -s'
DIFF='diff -c'
+# Skip plugin module to test missing filter
+ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
+
nerrors=0
verbose=yes
@@ -61,7 +64,9 @@ TEST() {
echo "#############################"
echo "Expected output for $TEST_ERR"
echo "#############################"
- $RUNSERIAL $TEST_ERR_BIN
+
+ # Skip the plugin for testing missing filter.
+ $ENVCMD $RUNSERIAL $TEST_ERR_BIN
) >$actual 2>$actual_err
# Extract file name, line number, version and thread IDs because they may be different
sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
@@ -109,7 +114,7 @@ else
TEST err_compat
fi
-# test for error_test
+# test for error_test. Skip the plugin for testing missing filter.
TEST error_test
if test $nerrors -eq 0 ; then
diff --git a/test/testframe.c b/test/testframe.c
index 8ab7a5b..af6e975 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -26,7 +26,7 @@
/*
* Definitions for the testing structure.
*/
-#define MAXNUMOFTESTS 50
+#define MAXNUMOFTESTS 60
#define MAXTESTNAME 16
#define MAXTESTDESC 64
@@ -73,7 +73,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
{
/* Sanity checking */
if (Index >= MAXNUMOFTESTS) {
- printf("Too many tests added, increase MAXNUMOFTEST(%d).\n",
+ printf("Too many tests added, increase MAXNUMOFTESTS(%d).\n",
MAXNUMOFTESTS);
exit(-1);
} /* end if */
diff --git a/test/unregister.c b/test/unregister.c
new file mode 100644
index 0000000..383958d
--- /dev/null
+++ b/test/unregister.c
@@ -0,0 +1,256 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 24 April 2013
+ *
+ * Purpose: Tests H5Zunregister function
+ */
+#include "h5test.h"
+
+const char *FILENAME[] = {
+ "unregister_filter_1",
+ "unregister_filter_2",
+ NULL
+};
+
+#define GROUP_NAME "group"
+#define DSET_NAME "dataset"
+#define FILENAME_BUF_SIZE 1024
+#define DSET_DIM1 100
+#define DSET_DIM2 200
+#define FILTER_CHUNK_DIM1 2
+#define FILTER_CHUNK_DIM2 25
+#define GROUP_ITERATION 1000
+
+#define H5Z_FILTER_DUMMY 312
+
+static size_t filter_dummy(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* Dummy filter for test_unregister_filters only */
+const H5Z_class2_t H5Z_DUMMY[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DUMMY, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dummy", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_dummy, /* The actual filter function */
+}};
+
+
+/*-------------------------------------------------------------------------
+ * Function: filter_dummy
+ *
+ * Purpose: A dummy compression method that doesn't do anything. This
+ * filter is only for test_unregister_filters. Please don't
+ * use it for other tests because it may mess up this test.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * April 24, 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+filter_dummy(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t UNUSED *buf_size, void UNUSED **buf)
+{
+ return nbytes;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_unregister_filters
+ *
+ * Purpose: Tests unregistering filter before closing the file
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 11 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_unregister_filters(hid_t my_fapl)
+{
+ hid_t file1, file2;
+ hid_t dc;
+ hid_t gcpl, gid, group;
+ hid_t dataset, space;
+ int i, j, n;
+ char gname[256];
+ char filename[FILENAME_BUF_SIZE];
+ const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
+ hsize_t dims[2];
+ int points[DSET_DIM1][DSET_DIM2];
+ herr_t ret;
+
+ TESTING("Unregistering filter");
+
+ /* Create first file */
+ h5_fixname(FILENAME[0], my_fapl, filename, sizeof filename);
+ if((file1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) goto error;
+
+ /* Create second file */
+ h5_fixname(FILENAME[1], my_fapl, filename, sizeof filename);
+ if((file2 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) goto error;
+
+ /* Register DUMMY filter */
+ if(H5Zregister(H5Z_DUMMY) < 0) goto error;
+
+ if(H5Zfilter_avail(H5Z_FILTER_DUMMY)!=TRUE) goto error;
+
+ if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto error;
+
+ /* Use DUMMY filter for creating groups */
+ if(H5Pset_filter (gcpl, H5Z_FILTER_DUMMY, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) goto error;
+
+ /* Create a group using this filter */
+ if((gid = H5Gcreate2(file1, GROUP_NAME, H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) goto error;
+
+ /* Create multiple groups under the main group */
+ for (i=0; i < GROUP_ITERATION; i++) {
+ sprintf(gname, "group_%d", i);
+ if((group = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(group) < 0) goto error;
+ }
+
+ if(H5Fflush(file1, H5F_SCOPE_GLOBAL) < 0) goto error;
+
+ /* Unregister the filter before closing the group. It should fail */
+ H5E_BEGIN_TRY {
+ ret = H5Zunregister(H5Z_FILTER_DUMMY);
+ } H5E_END_TRY;
+ if(ret>=0) {
+ H5_FAILED();
+ printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ goto error;
+ } /* end if */
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (gcpl) < 0) goto error;
+
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+
+ if(H5Pset_filter(dc, H5Z_FILTER_DUMMY, 0, (size_t)0, NULL) < 0) goto error;
+
+ /* Initialize the dataset */
+ for(i = n = 0; i < DSET_DIM1; i++)
+ for(j = 0; j < DSET_DIM2; j++)
+ points[i][j] = n++;
+
+ /* Create the data space */
+ dims[0] = DSET_DIM1;
+ dims[1] = DSET_DIM2;
+ if((space = H5Screate_simple(2, dims, NULL)) < 0) goto error;
+
+ /* Create a dataset in the first file */
+ if((dataset = H5Dcreate2(file1, DSET_NAME, H5T_NATIVE_INT, space,
+ H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
+
+ /* Write the data to the dataset */
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
+ goto error;
+
+ /* Unregister the filter before closing the dataset. It should fail */
+ H5E_BEGIN_TRY {
+ ret = H5Zunregister(H5Z_FILTER_DUMMY);
+ } H5E_END_TRY;
+ if(ret>=0) {
+ H5_FAILED();
+ printf(" Line %d: Should not be able to unregister filter\n", __LINE__);
+ goto error;
+ } /* end if */
+
+ if(H5Dclose(dataset) < 0) goto error;
+
+ /* Create a dataset in the second file */
+ if((dataset = H5Dcreate2(file2, DSET_NAME, H5T_NATIVE_INT, space,
+ H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
+
+ /* Write the data to the dataset */
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0) goto error;
+
+ /* Unregister the filter after closing all objects but before closing files.
+ * It should flush all files. */
+ if(H5Zunregister(H5Z_FILTER_DUMMY) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+ if(H5Fclose(file1) < 0) goto error;
+ if(H5Fclose(file2) < 0) goto error;
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests unregistering filter with H5Zunregister
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * 11 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fapl;
+ int nerrors = 0;
+
+ /* Testing setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Test unregistering filter in its own file */
+ nerrors += (test_unregister_filters(fapl) < 0 ? 1 : 0);
+
+ if(nerrors)
+ goto error;
+ printf("All filter unregistration tests passed.\n");
+ h5_cleanup(FILENAME, fapl);
+
+ return 0;
+
+error:
+ nerrors = MAX(1, nerrors);
+ printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n",
+ nerrors, 1 == nerrors ? "" : "S");
+ return 1;
+}
+
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 8f193cd..b0fea36 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -4218,125 +4218,6 @@ verify_writes(int num_writes,
/*****************************************************************************
*
- * Function: setup_noblock_dxpl_id()
- *
- * Purpose: Setup the noblock_dxpl_id global. Increment nerrors if
- * errors are detected. Do nothing if nerrors is non-zero
- * on entry.
- *
- * Return: void.
- *
- * Programmer: JRM -- 1/5/06
- *
- * Modifications:
- *
- * None.
- *
- *****************************************************************************/
-/* So far we haven't needed this, but that may change.
- * Keep it around for now
- */
-#if 0
-void
-setup_noblock_dxpl_id(void)
-{
- const char * fcn_name = "setup_noblock_dxpl_id()";
- H5P_genclass_t *xfer_pclass; /* Dataset transfer property list
- * class object
- */
- H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
- unsigned block_before_meta_write; /* "block before meta write"
- * property value
- */
- unsigned library_internal = 1; /* "library internal" property value */
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
-
- /* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g!=(-1));
-
- /* Get the dataset transfer property list class object */
- if ( ( nerrors == 0 ) &&
- ( NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)) ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't get property list class.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Get an ID for the non-blocking, collective H5AC dxpl */
- if ( ( nerrors == 0 ) &&
- ( (noblock_dxpl_id = H5P_create_id(xfer_pclass)) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't register property list.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Get the property list object */
- if ( ( nerrors == 0 ) &&
- ( NULL == (xfer_plist = H5I_object(H5AC_noblock_dxpl_id)) ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't get new property list object.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Insert 'block before metadata write' property */
- block_before_meta_write=0;
- if ( ( nerrors == 0 ) &&
- ( H5P_insert(xfer_plist, H5AC_BLOCK_BEFORE_META_WRITE_NAME,
- H5AC_BLOCK_BEFORE_META_WRITE_SIZE,
- &block_before_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout,
- "%d:%s: can't insert metadata cache dxpl property 1.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Insert 'library internal' property */
- if ( ( nerrors == 0 ) &&
- ( H5P_insert(xfer_plist, H5AC_LIBRARY_INTERNAL_NAME,
- H5AC_LIBRARY_INTERNAL_SIZE, &library_internal,
- NULL, NULL, NULL, NULL, NULL, NULL ) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout,
- "%d:%s: can't insert metadata cache dxpl property 2.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Set the transfer mode */
- xfer_mode = H5FD_MPIO_COLLECTIVE;
- if ( ( nerrors == 0 ) &&
- ( H5P_set(xfer_plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: unable to set value.\n", world_mpi_rank,
- fcn_name);
- }
- }
-
- return(success);
-
-} /* setup_noblock_dxpl_id() */
-#endif
-
-
-/*****************************************************************************
- *
* Function: setup_rand()
*
* Purpose: Use gettimeofday() to obtain a seed for rand(), print the
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 79a5555..743de3a 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -3620,7 +3620,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
VRFY((fapl_read >= 0), "create_faccess_plist() succeeded");
fid = H5Fopen (filename, H5F_ACC_RDONLY, fapl_read);
- dataset = H5Dopen (fid, DSET_NOCOLCAUSE, H5P_DEFAULT);
+ dataset = H5Dopen2 (fid, DSET_NOCOLCAUSE, H5P_DEFAULT);
/* Set collective I/O properties in the dxpl. */
ret = H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
@@ -4038,3 +4038,63 @@ dataset_atomicity(void)
VRFY((ret >= 0), "H5Fclose succeeded");
}
+
+/* Function: dense_attr_test
+ *
+ * Purpose: Test cases for writing dense attributes in parallel
+ *
+ * Programmer: Quincey Koziol
+ * Date: April, 2013
+ */
+void
+test_dense_attr(void)
+{
+ int mpi_size, mpi_rank;
+ hid_t fpid, fid;
+ hid_t gid, gpid;
+ hid_t atFileSpace, atid;
+ hsize_t atDims[1] = {10000};
+ herr_t status;
+
+ /* set up MPI parameters */
+ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
+
+ fpid = H5Pcreate(H5P_FILE_ACCESS);
+ VRFY((fpid > 0), "H5Pcreate succeeded");
+ status = H5Pset_libver_bounds(fpid, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+ VRFY((status >= 0), "H5Pset_libver_bounds succeeded");
+ status = H5Pset_fapl_mpio(fpid, MPI_COMM_WORLD, MPI_INFO_NULL);
+ VRFY((status >= 0), "H5Pset_fapl_mpio succeeded");
+ fid = H5Fcreate("ph5Dense.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fpid);
+ VRFY((fid > 0), "H5Fcreate succeeded");
+ status = H5Pclose(fpid);
+ VRFY((status >= 0), "H5Pclose succeeded");
+
+ gpid = H5Pcreate(H5P_GROUP_CREATE);
+ VRFY((gpid > 0), "H5Pcreate succeeded");
+ status = H5Pset_attr_phase_change(gpid, 0, 0);
+ VRFY((status >= 0), "H5Pset_attr_phase_change succeeded");
+ gid = H5Gcreate2(fid, "foo", H5P_DEFAULT, gpid, H5P_DEFAULT);
+ VRFY((gid > 0), "H5Gcreate2 succeeded");
+ status = H5Pclose(gpid);
+ VRFY((status >= 0), "H5Pclose succeeded");
+
+ atFileSpace = H5Screate_simple(1, atDims, NULL);
+ VRFY((atFileSpace > 0), "H5Screate_simple succeeded");
+ atid = H5Acreate2(gid, "bar", H5T_STD_U64LE, atFileSpace, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((atid > 0), "H5Acreate succeeded");
+ status = H5Sclose(atFileSpace);
+ VRFY((status >= 0), "H5Sclose succeeded");
+
+ status = H5Aclose(atid);
+ VRFY((status >= 0), "H5Aclose succeeded");
+
+ status = H5Gclose(gid);
+ VRFY((status >= 0), "H5Gclose succeeded");
+ status = H5Fclose(fid);
+ VRFY((status >= 0), "H5Fclose succeeded");
+
+ return;
+}
+
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 784892a..89230f1 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -532,6 +532,10 @@ int main(int argc, char **argv)
"dataset atomic updates", PARATESTFILE);
}
+ AddTest("denseattr", test_dense_attr, NULL,
+ "Store Dense Attributes", NULL);
+
+
/* Display testing information */
TestInfo(argv[0]);
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index fa83697..15ff884 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -289,6 +289,7 @@ void file_image_daisy_chain_test(void);
#ifdef H5_HAVE_FILTER_DEFLATE
void compress_readAll(void);
#endif /* H5_HAVE_FILTER_DEFLATE */
+void test_dense_attr(void);
/* commonly used prototypes */
hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs);
diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in
index d30d8d8..bec3bfc 100644
--- a/tools/h5copy/testh5copy.sh.in
+++ b/tools/h5copy/testh5copy.sh.in
@@ -513,7 +513,7 @@ COPY_REFERENCES()
TESTFILE="$TESTDIR/h5copy_ref.h5"
echo "Test copying object and region references"
- TOOLTEST_F -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
+ TOOLTEST -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
}
# Copy external links.
@@ -529,25 +529,25 @@ COPY_EXT_LINKS()
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link.out.h5 -s /group_ext/extlink_dset -d /copy1_dset
echo "Test copying external link directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
echo "Test copying dangling external link (no obj) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_noobj.out.h5 -s /group_ext/extlink_notyet1 -d /copy_dangle1_1
echo "Test copying dangling external link (no obj) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
echo "Test copying dangling external link (no file) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_nofile.out.h5 -s /group_ext/extlink_notyet2 -d /copy_dangle2_1
echo "Test copying dangling external link (no file) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
echo "Test copying a group contains external links without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link_group.out.h5 -s /group_ext -d /copy1_group
echo "Test copying a group contains external links with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
}
# Test misc.
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 3f39ae3..c7ebe63 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -906,6 +906,33 @@ IF (BUILD_TESTING)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
+ MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_ENV_VAR:STRING=${envvar}"
+ -D "TEST_ENV_VALUE:STRING=${envval}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
+
MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
# If using memchecker add tests without using scripts
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -1655,7 +1682,7 @@ IF (BUILD_TESTING)
ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
# test for error stack display (BZ2048)
- ADD_H5ERR_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5)
+ ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5)
# test for -o -y for dataset with attributes
ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o)
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 238eee9..ceefc08 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -38,6 +38,9 @@ DIRNAME='dirname'
LS='ls'
AWK='awk'
+# Skip plugin module to test missing filter
+ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
+
nerrors=0
verbose=yes
@@ -721,6 +724,70 @@ TOOLTEST4() {
}
+# same as TOOLTEST4 but disables plugin filter loading
+# silences extra error output on some platforms
+# ADD_H5ERR_MASK_TEST
+TOOLTEST5() {
+
+ expect="$TESTDIR/$1"
+ expect_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.oerr"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ #cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -1128,7 +1195,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5
+TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index fe11c26..f62c66f 100644
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -132,8 +132,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -350,20 +351,6 @@ if test "x$do_link" = "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
- # Any libraries in LDFLAGS or H5BLD_LDFLAGS also should have rpaths embedded
- # in the executables created by h5cc (reduces need for LD_LIBRARY_PATH).
- if test -n "$LDFLAGS"; then
- for entry in $LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
- if test -n "$H5BLD_LDFLAGS"; then
- for entry in $H5BLD_LDFLAGS; do
- extdir=`echo $entry | sed '/^-L/ s/^-L//'`
- shared_link="${shared_link} ${flag}${extdir}"
- done
- fi
fi
if test "x$USE_SHARED_LIB" != "xyes"; then
diff --git a/tools/misc/h5perf_gentest.c b/tools/misc/h5perf_gentest.c
index 6a080d0..6a080d0 100755..100644
--- a/tools/misc/h5perf_gentest.c
+++ b/tools/misc/h5perf_gentest.c
diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in
index ae79b70..6b6ef87 100644
--- a/tools/misc/h5redeploy.in
+++ b/tools/misc/h5redeploy.in
@@ -14,9 +14,10 @@
# access to either file, you may request a copy from help@hdfgroup.org.
#
-## Update HDF5 compiler tools after the HDF5 software has been installed
-## in a new location.
-## For help page, use "h5redeploy -help"
+## Update HDF5 compiler tools after the HDF5 software has been installed ##
+## in a new location. ##
+## For help page, use "h5redeploy -help" ##
+## ##
# Constants definitions
EXIT_SUCCESS=0
@@ -29,14 +30,20 @@ usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS]"
echo " OPTIONS:"
- echo " -help|help This help message"
- echo " -echo Show all the shell commands executed"
- echo " -force No prompt, just do it"
- echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
- echo " subdirectories [default: current directory]"
- echo " -tool=TOOL Tool to update. TOOL must be in the current"
- echo " directory and writable. [default: $h5tools]"
- echo " -show Show the commands without executing them"
+ echo " -help|help This help message"
+ echo " -echo Show all the shell commands executed"
+ echo " -force No prompt, just do it"
+ echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
+ echo " subdirectories [default: current directory]"
+ echo " -exec-prefix=DIR New directory to find HDF5 lib/"
+ echo " subdirectory [default: <prefix>]"
+ echo " -libdir=DIR New directory for the HDF5 lib directory"
+ echo " [default: <exec-prefix>/lib]"
+ echo " -includedir=DIR New directory for the HDF5 header files"
+ echo " [default: <prefix>/include]"
+ echo " -tool=TOOL Tool to update. TOOL must be in the current"
+ echo " directory and writable. [default: $h5tools]"
+ echo " -show Show the commands without executing them"
echo " "
exit $EXIT_FAILURE
}
@@ -70,17 +77,38 @@ ERROR()
# Main
#
+############################################################################
+## Installation directories: ##
+## prefix architecture-independent files. ##
+## exec_prefix architecture-dependent files, default is <prefix>. ##
+## libdir libraries, default is <exec_prefix>/lib. ##
+## includedir header files, default is <prefix/include>. ##
+## Not used here: ##
+## bindir executables, <exec_prefix/bin>. ##
+############################################################################
# Initialization
h5tools="h5cc h5pcc h5fc h5pfc h5c++" # possible hdf5 tools
foundtools= # tools found and will be modified
fmode= # force mode, default is off
-prefix=`(cd ..;pwd)`
+prefix=
+exec_prefix=
+libdir=
+includedir=
# Parse options
for arg in $@ ; do
case "$arg" in
-prefix=*)
- prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+ prefix="`echo $arg | cut -f2 -d=`"
+ ;;
+ -exec-prefix=*)
+ exec_prefix="`echo $arg | cut -f2 -d=`"
+ ;;
+ -libdir=*)
+ libdir="`echo $arg | cut -f2 -d=`"
+ ;;
+ -includedir=*)
+ includedir="`echo $arg | cut -f2 -d=`"
;;
-echo)
set -x
@@ -89,7 +117,7 @@ for arg in $@ ; do
SHOW="echo"
;;
-tool=*)
- h5tools="`expr "$arg" : '-tool=\(.*\)'`"
+ h5tools="`echo $arg | cut -f2 -d=`"
;;
-help|help)
usage
@@ -105,10 +133,18 @@ for arg in $@ ; do
esac
done
-# Sanity checks
-if [ ! -d $prefix ]; then
- ERROR "prefix($prefix) is not an existing directory"
- exit $EXIT_FAILURE
+# Set to default value, one above where i am, if not given by user
+if [ -z "$prefix" ]; then
+ prefix=`(cd ..;pwd)`
+fi
+if [ -z "$exec_prefix" ]; then
+ exec_prefix='${prefix}' # use single quotes to prevent expansion of $
+fi
+if [ -z "$libdir" ]; then
+ libdir='${exec_prefix}'/lib # use single quotes to prevent expansion of $
+fi
+if [ -z "$includedir" ]; then
+ includedir='${prefix}'/include # use single quotes to prevent expansion of $
fi
for x in $h5tools; do
@@ -144,10 +180,19 @@ fi
CMDFILE=/tmp/h5redeploy.$$
touch $CMDFILE
chmod 0600 $CMDFILE
-echo "/^prefix/c" >> $CMDFILE
-echo prefix=\""$prefix"\" >> $CMDFILE
-echo . >> $CMDFILE
-(echo w; echo q) >> $CMDFILE
+echo "/^prefix=/c" >> $CMDFILE
+echo prefix=\""$prefix"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^exec_prefix=/c" >> $CMDFILE
+echo exec_prefix=\""$exec_prefix"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^libdir=/c" >> $CMDFILE
+echo libdir=\""$libdir"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^includedir=/c" >> $CMDFILE
+echo includedir=\""$includedir"\" >> $CMDFILE
+echo . >> $CMDFILE
+(echo w; echo q) >> $CMDFILE
# Update them
@@ -171,10 +216,3 @@ done
# Cleanup
rm -f $CMDFILE
exit $EXIT_SUCCESS
-
-# Some possible future features to add
-# CCBASE - Name of the alternative C compiler
-# CLINKERBASE - Name of the alternative linker
-# LDFLAGS - Path to different libraries your application will link with
-# (this path should include the path to the zlib library)
-# LIBS - Libraries your application will link with
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index 5fef009..a112ad1 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -505,7 +505,7 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.149"
+#define H5_PACKAGE_STRING "HDF5 1.9.151"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
@@ -514,7 +514,7 @@
#define H5_PACKAGE_URL ""
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.149"
+#define H5_PACKAGE_VERSION "1.9.151"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -677,7 +677,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.149"
+#define H5_VERSION "1.9.151"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */