summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt185
-rw-r--r--MANIFEST2
-rwxr-xr-xMakefile.am2
-rw-r--r--Makefile.in22
-rw-r--r--README.txt2
-rw-r--r--c++/Makefile.in20
-rw-r--r--c++/examples/Makefile.am3
-rw-r--r--c++/examples/Makefile.in26
-rwxr-xr-xc++/examples/run-c++-ex.sh.in3
-rw-r--r--c++/src/Makefile.in22
-rwxr-xr-xc++/src/h5c++.in64
-rw-r--r--c++/test/Makefile.in20
-rw-r--r--config/apple21
-rwxr-xr-xconfig/cmake/CTestCustom.cmake38
-rwxr-xr-xconfig/cmake/CTestCustom.ctest19
-rw-r--r--config/cmake/ConfigureChecks.cmake231
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/cmake/runTest.cmake2
-rw-r--r--config/cmake/vfdTest.cmake4
-rw-r--r--config/cmake/xlatefile.c4
-rw-r--r--config/commence.am20
-rw-r--r--config/examples.am3
-rw-r--r--config/intel-flags14
-rw-r--r--config/lt_vers.am2
-rwxr-xr-xconfigure22
-rw-r--r--configure.in2
-rw-r--r--examples/Makefile.am5
-rw-r--r--examples/Makefile.in28
-rwxr-xr-xexamples/run-all-ex.sh18
-rwxr-xr-xexamples/run-c-ex.sh.in3
-rw-r--r--fortran/Makefile.in20
-rw-r--r--fortran/examples/CMakeLists.txt8
-rw-r--r--fortran/examples/Makefile.am3
-rw-r--r--fortran/examples/Makefile.in26
-rwxr-xr-xfortran/examples/run-fortran-ex.sh.in3
-rw-r--r--fortran/src/CMakeLists.txt44
-rw-r--r--fortran/src/Makefile.in22
-rwxr-xr-xfortran/src/h5fc.in64
-rw-r--r--fortran/test/CMakeLists.txt36
-rw-r--r--fortran/test/Makefile.in20
-rw-r--r--fortran/testpar/CMakeLists.txt8
-rw-r--r--fortran/testpar/Makefile.in20
-rwxr-xr-xhl/Makefile.in20
-rw-r--r--hl/c++/Makefile.in20
-rw-r--r--hl/c++/examples/Makefile.am3
-rw-r--r--hl/c++/examples/Makefile.in26
-rwxr-xr-xhl/c++/examples/run-hlc++-ex.sh.in4
-rw-r--r--hl/c++/src/Makefile.in22
-rw-r--r--hl/c++/test/Makefile.in20
-rw-r--r--hl/examples/Makefile.am5
-rw-r--r--hl/examples/Makefile.in28
-rwxr-xr-xhl/examples/run-hl-ex.sh12
-rwxr-xr-xhl/examples/run-hlc-ex.sh.in3
-rw-r--r--hl/fortran/Makefile.in20
-rw-r--r--hl/fortran/examples/Makefile.am3
-rw-r--r--hl/fortran/examples/Makefile.in26
-rwxr-xr-xhl/fortran/examples/run-hlfortran-ex.sh.in3
-rw-r--r--hl/fortran/src/CMakeLists.txt8
-rw-r--r--hl/fortran/src/Makefile.in22
-rw-r--r--hl/fortran/test/CMakeLists.txt14
-rw-r--r--hl/fortran/test/Makefile.in20
-rw-r--r--hl/src/Makefile.in22
-rw-r--r--hl/test/CMakeLists.txt27
-rw-r--r--hl/test/Makefile.in20
-rw-r--r--hl/tools/Makefile.in20
-rw-r--r--hl/tools/gif2h5/Makefile.in20
-rw-r--r--perform/CMakeLists.txt15
-rw-r--r--perform/Makefile.in20
-rw-r--r--release_docs/RELEASE.txt27
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/H5.c9
-rw-r--r--src/H5C.c2
-rw-r--r--src/H5Dchunk.c137
-rw-r--r--src/H5Dcontig.c973
-rw-r--r--src/H5Defl.c212
-rw-r--r--src/H5Dpkg.h8
-rw-r--r--src/H5E.c3
-rw-r--r--src/H5Faccum.c15
-rw-r--r--src/H5Shyper.c991
-rw-r--r--src/H5V.c403
-rw-r--r--src/H5Vprivate.h11
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in22
-rw-r--r--test/CMakeLists.txt73
-rw-r--r--test/Makefile.in20
-rw-r--r--test/dt_arith.c2
-rw-r--r--test/dtransform.c18
-rw-r--r--test/enum.c6
-rw-r--r--test/err_compat.c3
-rw-r--r--test/error_test.c7
-rw-r--r--test/filter_fail.c89
-rw-r--r--test/flush2.c35
-rw-r--r--test/h5test.c6
-rw-r--r--test/testframe.c6
-rw-r--r--test/ttsafe_error.c20
-rw-r--r--testpar/Makefile.in20
-rw-r--r--tools/Makefile.in20
-rw-r--r--tools/h5copy/CMakeLists.txt13
-rw-r--r--tools/h5copy/Makefile.in20
-rw-r--r--tools/h5diff/CMakeLists.txt348
-rw-r--r--tools/h5diff/Makefile.in20
-rw-r--r--tools/h5diff/h5diff_common.c24
-rw-r--r--tools/h5diff/testfiles/h5diff_10.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_600.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_603.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_606.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_612.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_615.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_621.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_622.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_623.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_624.txt24
-rwxr-xr-xtools/h5diff/testh5diff.sh4
-rw-r--r--tools/h5dump/CMakeLists.txt388
-rw-r--r--tools/h5dump/Makefile.in20
-rw-r--r--tools/h5dump/h5dump.c18
-rw-r--r--tools/h5import/CMakeLists.txt16
-rwxr-xr-xtools/h5import/Makefile.in20
-rw-r--r--tools/h5jam/Makefile.in20
-rw-r--r--tools/h5jam/h5jam.c11
-rw-r--r--tools/h5jam/h5unjam.c11
-rw-r--r--tools/h5jam/tellub.c11
-rw-r--r--tools/h5ls/CMakeLists.txt105
-rw-r--r--tools/h5ls/Makefile.in20
-rw-r--r--tools/h5ls/h5ls.c6
-rw-r--r--tools/h5repack/CMakeLists.txt66
-rw-r--r--tools/h5repack/Makefile.in20
-rw-r--r--tools/h5stat/CMakeLists.txt35
-rw-r--r--tools/h5stat/Makefile.in20
-rw-r--r--tools/h5stat/h5stat.c6
-rw-r--r--tools/lib/Makefile.in20
-rw-r--r--tools/misc/CMakeLists.txt26
-rw-r--r--tools/misc/Makefile.in20
-rwxr-xr-xtools/misc/h5cc.in73
-rw-r--r--tools/misc/h5mkgrp.c7
-rw-r--r--vms/src/h5pubconf.h6
-rwxr-xr-xwindows/src/H5pubconf.h6
137 files changed, 4365 insertions, 1909 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d38b98c..2dfe014 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -222,9 +222,9 @@ INCLUDE (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake)
#-----------------------------------------------------------------------------
# Option to use legacy naming for windows libs/programs, default is legacy
#-----------------------------------------------------------------------------
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
OPTION (H5_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" ON)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to Build Shared/Static libs, default is static
@@ -276,6 +276,14 @@ IF (HDF5_ENABLE_COVERAGE)
ENDIF (HDF5_ENABLE_COVERAGE)
#-----------------------------------------------------------------------------
+# Option to indicate using a memory checker
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
+IF (HDF5_ENABLE_USING_MEMCHECKER)
+ SET (H5_USING_MEMCHECKER 1)
+ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+#-----------------------------------------------------------------------------
# When building utility executables that generate other (source) files :
# we make use of the following variables defined in the root CMakeLists.
# Certain systems may add /Debug or /Release to output paths
@@ -284,8 +292,10 @@ ENDIF (HDF5_ENABLE_COVERAGE)
SET (EXE_EXT "")
IF (WIN32)
SET (EXE_EXT ".exe")
- ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1)
- ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
+ IF (NOT CYGWIN)
+ ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1)
+ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
+ ENDIF (NOT CYGWIN)
ENDIF (WIN32)
SET (MAKE_SYSTEM)
@@ -345,9 +355,9 @@ IF (HDF5_DISABLE_COMPILER_WARNINGS)
CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
ENDIF (MSVC)
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
# Borland uses -w- to suppress warnings.
IF (BORLAND)
SET (HDF5_WARNINGS_BLOCKED 1)
@@ -433,20 +443,78 @@ HDF5_SETUP_FILTERS (FLETCHER32)
HDF5_SETUP_FILTERS (NBIT)
HDF5_SETUP_FILTERS (SCALEOFFSET)
+INCLUDE (ExternalProject)
+OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO")
+IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ IF (NOT ZLIB_SVN_URL)
+ SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk")
+ ENDIF (NOT ZLIB_SVN_URL)
+ IF (NOT SZIP_SVN_URL)
+ SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk")
+ ENDIF (NOT SZIP_SVN_URL)
+ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
IF (HDF5_ENABLE_Z_LIB_SUPPORT)
IF (NOT H5_ZLIB_HEADER)
- FIND_PACKAGE (ZLIB REQUIRED)
+ FIND_PACKAGE (ZLIB)
IF (ZLIB_FOUND)
SET (H5_HAVE_FILTER_DEFLATE 1)
SET (H5_HAVE_ZLIB_H 1)
SET (H5_HAVE_LIBZ 1)
SET (H5_ZLIB_HEADER "zlib.h")
ELSE (ZLIB_FOUND)
- MESSAGE (FATAL " ZLib is Required for ZLib support in HDF5")
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ EXTERNALPROJECT_ADD (ZLIB
+ SVN_REPOSITORY ${ZLIB_SVN_URL}
+ # [SVN_REVISION rev]
+ INSTALL_COMMAND ""
+ CMAKE_ARGS
+ -DBLDTYPE:STRING="Release"
+ -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ )
+ EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR)
+
+ IF (BUILD_SHARED_LIBS)
+ IF (WIN32 AND NOT MINGW)
+ SET (ZLIB_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+ )
+ ELSE (WIN32 AND NOT MINGW)
+ SET (ZLIB_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ )
+ ENDIF (WIN32 AND NOT MINGW)
+ ELSE (BUILD_SHARED_LIBS)
+ IF (WIN32 AND NOT MINGW)
+ SET (ZLIB_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/zlib${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ )
+ ELSE (WIN32 AND NOT MINGW)
+ SET (ZLIB_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libz${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ )
+ ENDIF (WIN32 AND NOT MINGW)
+ ENDIF (BUILD_SHARED_LIBS)
+ SET (ZLIB_INCLUDE_DIR_GEN
+ "${BINARY_DIR}"
+ )
+ SET (ZLIB_INCLUDE_DIR
+ "${SOURCE_DIR}/src"
+ )
+
+ SET (ZLIB_FOUND 1)
+ SET (ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+ SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
+ SET (H5_HAVE_FILTER_DEFLATE 1)
+ SET (H5_HAVE_ZLIB_H 1)
+ SET (H5_HAVE_LIBZ 1)
+ ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ MESSAGE (FATAL " ZLib is Required for ZLib support in HDF5")
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
ENDIF (ZLIB_FOUND)
ELSE (NOT H5_ZLIB_HEADER)
# This project is being called from within another and ZLib is already configured
@@ -465,29 +533,70 @@ ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT)
SET (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
IF (HDF5_ENABLE_SZIP_SUPPORT)
- FIND_PACKAGE (SZIP REQUIRED)
+ OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
+ FIND_PACKAGE (SZIP)
IF (SZIP_FOUND)
SET (H5_HAVE_FILTER_SZIP 1)
SET (H5_HAVE_SZLIB_H 1)
SET (H5_HAVE_LIBSZ 1)
- SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
-# MESSAGE (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
-# MESSAGE (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
- MESSAGE (STATUS "Filter SZIP is ON")
- OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (H5_HAVE_SZIP_ENCODER 1)
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
ELSE (SZIP_FOUND)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ EXTERNALPROJECT_ADD (SZIP
+ SVN_REPOSITORY ${SZIP_SVN_URL}
+ # [SVN_REVISION rev]
+ INSTALL_COMMAND ""
+ CMAKE_ARGS
+ -DBLDTYPE:STRING="Release"
+ -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DSZIP_ENABLE_ENCODING:BOOL=${HDF5_ENABLE_SZIP_ENCODING}
+ )
+ EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR)
+
+
+ IF (BUILD_SHARED_LIBS)
+ IF (WIN32 AND NOT MINGW)
+ SET (SZIP_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+ )
+ ELSE (WIN32 AND NOT MINGW)
+ SET (SZIP_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ )
+ ENDIF (WIN32 AND NOT MINGW)
+ ELSE (BUILD_SHARED_LIBS)
+ SET (SZIP_LIBRARY
+ "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libszip${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ )
+ ENDIF (BUILD_SHARED_LIBS)
+ SET (SZIP_INCLUDE_DIR_GEN
+ "${BINARY_DIR}"
+ )
+ SET (SZIP_INCLUDE_DIR
+ "${SOURCE_DIR}/src"
+ )
+
+ SET (SZIP_FOUND 1)
+ SET (SZIP_LIBRARIES ${SZIP_LIBRARY})
+ SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
+ SET (H5_HAVE_FILTER_SZIP 1)
+ SET (H5_HAVE_SZLIB_H 1)
+ SET (H5_HAVE_LIBSZ 1)
+ ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
ENDIF (SZIP_FOUND)
+ SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
+ INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
+ MESSAGE (STATUS "Filter SZIP is ON")
+ IF (HDF5_ENABLE_SZIP_ENCODING)
+ SET (H5_HAVE_SZIP_ENCODER 1)
+ ENDIF (HDF5_ENABLE_SZIP_ENCODING)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
#-----------------------------------------------------------------------------
# Option for external libraries on windows
#-----------------------------------------------------------------------------
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
IF (BUILD_SHARED_LIBS)
FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE})
@@ -498,9 +607,12 @@ IF (WIN32)
GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH)
# MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}")
ADD_CUSTOM_TARGET (ZLIB-Release-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
- COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}.dll to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
+ COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ ADD_DEPENDENCIES (${ZLIB-Release-Copy} ZLIB)
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
@@ -509,25 +621,28 @@ IF (WIN32)
GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH)
# MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}")
ADD_CUSTOM_TARGET (SZIP-Release-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
- COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}.dll to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
+ COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ ADD_DEPENDENCIES (${SZIP-Release-Copy} SZIP)
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
ENDIF (BUILD_SHARED_LIBS)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to use threadsafe
# Note: Currently CMake only allows configuring of threadsafe on WINDOWS.
#-----------------------------------------------------------------------------
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
OPTION (HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF)
IF (HDF5_ENABLE_THREADSAFE)
SET (H5_HAVE_WIN_THREADS 1)
SET (H5_HAVE_THREADSAFE 1)
ENDIF (HDF5_ENABLE_THREADSAFE)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to use PACKED BITS SUPPORT
@@ -543,6 +658,15 @@ ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
#-----------------------------------------------------------------------------
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
+IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ IF (ZLIB_FOUND)
+ ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB)
+ ENDIF (ZLIB_FOUND)
+ IF (SZIP_FOUND)
+ ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP)
+ ENDIF (SZIP_FOUND)
+ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+
#-----------------------------------------------------------------------------
# Build utility to copy and strip X lines of file
#-----------------------------------------------------------------------------
@@ -577,6 +701,7 @@ IF (BUILD_TESTING)
ENDIF (H5_HAVE_PARALLEL)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
INCLUDE (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
ENDIF (BUILD_TESTING)
#-----------------------------------------------------------------------------
@@ -664,7 +789,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
IF (HDF5_PACKAGE_EXTLIBS)
IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
INSTALL (
- FILES ${ZLIB_INCLUDE_DIR}/zconf.h ${ZLIB_INCLUDE_DIR}/zlib.h
+ FILES ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${ZLIB_INCLUDE_DIR}/zlib.h
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
@@ -679,7 +804,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH)
# message(STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}")
INSTALL(
- FILES ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}.dll
+ FILES ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${HDF5_INSTALL_BIN_DIR}
COMPONENT libraries
)
@@ -687,7 +812,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
INSTALL (
- FILES ${SZIP_INCLUDE_DIR}/SZconfig.h ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h
+ FILES ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
@@ -702,7 +827,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH)
# message(STATUS "SZIP_BIN_PATH: ${ZLIB_BIN_PATH}")
INSTALL(
- FILES ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}.dll
+ FILES ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${HDF5_INSTALL_BIN_DIR}
COMPONENT libraries
)
diff --git a/MANIFEST b/MANIFEST
index c8b4156..588399c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1945,7 +1945,7 @@
./config/cmake/grepTest.cmake
./config/cmake/runTest.cmake
./config/cmake/vfdTest.cmake
-./config/cmake/CTestCustom.ctest
+./config/cmake/CTestCustom.cmake
./config/cmake/ConfigureChecks.cmake
./CMakeLists.txt
./CTestConfig.cmake
diff --git a/Makefile.am b/Makefile.am
index 179fb17..640fdcb 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -153,7 +153,7 @@ uninstall-doc:
# be successfully built
installcheck-local:
if test -n "${DESTDIR}"; then \
- (cd ${DESTDIR}/$(bindir) && pwd && ./h5redeploy -force); \
+ (cd ${DESTDIR}$(bindir) && pwd && ./h5redeploy -force); \
fi
@(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
diff --git a/Makefile.in b/Makefile.in
index 79ed47e..74fa836 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -375,14 +375,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -978,7 +988,7 @@ uninstall-doc:
# be successfully built
installcheck-local:
if test -n "${DESTDIR}"; then \
- (cd ${DESTDIR}/$(bindir) && pwd && ./h5redeploy -force); \
+ (cd ${DESTDIR}$(bindir) && pwd && ./h5redeploy -force); \
fi
@(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
diff --git a/README.txt b/README.txt
index b52a12a..487807f 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.75 currently under development
+HDF5 version 1.9.77 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/c++/Makefile.in b/c++/Makefile.in
index c4af5a4..728a487 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -348,14 +348,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am
index 8a6a1d6..dc2bc7c 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -39,7 +39,8 @@ chunks.chkexe_: extend_ds.chkexe_
CXX_API=yes
# Where to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index 886a82a..6f56fde 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -315,14 +315,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -349,7 +359,8 @@ INSTALL_SCRIPT_FILES = run-c++-ex.sh
CXX_API = yes
# Where to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -617,7 +628,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in
index 79a4ccf..bd7106e 100755
--- a/c++/examples/run-c++-ex.sh.in
+++ b/c++/examples/run-c++-ex.sh.in
@@ -33,7 +33,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
AR="@AR@"
RANLIB="@RANLIB@"
H5TOOL="h5c++" # The tool name
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index eadd598..70d71db 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -370,14 +370,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -392,7 +402,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 = 65
+LT_VERS_REVISION = 67
LT_VERS_AGE = 0
# Include src directory
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 4e51c94..39d3d2a 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -32,6 +32,25 @@ HL="@HL@"
############################################################################
## ##
+## Things You Can Modify to Override HDF5 Library Build Components: ##
+## ##
+## (Advanced usage - know what you're doing - you're on your own here.) ##
+## The four variables below can be used to insert paths and flags in ##
+## CPPFLAGS, CXXFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ##
+## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
+## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ##
+## ##
+## These settings can be overriden by setting HDF5_CXXFLAGS, ##
+## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
+## ##
+############################################################################
+CXXFLAGSBASE=""
+CPPFLAGSBASE=""
+LDFLAGSBASE=""
+LIBSBASE=""
+
+############################################################################
+## ##
## You shouldn't have to modify anything below this line. ##
## ##
############################################################################
@@ -60,13 +79,26 @@ get_output_file="no"
SHOW="eval"
CXXBASE="@CXX@"
CXXLINKERBASE="@CXX@"
-CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
-CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
-LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
-LIBS="@LIBS@"
+
+# CXXFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user.
+# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
+
+# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
+H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
+H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
+H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
+H5BLD_LIBS="@LIBS@"
CXX="${HDF5_CXX:-$CXXBASE}"
CXXLINKER="${HDF5_CLINKER:-$CXXLINKERBASE}"
+CXXFLAGS="${HDF5_CXXFLAGS:-$CXXFLAGSBASE}"
+CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
+LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
+LIBS="${HDF5_LIBS:-$LIBSBASE}"
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
@@ -94,6 +126,18 @@ usage() {
echo " "
echo " HDF5_CXX - use a different C++ compiler"
echo " HDF5_CXXLINKER - use a different linker"
+ echo " You can also add or change paths and flags to the compile line using"
+ echo " the following environment varibles or by assigning them to their counterparts"
+ echo " in the 'Things You Can Modify to Override...'" section of $prog_name
+ echo " "
+ echo " Variable Current value to be replaced"
+ echo " HDF5_CPPFLAGS \"$CPPFLAGSBASE\""
+ echo " HDF5_CXXFLAGS \"$CXXFLAGSBASE\""
+ echo " HDF5_LDFLAGS \"$LDFLAGSBASE\""
+ echo " HDF5_LIBS \"$LIBSBASE\""
+ echo " "
+ echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version"
+ echo " is located may link your program with that other hdf5 library version."
echo " "
exit $EXIT_FAILURE
}
@@ -244,7 +288,7 @@ if test "x$do_compile" = "xyes"; then
compile_args="-c $compile_args"
fi
- $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $compile_args
+ $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $compile_args
status=$?
if test "$status" != "0"; then
@@ -319,9 +363,15 @@ if test "x$do_link" = "xyes"; then
# The LIBS are just a bunch of -l* libraries necessary for the HDF5
# module. It's okay if they're included twice in the compile line.
- link_args="$link_args $LIBS"
+ link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
+
+ # User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
- $SHOW $CXXLINKER $CPPFLAGS $CXXFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS
+ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index b41f44a..5a3f52c 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -337,14 +337,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/config/apple b/config/apple
index 10674fb..babcdad 100644
--- a/config/apple
+++ b/config/apple
@@ -62,6 +62,11 @@ case $CC in
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;
+ *icc*)
+ cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+
*)
echo "No match to get cc_version_info for $CC"
;;
@@ -72,6 +77,16 @@ case $FC in
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;
+
+ *ifc*|*ifort*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+
+ *)
+ echo "No match to get fc_version_info for $FC"
+ ;;
+
esac
# get c++ version info
@@ -80,6 +95,12 @@ case $CXX in
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;
+
+ *icpc*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+
*)
echo "No match to get cxx_version_info for $CXX"
;;
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
new file mode 100755
index 0000000..e0a3f3f
--- /dev/null
+++ b/config/cmake/CTestCustom.cmake
@@ -0,0 +1,38 @@
+SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
+
+SET (CTEST_CUSTOM_WARNING_EXCEPTION
+ ${CTEST_CUSTOM_WARNING_EXCEPTION}
+ "H5detect.c.[0-9]+.[ ]*: warning C4090:"
+ "testhdf5.h.[0-9]+.[ ]*: warning C4005:"
+ "POSIX name for this item is deprecated"
+ "disabling jobserver mode"
+)
+
+SET (CTEST_CUSTOM_MEMCHECK_IGNORE
+ ${CTEST_CUSTOM_MEMCHECK_IGNORE}
+ h5test-clear-objects
+ h5perform-clear-objects
+ hl_test-clear-objects
+ hl_fortran_test-clear-objects
+ H5DIFF-clearall-objects
+ H5LS-clearall-objects
+ h5repart_20K-clear-objects
+ h5repart_5K-clear-objects
+ h5repart_sec2-clear-objects
+ H5IMPORT-clear-objects
+ H5REPACK-clearall-objects
+ H5COPY-clearall-objects
+ H5STAT-clearall-objects
+ H5DUMP-clearall-objects
+ H5DUMP-clear-out1
+ H5DUMP-clear-out3
+ H5DUMP-clear-objects
+ H5DUMP_PACKED_BITS-clearall-objects
+ H5DUMP-XML-clearall-objects
+ H5DUMP*
+ H5DIFF*
+ H5REPACK*
+ H5STAT*
+ H5COPY*
+ H5LS*
+)
diff --git a/config/cmake/CTestCustom.ctest b/config/cmake/CTestCustom.ctest
deleted file mode 100755
index acb1918..0000000
--- a/config/cmake/CTestCustom.ctest
+++ /dev/null
@@ -1,19 +0,0 @@
-SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
-
-SET (CTEST_CUSTOM_WARNING_EXCEPTION
- ${CTEST_CUSTOM_WARNING_EXCEPTION}
- "H5detect.c.[0-9]+.[ ]*: warning C4090:"
- "testhdf5.h.[0-9]+.[ ]*: warning C4005:"
- "POSIX name for this item is deprecated"
- "disabling jobserver mode"
-)
-
-SET (CTEST_CUSTOM_MEMCHECK_IGNORE
- ${CTEST_CUSTOM_MEMCHECK_IGNORE}
- H5DUMP
- H5DIFF
- H5REPACK
- H5STAT
- H5COPY
- H5LS
-)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index b5b1170..cad3870 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -100,21 +100,48 @@ IF (HDF5_ENABLE_CODESTACK)
ENDIF (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
-#IF (WIN32)
-# SET (DEFAULT_STREAM_VFD OFF)
-#ELSE (WIN32)
-# SET (DEFAULT_STREAM_VFD ON)
-#ENDIF (WIN32)
-#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
OPTION (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
+# ----------------------------------------------------------------------
+# Set the flag to indicate that the machine can handle converting
+# floating-point to long long values.
+# (This flag should be _unset_ for all machines)
+#
+# SET (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
+
+# so far we have no check for this
+SET(H5_HAVE_TMPFILE 1)
+
+#-----------------------------------------------------------------------------
+# This MACRO checks IF the symbol exists in the library and IF it
+# does, it appends library to the list.
+#-----------------------------------------------------------------------------
+SET (LINK_LIBS "")
+MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
+ CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
+ IF (${VARIABLE})
+ SET (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
+ ENDIF (${VARIABLE})
+ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
+
+# ----------------------------------------------------------------------
+# WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+
SET (WINDOWS)
IF (WIN32)
- IF (NOT UNIX)
+ IF (NOT UNIX AND NOT CYGWIN)
SET (WINDOWS 1)
- ENDIF (NOT UNIX)
+ ENDIF (NOT UNIX AND NOT CYGWIN)
ENDIF (WIN32)
+#IF (WIN32)
+# SET (DEFAULT_STREAM_VFD OFF)
+#ELSE (WIN32)
+# SET (DEFAULT_STREAM_VFD ON)
+#ENDIF (WIN32)
+#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
+
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
@@ -134,36 +161,50 @@ ELSE (WINDOWS)
SET (H5_DEFAULT_VFD H5FD_SEC2)
ENDIF (WINDOWS)
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can handle converting
-# floating-point to long long values.
-# (This flag should be _unset_ for all machines)
-#
-# SET (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
-
-# so far we have no check for this
-SET(H5_HAVE_TMPFILE 1)
+IF (WINDOWS)
+ SET (H5_HAVE_IO_H 1)
+ SET (H5_HAVE_SETJMP_H 1)
+ SET (H5_HAVE_STDDEF_H 1)
+ SET (H5_HAVE_SYS_STAT_H 1)
+ SET (H5_HAVE_SYS_TIMEB_H 1)
+ SET (H5_HAVE_SYS_TYPES_H 1)
+ SET (H5_HAVE_WINSOCK_H 1)
+ SET (H5_HAVE_LIBM 1)
+ SET (H5_HAVE_STRDUP 1)
+ SET (H5_HAVE_SYSTEM 1)
+ SET (H5_HAVE_DIFFTIME 1)
+ SET (H5_HAVE_LONGJMP 1)
+ SET (H5_STDC_HEADERS 1)
+ SET (H5_HAVE_GETHOSTNAME 1)
+ SET (H5_HAVE_TIMEZONE 1)
+ SET (H5_HAVE_FUNCTION 1)
+ SET (H5_LONE_COLON 0)
+ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
-# This MACRO checks IF the symbol exists in the library and IF it
-# does, it appends library to the list.
-#-----------------------------------------------------------------------------
-SET (LINK_LIBS "")
-MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
- CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
- IF (${VARIABLE})
- SET (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
- ENDIF (${VARIABLE})
-ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
+# These tests need to be manually SET for windows since there is currently
+# something not quite correct with the actual test implementation. This affects
+# the 'dt_arith' test and most likely lots of other code
+# ----------------------------------------------------------------------------
+IF (WINDOWS)
+ SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
+ENDIF (WINDOWS)
+
+# ----------------------------------------------------------------------
+# END of WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+
+IF (CYGWIN)
+ SET (H5_HAVE_LSEEK64 0)
+ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Check for the math library "m"
#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_LIBM 1)
-ELSE (WINDOWS)
+IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" printf H5_HAVE_LIBM)
-ENDIF (WINDOWS)
+ENDIF (NOT WINDOWS)
+
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" printf H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" printf H5_HAVE_LIBWSOCK32)
#CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
@@ -189,19 +230,6 @@ MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
#-----------------------------------------------------------------------------
-# If we are on Windows we know some of the answers to these tests already
-#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_IO_H 1)
- SET (H5_HAVE_SETJMP_H 1)
- SET (H5_HAVE_STDDEF_H 1)
- SET (H5_HAVE_SYS_STAT_H 1)
- SET (H5_HAVE_SYS_TIMEB_H 1)
- SET (H5_HAVE_SYS_TYPES_H 1)
- SET (H5_HAVE_WINSOCK_H 1)
-ENDIF (WINDOWS)
-
-#-----------------------------------------------------------------------------
# Check for the existence of certain header files
#-----------------------------------------------------------------------------
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" H5_HAVE_GLOBUS_COMMON_H)
@@ -235,9 +263,11 @@ CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
+IF (NOT CYGWIN)
+ CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
+ENDIF (NOT CYGWIN)
# IF the c compiler found stdint, check the C++ as well. On some systems this
# file will be found by C but not C++, only do this test IF the C++ compiler
@@ -286,7 +316,6 @@ MACRO (H5_CHECK_TYPE_SIZE type var)
ENDMACRO (H5_CHECK_TYPE_SIZE)
-
H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
@@ -346,15 +375,7 @@ SET (CMAKE_REQUIRED_LIBRARIES ${LINK_LIBS})
#-----------------------------------------------------------------------------
# Check for some functions that are used
-IF (WINDOWS)
- SET (H5_HAVE_STRDUP 1)
- SET (H5_HAVE_SYSTEM 1)
- SET (H5_HAVE_DIFFTIME 1)
- SET (H5_HAVE_LONGJMP 1)
- SET (H5_STDC_HEADERS 1)
- SET (H5_HAVE_GETHOSTNAME 1)
-ENDIF (WINDOWS)
-
+#
CHECK_FUNCTION_EXISTS (alarm H5_HAVE_ALARM)
CHECK_FUNCTION_EXISTS (fork H5_HAVE_FORK)
CHECK_FUNCTION_EXISTS (frexpf H5_HAVE_FREXPF)
@@ -517,11 +538,7 @@ ENDMACRO (HDF5_FUNCTION_TEST)
#-----------------------------------------------------------------------------
# Check a bunch of other functions
#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_TIMEZONE 1)
- SET (H5_HAVE_FUNCTION 1)
- SET (H5_LONE_COLON 0)
-ELSE (WINDOWS)
+IF (NOT WINDOWS)
FOREACH (test
TIME_WITH_SYS_TIME
STDC_HEADERS
@@ -530,7 +547,7 @@ ELSE (WINDOWS)
HAVE_ATTRIBUTE
HAVE_FUNCTION
HAVE_TM_GMTOFF
- HAVE_TIMEZONE
+# HAVE_TIMEZONE
HAVE_STRUCT_TIMEZONE
HAVE_STAT_ST_BLOCKS
HAVE_FUNCTION
@@ -546,8 +563,12 @@ ELSE (WINDOWS)
LONE_COLON
)
HDF5_FUNCTION_TEST (${test})
+ IF (NOT CYGWIN)
+ HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
+# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
+ ENDIF (NOT CYGWIN)
ENDFOREACH (test)
-ENDIF (WINDOWS)
+ENDIF (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Option to see if GPFS is available on this filesystem --enable-gpfs
@@ -594,41 +615,41 @@ ENDIF (INLINE_TEST___inline__)
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
IF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- SET (PRINT_LL_FOUND 0)
- MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
- FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
- SET (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- IF (H5_SIZEOF_LONG_LONG)
- SET (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- ENDIF (H5_SIZEOF_LONG_LONG)
- TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
- )
- IF (HDF5_PRINTF_LL_TEST_COMPILE)
- IF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- SET (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- SET (PRINT_LL_FOUND 1)
- ELSE (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- MESSAGE ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- ENDIF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- ELSE (HDF5_PRINTF_LL_TEST_COMPILE)
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
- )
- ENDIF (HDF5_PRINTF_LL_TEST_COMPILE)
- ENDFOREACH (HDF5_PRINTF_LL)
-
- IF (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
- ELSE (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: not found")
- SET (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
- "Width for printf for type `long long' or `__int64', us. `ll"
+ SET (PRINT_LL_FOUND 0)
+ MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
+ FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
+ SET (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
+ IF (H5_SIZEOF_LONG_LONG)
+ SET (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
+ ENDIF (H5_SIZEOF_LONG_LONG)
+ TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
+ ${HDF5_BINARY_DIR}/CMake
+ ${HDF5_RESOURCES_DIR}/HDF5Tests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
+ OUTPUT_VARIABLE OUTPUT
+ )
+ IF (HDF5_PRINTF_LL_TEST_COMPILE)
+ IF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ SET (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
+ SET (PRINT_LL_FOUND 1)
+ ELSE (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ MESSAGE ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
+ ENDIF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ ELSE (HDF5_PRINTF_LL_TEST_COMPILE)
+ FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
)
- ENDIF (PRINT_LL_FOUND)
+ ENDIF (HDF5_PRINTF_LL_TEST_COMPILE)
+ ENDFOREACH (HDF5_PRINTF_LL)
+
+ IF (PRINT_LL_FOUND)
+ MESSAGE (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
+ ELSE (PRINT_LL_FOUND)
+ MESSAGE (STATUS "Checking for apropriate format for 64 bit long: not found")
+ SET (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
+ "Width for printf for type `long long' or `__int64', us. `ll"
+ )
+ ENDIF (PRINT_LL_FOUND)
ENDIF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
# ----------------------------------------------------------------------
@@ -645,9 +666,6 @@ SET (H5_CONVERT_DENORMAL_FLOAT 1)
IF (HDF5_ENABLE_HSIZET)
SET (H5_HAVE_LARGE_HSIZET 1)
ENDIF (HDF5_ENABLE_HSIZET)
-IF (CYGWIN)
- SET (H5_HAVE_LSEEK64 0)
-ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@@ -664,7 +682,7 @@ MACRO (H5ConversionTests TEST msg)
IF (${TEST}_COMPILE)
IF (${TEST}_RUN MATCHES 0)
SET (${TEST} 1 CACHE INTERNAL ${msg})
- MESSAGE(STATUS "${msg}... yes")
+ MESSAGE (STATUS "${msg}... yes")
ELSE (${TEST}_RUN MATCHES 0)
SET (${TEST} "" CACHE INTERNAL ${msg})
MESSAGE (STATUS "${msg}... no")
@@ -821,11 +839,8 @@ H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly convertin
H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
-#-----------------------------------------------------------------------------
-# These tests need to be manually SET for windows since there is currently
-# something not quite correct with the actual test implementation. This affects
-# the 'dt_arith' test and most likely lots of other code
-# ----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
-ENDIF (WINDOWS)
+# Define a macro for Cygwin (on XP only) where the compiler has rounding
+# problem converting from unsigned long long to long double */
+IF (CYGWIN)
+ SET (H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1)
+ENDIF (CYGWIN) \ No newline at end of file
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index fdcf6b2..0c2b084 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -39,6 +39,10 @@
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
+/* Define a macro for Cygwin (on XP only) where the compiler has rounding
+ problem converting from unsigned long long to long double */
+#cmakedefine H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM @H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM@
+
/* Define the default virtual file driver to compile */
#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index ed415f7..de69217 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -77,7 +77,7 @@ ENDIF (WIN32 AND NOT MINGW)
# now compare the output with the reference
EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_OUTPUT} ${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_RESULT
)
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index eaa019a..c0b5fec 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -1,5 +1,5 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
+# vfdTest.cmake executes a command and captures the output in a file. Command uses specified VFD.
+# Exit status of command can also be compared.
# arguments checking
IF (NOT TEST_PROGRAM)
diff --git a/config/cmake/xlatefile.c b/config/cmake/xlatefile.c
index c16f573..e220289 100644
--- a/config/cmake/xlatefile.c
+++ b/config/cmake/xlatefile.c
@@ -9,8 +9,8 @@ int main(int argc, char *argv[]) {
FILE *outfile = NULL;
char *buffer = NULL;
char argbuf[8];
- unsigned int bytes = 0;
- unsigned int idx = 0;
+ size_t bytes = 0;
+ size_t idx = 0;
unsigned int lineidx = 0;
unsigned int stripXlines = 3;
diff --git a/config/commence.am b/config/commence.am
index 815b9a2..c5c27d5 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -45,14 +45,24 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
# Install directories that automake doesn't know about
docdir = $(exec_prefix)/doc
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC=$(bindir)/h5cc
-H5CC_PP=$(bindir)/h5pcc
-H5FC=$(bindir)/h5fc
-H5FC_PP=$(bindir)/h5pfc
-H5CPP=$(bindir)/h5c++
+H5CC=${DESTDIR}$(bindir)/h5cc
+H5CC_PP=${DESTDIR}$(bindir)/h5pcc
+H5FC=${DESTDIR}$(bindir)/h5fc
+H5FC_PP=${DESTDIR}$(bindir)/h5pfc
+H5CPP=${DESTDIR}$(bindir)/h5c++
# H5_CFLAGS holds flags that should be used when building hdf5,
diff --git a/config/examples.am b/config/examples.am
index 30ea717..244e695 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -67,7 +67,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/config/intel-flags b/config/intel-flags
index 5bf06d4..e6a9c31 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -70,13 +70,8 @@ if test "X-icc" = "X-$cc_vendor"; then
# Default to C99 standard.
H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch}"
- # Production
- # -Wl,-s to remove all symbols for smaller file
- # O3 optimization causes compilation failures on many platforms;
- # the problem exists in all versions of the icc compiler up to the latest 9.1
- # I changed optimization flag to default -O2. EIP, 2006-08-15
- #PROD_CFLAGS="-O3 -Wl,-s"
- PROD_CFLAGS="-O2 -Wl,-s"
+ # Production is set to default; see settings for specific version further down
+ PROD_CFLAGS="-O"
PROD_CPPFLAGS=
# Debug
@@ -98,6 +93,11 @@ fi
# Please follow the pattern below by adding new versions at the top, copying
# the information from the previous version and adding modifications to that.
case "$cc_vendor-$cc_version" in
+ icc-11*)
+ # -s became obsolete; we also fixed bugs that allow us to enable higher level
+ # of optimization starting with 1.8.7
+ PROD_CFLAGS="-O3"
+ ;;
icc-10*)
PROD_CFLAGS="-O1 -Wl,-s"
;;
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 19b3066..b28eed0 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 = 65
+LT_VERS_REVISION = 67
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure b/configure
index 655ce60..9ff7efe 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.in Id: configure.in 19457 2010-09-21 16:46:38Z songyulu .
+# From configure.in Id: configure.in 19512 2010-10-05 13:37:04Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for HDF5 1.9.75.
+# Generated by GNU Autoconf 2.67 for HDF5 1.9.77.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -563,8 +563,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.75'
-PACKAGE_STRING='HDF5 1.9.75'
+PACKAGE_VERSION='1.9.77'
+PACKAGE_STRING='HDF5 1.9.77'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -1437,7 +1437,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.75 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.77 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1507,7 +1507,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.75:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.77:";;
esac
cat <<\_ACEOF
@@ -1693,7 +1693,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.75
+HDF5 configure 1.9.77
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2782,7 +2782,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.75, which was
+It was created by HDF5 $as_me 1.9.77, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -3603,7 +3603,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.75'
+ VERSION='1.9.77'
cat >>confdefs.h <<_ACEOF
@@ -28800,7 +28800,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.75, which was
+This file was extended by HDF5 $as_me 1.9.77, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -28866,7 +28866,7 @@ _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.75
+HDF5 config.status 1.9.77
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.in b/configure.in
index bb60c2b..896ac83 100644
--- a/configure.in
+++ b/configure.in
@@ -26,7 +26,7 @@ dnl
dnl NOTE: Don't forget to change the version number here when we do a
dnl release!!!
dnl
-AC_INIT([HDF5], [1.9.75], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.77], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AM_CONFIG_HEADER([src/H5config.h])
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 92830df..8a428ae 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -69,8 +69,9 @@ $(EXTLINK_DIRS):
CHECK_CLEANFILES+=$(EXTLINK_DIRS)
# Example directory
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c
-EXAMPLETOPDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
+EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
# List dependencies for each program. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/examples/Makefile.in b/examples/Makefile.in
index ceabee8..80139b8 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -315,14 +315,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -360,8 +370,9 @@ INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
EXTLINK_DIRS = red blue u2w
# Example directory
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/c
-EXAMPLETOPDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
+EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -649,7 +660,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/examples/run-all-ex.sh b/examples/run-all-ex.sh
index e96b86f..6837c7e 100755
--- a/examples/run-all-ex.sh
+++ b/examples/run-all-ex.sh
@@ -26,12 +26,18 @@
if (echo "Run c examples" && \
(cd c; sh ./run-c-ex.sh) && \
- echo "Run fortran examples" && \
- (cd fortran; sh ./run-fortran-ex.sh) && \
- echo "Run c++ examples" && \
- (cd c++; sh ./run-c++-ex.sh) && \
- echo "Run hl examples." && \
- (cd hl; sh ./run-hl-ex.sh)); then
+ (if test -d fortran; then
+ echo "Run fortran examples"
+ cd fortran; sh ./run-fortran-ex.sh
+ fi)
+ (if test -d c++; then
+ echo "Run c++ examples"
+ cd c++; sh ./run-c++-ex.sh
+ fi)
+ (if test -d hl; then
+ echo "Run hl examples."
+ cd hl; sh ./run-hl-ex.sh
+ fi)); then
echo "Done"
exit 0
else
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index 09ff2fc..2bc1cd4 100755
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -32,7 +32,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 715dbab..4e7f208 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -352,14 +352,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 04e6303..6fe6cc7 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -39,12 +39,12 @@ FOREACH (example ${examples})
ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (f90_ex_${example})
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example})
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -56,12 +56,12 @@ IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
H5_NAMING (f90_ex_ph5example)
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example)
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index f27f7ff..57a8f94 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -65,7 +65,8 @@ $(EXTRA_PROG): $(H5FC)
endif
# Tell automake how to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 1862e2f..5d76c0b 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -315,14 +315,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -360,7 +370,8 @@ INSTALL_SCRIPT_FILES = run-fortran-ex.sh
FORTRAN_API = yes
# Tell automake how to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -645,7 +656,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index 1564537..b29eaaf 100755
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -33,7 +33,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 21439f1..2af57c1 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -25,20 +25,18 @@ ELSE (FORTRAN_HAVE_SIZEOF)
${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
)
ENDIF (FORTRAN_HAVE_SIZEOF)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5test_FortranHavekind
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- ENDIF (BUILD_SHARED_LIBS)
+IF (WIN32 AND MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5test_FortranHavekind
PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ COMPILE_FLAGS "/MT"
)
- ENDIF (MSVC)
-ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (H5test_FortranHavekind
+ PROPERTIES
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5test_FortranHavekind${EXE_EXT})
@@ -53,20 +51,18 @@ ADD_CUSTOM_COMMAND (
ADD_EXECUTABLE (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5fortran_detect
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- ENDIF (BUILD_SHARED_LIBS)
+IF (WIN32 AND MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5fortran_detect
PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ COMPILE_FLAGS "/MT"
)
- ENDIF (MSVC)
-ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (H5fortran_detect
+ PROPERTIES
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5fortran_detect${EXE_EXT})
@@ -188,7 +184,7 @@ ENDIF (H5_HAVE_PARALLEL)
# Add Main fortran library
#-----------------------------------------------------------------------------
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -206,7 +202,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index b240a7a..d38d654 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -404,14 +404,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -426,7 +436,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 = 65
+LT_VERS_REVISION = 67
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 db44600..9e9409d 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -32,6 +32,24 @@ HL="@HL@"
############################################################################
## ##
+## Things You Can Modify to Override HDF5 Library Build Components: ##
+## ##
+## (Advanced usage - know what you're doing - you're on your own here.) ##
+## The three variables below can be used to insert paths and flags in ##
+## FFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ##
+## $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ##
+## $fmodules $link_objs $link_args $shared_link ##
+## ##
+## These settings can be overriden by setting HDF5_FFLAGS, ##
+## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
+## ##
+############################################################################
+FFLAGSBASE=""
+LDFLAGSBASE=""
+LIBSBASE=""
+
+############################################################################
+## ##
## You shouldn't have to modify anything below this line. ##
## ##
############################################################################
@@ -58,14 +76,27 @@ get_output_file="no"
SHOW="eval"
FCBASE="@FC@"
FLINKERBASE="@FC@"
-FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
+
+# FFLAGS and LDFLAGS are reserved for use by the script user.
+# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
+
+# User's FFLAGS come after their H5BLD counterparts to override
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
+
+H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
-LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
-LIBS="@LIBS@"
+H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
+H5BLD_LIBS="@LIBS@"
FC="${HDF5_FC:-$FCBASE}"
FLINKER="${HDF5_FLINKER:-$FLINKERBASE}"
+FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}"
+LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
+LIBS="${HDF5_LIBS:-$LIBSBASE}"
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
@@ -92,6 +123,20 @@ usage() {
echo " "
echo " HDF5_FC - use a different Fortran 90 or 95 compiler"
echo " HDF5_FLINKER - use a different linker"
+ echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library"
+ echo " [default: no]"
+ echo " "
+ echo " You can also add or change paths and flags to the compile line using"
+ echo " the following environment varibles or by assigning them to their counterparts"
+ echo " in the 'Things You Can Modify to Override...'" section of $prog_name
+ echo " "
+ echo " Variable Current value to be replaced"
+ echo " HDF5_FFLAGS \"$CFLAGSBASE\""
+ echo " HDF5_LDFLAGS \"$LDFLAGSBASE\""
+ echo " HDF5_LIBS \"$LIBSBASE\""
+ echo " "
+ echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version"
+ echo " is located may link your program with that other hdf5 library version."
echo " "
exit $EXIT_FAILURE
}
@@ -228,7 +273,7 @@ if test "x$do_compile" = "xyes"; then
fi
- $SHOW $FC $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args
+ $SHOW $FC $H5BLD_FFLAGS $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args
status=$?
if test "$status" != "0"; then
@@ -297,9 +342,14 @@ if test "x$do_link" = "xyes"; then
# The LIBS are just a bunch of -l* libraries necessary for the HDF5
# module. It's okay if they're included twice in the compile line.
- link_args="$link_args $LIBS"
-
- $SHOW $FLINKER $FFLAGS $F9XSUFFIXFLAG $fmodules $link_objs $link_args $shared_link $LDFLAGS
+ link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
+
+ # User's FFLAGS come after their H5BLD counterparts to override
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+ $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 7c8c407..a536c2e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -30,7 +30,7 @@ ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
)
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -48,7 +48,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
@@ -81,11 +81,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
@@ -105,11 +103,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
@@ -123,11 +119,9 @@ TARGET_LINK_LIBRARIES (fflush1
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
@@ -141,11 +135,9 @@ TARGET_LINK_LIBRARIES (fflush2
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7b8369b..4c0b03f 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -385,14 +385,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 7f702da..edabb35 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -28,11 +28,9 @@ TARGET_LINK_LIBRARIES (parallel_test
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32)
- IF (MSVC)
- TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
- ENDIF (MSVC)
-ENDIF (WIN32)
+IF (WIN32 AND MSVC)
+ TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
+ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 7bef605..f2e70b4 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -338,14 +338,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/Makefile.in b/hl/Makefile.in
index 2c607d6..f599f5c 100755
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -352,14 +352,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index af6b481..f0a1d05 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -348,14 +348,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am
index da1580a..c690a12 100644
--- a/hl/c++/examples/Makefile.am
+++ b/hl/c++/examples/Makefile.am
@@ -33,7 +33,8 @@ INSTALL_SCRIPT_FILES = run-hlc++-ex.sh
CXX_API=yes
# Where to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c++
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index ae60c75..b7d628b 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -314,14 +314,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -345,7 +355,8 @@ INSTALL_SCRIPT_FILES = run-hlc++-ex.sh
CXX_API = yes
# Where to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c++
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c++
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -602,7 +613,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in
index 4e6b1fb..d43606e 100755
--- a/hl/c++/examples/run-hlc++-ex.sh.in
+++ b/hl/c++/examples/run-hlc++-ex.sh.in
@@ -31,9 +31,9 @@
# Initializations
EXIT_SUCCESS=0
EXIT_FAILURE=1
-
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
AR="@AR@"
RANLIB="@RANLIB@"
H5TOOL="h5c++" # The tool name
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 8251168..5354a78 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -360,14 +360,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -382,7 +392,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 = 65
+LT_VERS_REVISION = 67
LT_VERS_AGE = 0
# Include src directory
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index ef60bd4..3128fe8 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -334,14 +334,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am
index 64a29d4..d1f67bc 100644
--- a/hl/examples/Makefile.am
+++ b/hl/examples/Makefile.am
@@ -26,8 +26,9 @@ if BUILD_PARALLEL_CONDITIONAL
endif
# Example directory
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
+EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 8e15960..c3fa914 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -314,14 +314,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -335,8 +345,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
@BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA =
# Example directory
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
+EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
@@ -643,7 +654,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/hl/examples/run-hl-ex.sh b/hl/examples/run-hl-ex.sh
index 0478f76..5fa97c0 100755
--- a/hl/examples/run-hl-ex.sh
+++ b/hl/examples/run-hl-ex.sh
@@ -25,10 +25,14 @@
if (echo "Run hl c examples" && \
(cd c; sh ./run-hlc-ex.sh) && \
- echo "Run hl fortran examples" && \
- (cd fortran; sh ./run-hlfortran-ex.sh) && \
- echo "Run hl c++ examples" && \
- (cd c++; sh ./run-hlc++-ex.sh)); then
+ (if test -d fortran; then
+ echo "Run hl fortran examples"
+ cd fortran; sh ./run-hlfortran-ex.sh
+ fi)
+ (if test -d c++; then
+ echo "Run hl c++ examples"
+ cd c++; sh ./run-hlc++-ex.sh
+ fi)); then
echo "Finished running hl examples"
exit 0
else
diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in
index d66d9e0..86c6276 100755
--- a/hl/examples/run-hlc-ex.sh.in
+++ b/hl/examples/run-hlc-ex.sh.in
@@ -32,7 +32,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index a6632be..cbf948b 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -352,14 +352,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am
index acb4a02..7c31fa7 100644
--- a/hl/fortran/examples/Makefile.am
+++ b/hl/fortran/examples/Makefile.am
@@ -51,7 +51,8 @@ $(EXTRA_PROG): $(H5FC)
endif
# Tell automake how to install examples
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/fortran
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index 6394565..62e02c5 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -315,14 +315,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -353,7 +363,8 @@ INSTALL_SCRIPT_FILES = run-hlfortran-ex.sh
FORTRAN_API = yes
# Tell automake how to install examples
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/fortran
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/fortran
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
@@ -605,7 +616,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in
index 644a9b7..364b438 100755
--- a/hl/fortran/examples/run-hlfortran-ex.sh.in
+++ b/hl/fortran/examples/run-hlfortran-ex.sh.in
@@ -33,7 +33,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 67871f4..421fdff 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -52,7 +52,7 @@ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_
ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
IF (BUILD_SHARED_LIBS)
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
@@ -64,14 +64,14 @@ IF (BUILD_SHARED_LIBS)
LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL"
)
ENDIF (MSVC)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
ENDIF (BUILD_SHARED_LIBS)
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET}
${HDF5_HL_F90_C_LIB_TARGET}
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 7b072ad..b1257f3 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -369,14 +369,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -391,7 +401,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 = 65
+LT_VERS_REVISION = 67
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/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index b4f4075..2968943 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -12,6 +12,20 @@ LINK_DIRECTORIES (
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME hl_fortran_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ dsetf1.h5
+ dsetf2.h5
+ dsetf3.h5
+ dsetf4.h5
+ dsetf5.h5
+ f1image.h5
+ f1tab.h5
+)
+
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
H5_NAMING (hl_f90_tstlite)
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index e4fd58f..f81614b 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -343,14 +343,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 772bb95..d5da363 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -360,14 +360,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -382,7 +392,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 = 65
+LT_VERS_REVISION = 67
LT_VERS_AGE = 0
# This library is our main target.
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 182fd14..22568ae 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -48,6 +48,33 @@ MACRO (HL_ADD_TEST hl_name files)
ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES})
ENDMACRO (HL_ADD_TEST)
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME hl_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ combine_tables1.h5
+ combine_tables2.h5
+ test_detach.h5
+ test_ds1.h5
+ test_ds2.h5
+ test_ds3.h5
+ test_ds4.h5
+ test_ds5.h5
+ test_ds6.h5
+ test_ds7.h5
+ test_ds8.h5
+ test_ds9.h5
+ test_image1.h5
+ test_image2.h5
+ test_image3.h5
+ test_lite1.h5
+ test_lite2.h5
+ test_packet_compress.h5
+ test_packet_table.h5
+ test_table.h5
+)
+
HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
HL_ADD_TEST (test_lite "dtype_file.txt")
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index a962e93..831048c 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -364,14 +364,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index cd6b1a9..d0fa11a 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -349,14 +349,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index c19c772..eae6de5 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -349,14 +349,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt
index 2c0c517..56868d6 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -11,6 +11,21 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
# Add Tests
#-----------------------------------------------------------------------------
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME h5perform-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ chunk.h5
+ iopipe.h5
+ iopipe.raw
+ x-diag-rd.dat
+ x-diag-wr.dat
+ x-rowmaj-rd.dat
+ x-rowmaj-wr.dat
+ x-gnuplot
+)
+
#-- Adding test for h5perf_serial
SET (h5perf_serial_SRCS
${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c
diff --git a/perform/Makefile.in b/perform/Makefile.in
index c074f98..e2e05b8 100644
--- a/perform/Makefile.in
+++ b/perform/Makefile.in
@@ -385,14 +385,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 32dcf1f..86320b1 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.75 currently under development
+HDF5 version 1.9.77 currently under development
================================================================================
@@ -240,6 +240,7 @@ New Features
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 -
@@ -251,9 +252,6 @@ Bug Fixes since HDF5-1.8.0 release
- Modified library to always cache symbol table information. Libraries
version 1.6.3 have a bug which causes them to require this
information for some operations. (NAF - 2010/09/21 - 1864)
- - H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API
- to compile with the library. The problem is fixed and the behavior
- of H5Eget_auto is modified (Bug #1707). (SLU - 2010/9/21)
- Fixed a bug that could occur when getting information for a new-style
group that was previously opened through a file handle that was
later closed. (NAF - 2010/09/15)
@@ -643,15 +641,22 @@ Platforms Tested
Intel(R) C++ Version 8.1
Intel(R) Fortran Compiler Version 8.1
mpich-gm-1.2.5..10-intel-r2
+
+ Windows XP Visual Studio 2008 w/ Intel Fortran 11.1
+ Visual Studio 2010
+ Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran)
- Windows XP Visual Studio 2008 w/ Intel Fortran 10.1
- Cygwin(1.7.5 native gcc compiler and gfortran)
+ Windows XP x64 Visual Studio 2008 w/ Intel Fortran 11.1
+ Visual Studio 2010
+ Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran)
+
+ Windows Vista Visual Studio 2008 w/ Intel Fortran 11.1
- Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1
+ Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 11.1
- Windows Vista Visual Studio 2008 w/ Intel Fortran 10.1
+ Windows 7 Visual Studio 2010
- Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 10.1
+ Windows 7 x64 Visual Studio 2010
MAC OS 10.5 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
G95 (GCC 4.0.3 (g95 0.91!) Nov 21 2006)
@@ -711,8 +716,8 @@ Cray XT3 (not tested
for this release) n n n x n
Windows XP y y(3) y y n
Windows XP x64 y y(3) y y n
-Windows Vista y y(3) y y n
-Windows Vista x64 y y(3) y y n
+Windows Vista y y(3) y y y
+Windows Vista x64 y y(3) y y y
Mac OS X 10.5 Intel y y y x n
FreeBSD 6.2 32-bit y y y x n
FreeBSD 6.2 64-bit y y y x n
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3f40dda..3330b8b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -557,10 +557,10 @@ SET (H5_PUBLIC_HEADERS
# --------------------------------------------------------------------
# If we are compiling on Windows then add the windows specific files
# --------------------------------------------------------------------
-IF (WIN32)
+IF (WIN32 AND NOT CYGWIN)
SET (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
SET (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
-ENDIF (WIN32)
+ENDIF (WIN32 AND NOT CYGWIN)
SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
diff --git a/src/H5.c b/src/H5.c
index 97c4036..0a14c6e 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -214,7 +214,7 @@ H5_term_library(void)
int pending, ntries = 0, n;
size_t at = 0;
char loop[1024];
- H5E_auto_t func;
+ H5E_auto2_t func;
#ifdef H5_HAVE_THREADSAFE
/* explicit locking of the API */
@@ -227,11 +227,8 @@ H5_term_library(void)
goto done;
/* Check if we should display error output */
-#ifdef H5_USE_16_API_DEFAULT
- (void)H5Eget_auto(&func, NULL);
-#else
- (void)H5Eget_auto(H5E_DEFAULT, &func, NULL);
-#endif
+ (void)H5Eget_auto2(H5E_DEFAULT, &func, NULL);
+
/*
* Terminate each interface. The termination functions return a positive
* value if they do something that might affect some other interface in a
diff --git a/src/H5C.c b/src/H5C.c
index de45d20..5b7984b 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -8713,7 +8713,7 @@ H5C_make_space_in_cache(H5F_t * f,
#endif /* H5C_COLLECT_CACHE_STATS */
HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( (cache_ptr->pl_size + cache_ptr->min_clean_size) >
+ ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
cache_ptr->max_cache_size ) ||
( ( cache_ptr->clean_index_size + empty_space )
>= cache_ptr->min_clean_size ) );
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 1511515..910497b 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -161,6 +161,13 @@ typedef struct H5D_chunk_it_ud4_t {
unsigned ndims; /* Number of dimensions for chunk/dataset */
} H5D_chunk_it_ud4_t;
+/* Callback info for nonexistent readvv operation */
+typedef struct H5D_chunk_readvv_ud_t {
+ unsigned char *rbuf; /* Read buffer to initialize */
+ H5D_t *dset; /* Dataset to operate on */
+ hid_t dxpl_id; /* DXPL for operation */
+} H5D_chunk_readvv_ud_t;
+
/********************/
/* Local Prototypes */
@@ -4928,6 +4935,55 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D_nonexistent_readvv_cb
+ *
+ * Purpose: Callback operation for performing fill value I/O operation
+ * on memory buffer.
+ *
+ * Note: This algorithm is pretty inefficient about initializing and
+ * terminating the fill buffer info structure and it would be
+ * faster to refactor this into a "real" initialization routine,
+ * and a "vectorized fill" routine. -QAK
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 30 Sep 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_nonexistent_readvv_cb(hsize_t UNUSED dst_off, hsize_t src_off, size_t len,
+ void *_udata)
+{
+ H5D_chunk_readvv_ud_t *udata = (H5D_chunk_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
+ hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5D_nonexistent_readvv_cb)
+
+ /* Initialize the fill value buffer */
+ if(H5D_fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL,
+ &udata->dset->shared->dcpl_cache.fill, udata->dset->shared->type,
+ udata->dset->shared->type_id, (size_t)0, len, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
+ fb_info_init = TRUE;
+
+ /* Check for VL datatype & fill the buffer with VL datatype fill values */
+ if(fb_info.has_vlen_fill_type && H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
+
+done:
+ /* Release the fill buffer info, if it's been initialized */
+ if(fb_info_init && H5D_fill_term(&fb_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5D_nonexistent_readvv_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D_nonexistent_readvv
*
* Purpose: When the chunk doesn't exist on disk and the chunk is bigger
@@ -4949,80 +5005,35 @@ done:
*/
static ssize_t
H5D_nonexistent_readvv(const H5D_io_info_t *io_info,
- size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[])
+ size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_off_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
- H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
- hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- size_t u, v; /* Local index variables */
- ssize_t ret_value = 0; /* Return value */
+ H5D_chunk_readvv_ud_t udata; /* User data for H5V_opvv() operator */
+ ssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5D_nonexistent_readvv)
/* Check args */
+ HDassert(io_info);
+ HDassert(chunk_curr_seq);
HDassert(chunk_len_arr);
- HDassert(chunk_offset_arr);
+ HDassert(chunk_off_arr);
+ HDassert(mem_curr_seq);
HDassert(mem_len_arr);
- HDassert(mem_offset_arr);
-
- /* Work through all the sequences */
- for(u = *mem_curr_seq, v = *chunk_curr_seq; u < mem_max_nseq && v < chunk_max_nseq; ) {
- unsigned char *buf; /* Temporary pointer into read buffer */
- size_t size; /* Size of sequence in bytes */
-
- /* Choose smallest buffer to write */
- if(chunk_len_arr[v] < mem_len_arr[u])
- size = chunk_len_arr[v];
- else
- size = mem_len_arr[u];
-
- /* Compute offset in memory */
- buf = (unsigned char *)io_info->u.rbuf + mem_offset_arr[u];
+ HDassert(mem_off_arr);
- /* Initialize the fill value buffer */
- if(H5D_fill_init(&fb_info, buf, NULL, NULL, NULL, NULL,
- &dset->shared->dcpl_cache.fill, dset->shared->type,
- dset->shared->type_id, (size_t)0, size, io_info->dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
- fb_info_init = TRUE;
-
- /* Check for VL datatype & fill the buffer with VL datatype fill values */
- if(fb_info.has_vlen_fill_type && H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, io_info->dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
+ /* Set up user data for H5V_opvv() */
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dset = io_info->dset;
+ udata.dxpl_id = io_info->dxpl_id;
- /* Release the fill buffer info */
- if(H5D_fill_term(&fb_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
- fb_info_init = FALSE;
-
- /* Update source information */
- chunk_len_arr[v] -= size;
- if(chunk_len_arr[v] == 0)
- v++;
- else
- chunk_offset_arr[v] += size;
-
- /* Update destination information */
- mem_len_arr[u] -= size;
- if(mem_len_arr[u] == 0)
- u++;
- else
- mem_offset_arr[u] += size;
-
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
-
- /* Update current sequence vectors */
- *mem_curr_seq = u;
- *chunk_curr_seq = v;
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_nonexistent_readvv_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized fill value init")
done:
- /* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D_fill_term(&fb_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D_nonexistent_readvv() */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 78c07e6..9b4f338 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -55,6 +55,40 @@
/* Local Typedefs */
/******************/
+/* Callback info for sieve buffer readvv operation */
+typedef struct H5D_contig_readvv_sieve_ud_t {
+ H5F_t *file; /* File for dataset */
+ H5D_rdcdc_t *dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
+ unsigned char *rbuf; /* Pointer to buffer to fill */
+ hid_t dxpl_id; /* DXPL for operation */
+} H5D_contig_readvv_sieve_ud_t;
+
+/* Callback info for [plain] readvv operation */
+typedef struct H5D_contig_readvv_ud_t {
+ H5F_t *file; /* File for dataset */
+ haddr_t dset_addr; /* Address of dataset */
+ unsigned char *rbuf; /* Pointer to buffer to fill */
+ hid_t dxpl_id; /* DXPL for operation */
+} H5D_contig_readvv_ud_t;
+
+/* Callback info for sieve buffer writevv operation */
+typedef struct H5D_contig_writevv_sieve_ud_t {
+ H5F_t *file; /* File for dataset */
+ H5D_rdcdc_t *dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig; /* Contiguous storage info for this I/O operation */
+ const unsigned char *wbuf; /* Pointer to buffer to write */
+ hid_t dxpl_id; /* DXPL for operation */
+} H5D_contig_writevv_sieve_ud_t;
+
+/* Callback info for [plain] writevv operation */
+typedef struct H5D_contig_writevv_ud_t {
+ H5F_t *file; /* File for dataset */
+ haddr_t dset_addr; /* Address of dataset */
+ const unsigned char *wbuf; /* Pointer to buffer to write */
+ hid_t dxpl_id; /* DXPL for operation */
+} H5D_contig_writevv_ud_t;
+
/********************/
/* Local Prototypes */
@@ -65,6 +99,12 @@ static herr_t H5D_contig_construct(H5F_t *f, H5D_t *dset);
static herr_t H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t *cm);
+static ssize_t H5D_contig_readvv(const H5D_io_info_t *io_info,
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
+static ssize_t H5D_contig_writevv(const H5D_io_info_t *io_info,
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
static herr_t H5D_contig_flush(H5D_t *dset, hid_t dxpl_id);
/* Helper routines */
@@ -600,572 +640,591 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_contig_readvv
+ * Function: H5D_contig_readvv_sieve_cb
*
- * Purpose: Reads some data vectors from a dataset into a buffer.
- * The data is contiguous. The address is the start of the dataset,
- * relative to the base address for the file and the offsets and
- * sequence lengths are in bytes.
+ * Purpose: Callback operator for H5D_contig_readvv() with sieve buffer.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * Friday, May 3, 2001
- *
- * Notes:
- * Offsets in the sequences must be monotonically increasing
+ * Thursday, Sept 30, 2010
*
*-------------------------------------------------------------------------
*/
-ssize_t
-H5D_contig_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[])
+static herr_t
+H5D_contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
+ void *_udata)
{
- H5F_t *file = io_info->dset->oloc.file; /* File for dataset */
- H5D_rdcdc_t *dset_contig = &(io_info->dset->shared->cache.contig); /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
- unsigned char *buf = (unsigned char *)io_info->u.rbuf; /* Pointer to buffer to fill */
+ H5D_contig_readvv_sieve_ud_t *udata = (H5D_contig_readvv_sieve_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ H5F_t *file = udata->file; /* File for dataset */
+ H5D_rdcdc_t *dset_contig = udata->dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig = udata->store_contig; /* Contiguous storage info for this I/O operation */
+ unsigned char *buf; /* Pointer to buffer to fill */
haddr_t addr; /* Actual address to read */
- size_t size; /* Size of sequence in bytes */
- size_t u, v; /* Counting variables */
- ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
-
- FUNC_ENTER_NOAPI(H5D_contig_readvv, FAIL)
-#ifdef QAK
-HDfprintf(stderr, "%s: dset_max_nseq = %Zu\n", FUNC, dset_max_nseq);
-HDfprintf(stderr, "%s: mem_max_nseq = %Zu\n", FUNC, mem_max_nseq);
-HDfprintf(stderr, "%s: *dset_curr_seq= %Zu\n", FUNC, *dset_curr_seq);
-HDfprintf(stderr, "%s: *mem_curr_seq= %Zu\n", FUNC, *mem_curr_seq);
-for(u = 0; u < dset_max_nseq; u++)
- HDfprintf(stderr, "%s: dset_len_arr[%Zu] = %Zu, dset_offset_arr[%Zu] = %Hu\n", FUNC, u, dset_len_arr[u], u, dset_offset_arr[u]);
-for(u = 0; u < mem_max_nseq; u++)
- HDfprintf(stderr, "%s: mem_len_arr[%Zu] = %Zu, mem_offset_arr[%Zu] = %Hu\n", FUNC, u, mem_len_arr[u], u, mem_offset_arr[u]);
-#endif /* QAK */
+ haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
+ haddr_t contig_end; /* End locations of block to write */
+ size_t sieve_size = (size_t)-1; /* Size of sieve buffer */
+ haddr_t rel_eoa; /* Relative end of file address */
+ hsize_t max_data; /* Actual maximum size of data to cache */
+ herr_t ret_value = SUCCEED; /* Return value */
- /* Check args */
- HDassert(io_info);
- HDassert(io_info->dset);
- HDassert(io_info->store);
- HDassert(buf);
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv_sieve_cb)
- /* Check if data sieving is enabled */
- if(H5F_HAS_FEATURE(file, H5FD_FEAT_DATA_SIEVE)) {
- haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
- haddr_t contig_end; /* End locations of block to write */
- size_t sieve_size = (size_t)-1; /* size of sieve buffer */
- haddr_t rel_eoa; /* Relative end of file address */
- hsize_t max_data; /* Actual maximum size of data to cache */
-
- /* Set offsets in sequence lists */
- u = *dset_curr_seq;
- v = *mem_curr_seq;
-
- /* Stash local copies of these value */
- if(dset_contig->sieve_buf != NULL) {
- sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start+sieve_size;
+ /* Stash local copies of these value */
+ if(dset_contig->sieve_buf != NULL) {
+ sieve_start = dset_contig->sieve_loc;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
+ } /* end if */
+
+ /* Compute offset on disk */
+ addr = store_contig->dset_addr + dst_off;
+
+ /* Compute offset in memory */
+ buf = udata->rbuf + src_off;
+
+ /* Check if the sieve buffer is allocated yet */
+ if(NULL == dset_contig->sieve_buf) {
+ /* Check if we can actually hold the I/O request in the sieve buffer */
+ if(len > dset_contig->sieve_buf_size) {
+ if(H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
+ else {
+ /* Allocate room for the data sieve buffer */
+ if(NULL == (dset_contig->sieve_buf = H5FL_BLK_MALLOC(sieve_buf, dset_contig->sieve_buf_size)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed")
- /* Works through sequences as fast as possible */
- for(; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
+ /* Determine the new sieve buffer size & location */
+ dset_contig->sieve_loc = addr;
- /* Compute offset on disk */
- addr = store_contig->dset_addr + dset_offset_arr[u];
+ /* Make certain we don't read off the end of the file */
+ if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
- /* Compute offset in memory */
- buf = (unsigned char *)io_info->u.rbuf + mem_offset_arr[v];
+ /* Set up the buffer parameters */
+ max_data = store_contig->dset_size - dst_off;
- /* Check if the sieve buffer is allocated yet */
- if(dset_contig->sieve_buf == NULL) {
- /* Check if we can actually hold the I/O request in the sieve buffer */
- if(size>dset_contig->sieve_buf_size) {
- if(H5F_block_read(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
- } /* end if */
- else {
- /* Allocate room for the data sieve buffer */
- if(NULL == (dset_contig->sieve_buf = H5FL_BLK_MALLOC(sieve_buf, dset_contig->sieve_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ /* Compute the size of the sieve buffer */
+ H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
- /* Determine the new sieve buffer size & location */
- dset_contig->sieve_loc = addr;
+ /* Read the new sieve buffer */
+ if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
- /* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size")
+ /* Grab the data out of the buffer (must be first piece of data in buffer ) */
+ HDmemcpy(buf, dset_contig->sieve_buf, len);
- /* Set up the buffer parameters */
- max_data = store_contig->dset_size - dset_offset_arr[u];
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
- /* Compute the size of the sieve buffer */
- H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
+ /* Stash local copies of these value */
+ sieve_start = dset_contig->sieve_loc;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start+sieve_size;
+ } /* end else */
+ } /* end if */
+ else {
+ /* Compute end of sequence to retrieve */
+ contig_end = addr + len - 1;
- /* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
+ /* If entire read is within the sieve buffer, read it from the buffer */
+ if(addr >= sieve_start && contig_end < sieve_end) {
+ unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
- /* Grab the data out of the buffer (must be first piece of data in buffer ) */
- HDmemcpy(buf, dset_contig->sieve_buf, size);
+ /* Grab the data out of the buffer */
+ HDmemcpy(buf, base_sieve_buf, len);
+ } /* end if */
+ /* Entire request is not within this data sieve buffer */
+ else {
+ /* Check if we can actually hold the I/O request in the sieve buffer */
+ if(len > dset_contig->sieve_buf_size) {
+ /* Check for any overlap with the current sieve buffer */
+ if((sieve_start >= addr && sieve_start < (contig_end + 1))
+ || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
+ /* Flush the sieve buffer, if it's dirty */
+ if(dset_contig->sieve_dirty) {
+ /* Write to file */
+ if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
+ } /* end if */
+ } /* end if */
- /* Stash local copies of these value */
- sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start+sieve_size;
- } /* end else */
+ /* Read directly into the user's buffer */
+ if(H5F_block_read(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
} /* end if */
+ /* Element size fits within the buffer size */
else {
- /* Compute end of sequence to retrieve */
- contig_end = addr + size - 1;
-
- /* If entire read is within the sieve buffer, read it from the buffer */
- if(addr>=sieve_start && contig_end<sieve_end) {
- unsigned char *base_sieve_buf=dset_contig->sieve_buf+(addr-sieve_start);
+ /* Flush the sieve buffer if it's dirty */
+ if(dset_contig->sieve_dirty) {
+ /* Write to file */
+ if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
- /* Grab the data out of the buffer */
- HDmemcpy(buf, base_sieve_buf, size);
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
} /* end if */
- /* Entire request is not within this data sieve buffer */
- else {
- /* Check if we can actually hold the I/O request in the sieve buffer */
- if(size>dset_contig->sieve_buf_size) {
- /* Check for any overlap with the current sieve buffer */
- if((sieve_start >= addr && sieve_start < (contig_end + 1))
- || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
- /* Flush the sieve buffer, if it's dirty */
- if(dset_contig->sieve_dirty) {
- /* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
- } /* end if */
- } /* end if */
-
- /* Read directly into the user's buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
- } /* end if */
- /* Element size fits within the buffer size */
- else {
- /* Flush the sieve buffer if it's dirty */
- if(dset_contig->sieve_dirty) {
- /* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
- } /* end if */
+ /* Determine the new sieve buffer size & location */
+ dset_contig->sieve_loc = addr;
- /* Determine the new sieve buffer size & location */
- dset_contig->sieve_loc = addr;
-
- /* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size")
+ /* Make certain we don't read off the end of the file */
+ if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
- /* Only need this when resizing sieve buffer */
- max_data = store_contig->dset_size - dset_offset_arr[u];
+ /* Only need this when resizing sieve buffer */
+ max_data = store_contig->dset_size - dst_off;
- /* Compute the size of the sieve buffer */
- /* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
- H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
+ /* Compute the size of the sieve buffer */
+ /* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
+ H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
- /* Update local copies of sieve information */
- sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
+ /* Update local copies of sieve information */
+ sieve_start = dset_contig->sieve_loc;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
- /* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
+ /* Read the new sieve buffer */
+ if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
- /* Grab the data out of the buffer (must be first piece of data in buffer ) */
- HDmemcpy(buf, dset_contig->sieve_buf, size);
+ /* Grab the data out of the buffer (must be first piece of data in buffer ) */
+ HDmemcpy(buf, dset_contig->sieve_buf, len);
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
- } /* end else */
- } /* end else */
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
} /* end else */
+ } /* end else */
+ } /* end else */
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
-
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
-
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
- } /* end if */
- else {
- /* Work through all the sequences */
- for(u = *dset_curr_seq, v = *mem_curr_seq; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
-
- /* Compute offset on disk */
- addr = store_contig->dset_addr + dset_offset_arr[u];
-
- /* Compute offset in memory */
- buf = (unsigned char *)io_info->u.rbuf + mem_offset_arr[v];
-
- /* Write data */
- if(H5F_block_read(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_contig_readvv_sieve_cb() */
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
+
+/*-------------------------------------------------------------------------
+ * Function: H5D_contig_readvv_cb
+ *
+ * Purpose: Callback operator for H5D_contig_readvv() without sieve buffer.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, Sept 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
+{
+ H5D_contig_readvv_ud_t *udata = (H5D_contig_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
- } /* end else */
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv_cb)
- /* Update current sequence vectors */
- *dset_curr_seq = u;
- *mem_curr_seq = v;
+ /* Write data */
+ if(H5F_block_read(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off),
+ len, udata->dxpl_id, (udata->rbuf + src_off)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_contig_readvv() */
+} /* end H5D_contig_readvv_cb() */
/*-------------------------------------------------------------------------
- * Function: H5D_contig_writevv
+ * Function: H5D_contig_readvv
*
- * Purpose: Writes some data vectors into a dataset from vectors into a
- * buffer. The address is the start of the dataset,
+ * Purpose: Reads some data vectors from a dataset into a buffer.
+ * The data is contiguous. The address is the start of the dataset,
* relative to the base address for the file and the offsets and
* sequence lengths are in bytes.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * Friday, May 2, 2003
+ * Friday, May 3, 2001
*
* Notes:
* Offsets in the sequences must be monotonically increasing
*
*-------------------------------------------------------------------------
*/
-ssize_t
-H5D_contig_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[])
+static ssize_t
+H5D_contig_readvv(const H5D_io_info_t *io_info,
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- H5F_t *file = io_info->dset->oloc.file; /* File for dataset */
- H5D_rdcdc_t *dset_contig = &(io_info->dset->shared->cache.contig); /* Cached information about contiguous data */
- const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
- const unsigned char *buf = (const unsigned char *)io_info->u.wbuf; /* Pointer to buffer to fill */
- haddr_t addr; /* Actual address to read */
- size_t size; /* Size of sequence in bytes */
- size_t u, v; /* Counting variables */
- ssize_t ret_value = 0; /* Return value (Size of sequence in bytes) */
+ ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_writevv, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv)
/* Check args */
HDassert(io_info);
- HDassert(io_info->dset);
- HDassert(io_info->store);
- HDassert(buf);
+ HDassert(dset_curr_seq);
+ HDassert(dset_len_arr);
+ HDassert(dset_off_arr);
+ HDassert(mem_curr_seq);
+ HDassert(mem_len_arr);
+ HDassert(mem_off_arr);
/* Check if data sieving is enabled */
- if(H5F_HAS_FEATURE(file, H5FD_FEAT_DATA_SIEVE)) {
- haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
- haddr_t contig_end; /* End locations of block to write */
- size_t sieve_size = (size_t)-1; /* size of sieve buffer */
- haddr_t rel_eoa; /* Relative end of file address */
- hsize_t max_data; /* Actual maximum size of data to cache */
-
- /* Set offsets in sequence lists */
- u = *dset_curr_seq;
- v = *mem_curr_seq;
-
- /* Stash local copies of these values */
- if(dset_contig->sieve_buf != NULL) {
+ if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
+ H5D_contig_readvv_sieve_ud_t udata; /* User data for H5V_opvv() operator */
+
+ /* Set up user data for H5V_opvv() */
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_contig = &(io_info->dset->shared->cache.contig);
+ udata.store_contig = &(io_info->store->contig);
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dxpl_id = io_info->dxpl_id;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_contig_readvv_sieve_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer read")
+ } /* end if */
+ else {
+ H5D_contig_readvv_ud_t udata; /* User data for H5V_opvv() operator */
+
+ /* Set up user data for H5V_opvv() */
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_addr = io_info->store->contig.dset_addr;
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+ udata.dxpl_id = io_info->dxpl_id;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_contig_readvv_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_contig_readvv() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5D_contig_writevv_sieve_cb
+ *
+ * Purpose: Callback operator for H5D_contig_writevv() with sieve buffer.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, Sept 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
+ void *_udata)
+{
+ H5D_contig_writevv_sieve_ud_t *udata = (H5D_contig_writevv_sieve_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ H5F_t *file = udata->file; /* File for dataset */
+ H5D_rdcdc_t *dset_contig = udata->dset_contig; /* Cached information about contiguous data */
+ const H5D_contig_storage_t *store_contig = udata->store_contig; /* Contiguous storage info for this I/O operation */
+ const unsigned char *buf; /* Pointer to buffer to fill */
+ haddr_t addr; /* Actual address to read */
+ haddr_t sieve_start = HADDR_UNDEF, sieve_end = HADDR_UNDEF; /* Start & end locations of sieve buffer */
+ haddr_t contig_end; /* End locations of block to write */
+ size_t sieve_size = (size_t)-1; /* size of sieve buffer */
+ haddr_t rel_eoa; /* Relative end of file address */
+ hsize_t max_data; /* Actual maximum size of data to cache */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv_sieve_cb)
+
+ /* Stash local copies of these values */
+ if(dset_contig->sieve_buf != NULL) {
+ sieve_start = dset_contig->sieve_loc;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
+ } /* end if */
+
+ /* Compute offset on disk */
+ addr = store_contig->dset_addr + dst_off;
+
+ /* Compute offset in memory */
+ buf = udata->wbuf + src_off;
+
+ /* No data sieve buffer yet, go allocate one */
+ if(NULL == dset_contig->sieve_buf) {
+ /* Check if we can actually hold the I/O request in the sieve buffer */
+ if(len > dset_contig->sieve_buf_size) {
+ if(H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
+ } /* end if */
+ else {
+ /* Allocate room for the data sieve buffer */
+ if(NULL == (dset_contig->sieve_buf = H5FL_BLK_MALLOC(sieve_buf, dset_contig->sieve_buf_size)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed")
+#ifdef H5_CLEAR_MEMORY
+if(dset_contig->sieve_size > len)
+ HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
+#endif /* H5_CLEAR_MEMORY */
+
+ /* Determine the new sieve buffer size & location */
+ dset_contig->sieve_loc = addr;
+
+ /* Make certain we don't read off the end of the file */
+ if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
+
+ /* Set up the buffer parameters */
+ max_data = store_contig->dset_size - dst_off;
+
+ /* Compute the size of the sieve buffer */
+ H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
+
+ /* Check if there is any point in reading the data from the file */
+ if(dset_contig->sieve_size > len) {
+ /* Read the new sieve buffer */
+ if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
+ } /* end if */
+
+ /* Grab the data out of the buffer (must be first piece of data in buffer ) */
+ HDmemcpy(dset_contig->sieve_buf, buf, len);
+
+ /* Set sieve buffer dirty flag */
+ dset_contig->sieve_dirty = TRUE;
+
+ /* Stash local copies of these values */
sieve_start = dset_contig->sieve_loc;
sieve_size = dset_contig->sieve_size;
sieve_end = sieve_start + sieve_size;
+ } /* end else */
+ } /* end if */
+ else {
+ /* Compute end of sequence to retrieve */
+ contig_end = addr + len - 1;
+
+ /* If entire write is within the sieve buffer, write it to the buffer */
+ if(addr >= sieve_start && contig_end < sieve_end) {
+ unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
+
+ /* Put the data into the sieve buffer */
+ HDmemcpy(base_sieve_buf, buf, len);
+
+ /* Set sieve buffer dirty flag */
+ dset_contig->sieve_dirty = TRUE;
} /* end if */
+ /* Entire request is not within this data sieve buffer */
+ else {
+ /* Check if we can actually hold the I/O request in the sieve buffer */
+ if(len > dset_contig->sieve_buf_size) {
+ /* Check for any overlap with the current sieve buffer */
+ if((sieve_start >= addr && sieve_start < (contig_end + 1))
+ || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
+ /* Flush the sieve buffer, if it's dirty */
+ if(dset_contig->sieve_dirty) {
+ /* Write to file */
+ if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
- /* Works through sequences as fast as possible */
- for(; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
+ } /* end if */
- /* Compute offset on disk */
- addr = store_contig->dset_addr + dset_offset_arr[u];
+ /* Force the sieve buffer to be re-read the next time */
+ dset_contig->sieve_loc = HADDR_UNDEF;
+ dset_contig->sieve_size = 0;
+ } /* end if */
+
+ /* Write directly from the user's buffer */
+ if(H5F_block_write(file, H5FD_MEM_DRAW, addr, len, udata->dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
+ } /* end if */
+ /* Element size fits within the buffer size */
+ else {
+ /* Check if it is possible to (exactly) prepend or append to existing (dirty) sieve buffer */
+ if(((addr + len) == sieve_start || addr == sieve_end) &&
+ (len + sieve_size) <= dset_contig->sieve_buf_size &&
+ dset_contig->sieve_dirty) {
+ /* Prepend to existing sieve buffer */
+ if((addr + len) == sieve_start) {
+ /* Move existing sieve information to correct location */
+ HDmemmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf, dset_contig->sieve_size);
+
+ /* Copy in new information (must be first in sieve buffer) */
+ HDmemcpy(dset_contig->sieve_buf, buf, len);
+
+ /* Adjust sieve location */
+ dset_contig->sieve_loc = addr;
- /* Compute offset in memory */
- buf = (const unsigned char *)io_info->u.wbuf + mem_offset_arr[v];
+ } /* end if */
+ /* Append to existing sieve buffer */
+ else {
+ /* Copy in new information */
+ HDmemcpy(dset_contig->sieve_buf + sieve_size, buf, len);
+ } /* end else */
- /* No data sieve buffer yet, go allocate one */
- if(NULL == dset_contig->sieve_buf) {
- /* Check if we can actually hold the I/O request in the sieve buffer */
- if(size>dset_contig->sieve_buf_size) {
- if(H5F_block_write(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
+ /* Adjust sieve size */
+ dset_contig->sieve_size += len;
+
+ /* Update local copies of sieve information */
+ sieve_start = dset_contig->sieve_loc;
+ sieve_size = dset_contig->sieve_size;
+ sieve_end = sieve_start + sieve_size;
} /* end if */
+ /* Can't add the new data onto the existing sieve buffer */
else {
- /* Allocate room for the data sieve buffer */
- if(NULL == (dset_contig->sieve_buf = H5FL_BLK_MALLOC(sieve_buf, dset_contig->sieve_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-#ifdef H5_CLEAR_MEMORY
-if(dset_contig->sieve_size > size)
- HDmemset(dset_contig->sieve_buf + size, 0, (dset_contig->sieve_size - size));
-#endif /* H5_CLEAR_MEMORY */
+ /* Flush the sieve buffer if it's dirty */
+ if(dset_contig->sieve_dirty) {
+ /* Write to file */
+ if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
+
+ /* Reset sieve buffer dirty flag */
+ dset_contig->sieve_dirty = FALSE;
+ } /* end if */
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
/* Make certain we don't read off the end of the file */
if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size")
- /* Set up the buffer parameters */
- max_data = store_contig->dset_size - dset_offset_arr[u];
+ /* Only need this when resizing sieve buffer */
+ max_data = store_contig->dset_size - dst_off;
/* Compute the size of the sieve buffer */
+ /* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
- /* Check if there is any point in reading the data from the file */
- if(dset_contig->sieve_size>size) {
- /* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
- } /* end if */
-
- /* Grab the data out of the buffer (must be first piece of data in buffer ) */
- HDmemcpy(dset_contig->sieve_buf, buf, size);
-
- /* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = 1;
-
- /* Stash local copies of these values */
+ /* Update local copies of sieve information */
sieve_start = dset_contig->sieve_loc;
sieve_size = dset_contig->sieve_size;
sieve_end = sieve_start + sieve_size;
- } /* end else */
- } /* end if */
- else {
- /* Compute end of sequence to retrieve */
- contig_end = addr + size - 1;
- /* If entire write is within the sieve buffer, write it to the buffer */
- if(addr >= sieve_start && contig_end < sieve_end) {
- unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
+ /* Check if there is any point in reading the data from the file */
+ if(dset_contig->sieve_size > len) {
+ /* Read the new sieve buffer */
+ if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, udata->dxpl_id, dset_contig->sieve_buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
+ } /* end if */
- /* Put the data into the sieve buffer */
- HDmemcpy(base_sieve_buf, buf, size);
+ /* Grab the data out of the buffer (must be first piece of data in buffer ) */
+ HDmemcpy(dset_contig->sieve_buf, buf, len);
/* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = 1;
- } /* end if */
- /* Entire request is not within this data sieve buffer */
- else {
- /* Check if we can actually hold the I/O request in the sieve buffer */
- if(size>dset_contig->sieve_buf_size) {
- /* Check for any overlap with the current sieve buffer */
- if((sieve_start >= addr && sieve_start < (contig_end + 1))
- || ((sieve_end - 1) >= addr && (sieve_end - 1) < (contig_end + 1))) {
- /* Flush the sieve buffer, if it's dirty */
- if(dset_contig->sieve_dirty) {
- /* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
- } /* end if */
-
- /* Force the sieve buffer to be re-read the next time */
- dset_contig->sieve_loc = HADDR_UNDEF;
- dset_contig->sieve_size = 0;
- } /* end if */
-
- /* Write directly from the user's buffer */
- if(H5F_block_write(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
- } /* end if */
- /* Element size fits within the buffer size */
- else {
- /* Check if it is possible to (exactly) prepend or append to existing (dirty) sieve buffer */
- if(((addr + size) == sieve_start || addr == sieve_end) &&
- (size + sieve_size) <= dset_contig->sieve_buf_size &&
- dset_contig->sieve_dirty) {
- /* Prepend to existing sieve buffer */
- if((addr + size) == sieve_start) {
- /* Move existing sieve information to correct location */
- HDmemmove(dset_contig->sieve_buf + size, dset_contig->sieve_buf, dset_contig->sieve_size);
-
- /* Copy in new information (must be first in sieve buffer) */
- HDmemcpy(dset_contig->sieve_buf, buf, size);
-
- /* Adjust sieve location */
- dset_contig->sieve_loc = addr;
-
- } /* end if */
- /* Append to existing sieve buffer */
- else {
- /* Copy in new information */
- HDmemcpy(dset_contig->sieve_buf + sieve_size, buf, size);
- } /* end else */
-
- /* Adjust sieve size */
- dset_contig->sieve_size += size;
-
- /* Update local copies of sieve information */
- sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
- } /* end if */
- /* Can't add the new data onto the existing sieve buffer */
- else {
- /* Flush the sieve buffer if it's dirty */
- if(dset_contig->sieve_dirty) {
- /* Write to file */
- if(H5F_block_write(file, H5FD_MEM_DRAW, sieve_start, sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Reset sieve buffer dirty flag */
- dset_contig->sieve_dirty = 0;
- } /* end if */
-
- /* Determine the new sieve buffer size & location */
- dset_contig->sieve_loc = addr;
-
- /* Make certain we don't read off the end of the file */
- if(HADDR_UNDEF == (rel_eoa = H5F_get_eoa(file, H5FD_MEM_DRAW)))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size")
-
- /* Only need this when resizing sieve buffer */
- max_data = store_contig->dset_size - dset_offset_arr[u];
-
- /* Compute the size of the sieve buffer */
- /* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
- H5_ASSIGN_OVERFLOW(dset_contig->sieve_size, MIN3(rel_eoa - dset_contig->sieve_loc, max_data, dset_contig->sieve_buf_size), hsize_t, size_t);
-
- /* Update local copies of sieve information */
- sieve_start = dset_contig->sieve_loc;
- sieve_size = dset_contig->sieve_size;
- sieve_end = sieve_start + sieve_size;
-
- /* Check if there is any point in reading the data from the file */
- if(dset_contig->sieve_size > size) {
- /* Read the new sieve buffer */
- if(H5F_block_read(file, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, io_info->dxpl_id, dset_contig->sieve_buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed")
- } /* end if */
-
- /* Grab the data out of the buffer (must be first piece of data in buffer ) */
- HDmemcpy(dset_contig->sieve_buf, buf, size);
-
- /* Set sieve buffer dirty flag */
- dset_contig->sieve_dirty = 1;
- } /* end else */
- } /* end else */
+ dset_contig->sieve_dirty = TRUE;
} /* end else */
} /* end else */
+ } /* end else */
+ } /* end else */
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_contig_writevv_sieve_cb() */
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
+
+/*-------------------------------------------------------------------------
+ * Function: H5D_contig_writevv_cb
+ *
+ * Purpose: Callback operator for H5D_contig_writevv().
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, Sept 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
+{
+ H5D_contig_writevv_ud_t *udata = (H5D_contig_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
- } /* end if */
- else {
- /* Work through all the sequences */
- for(u = *dset_curr_seq, v = *mem_curr_seq; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv_cb)
- /* Compute offset on disk */
- addr = store_contig->dset_addr + dset_offset_arr[u];
+ /* Write data */
+ if(H5F_block_write(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id, (udata->wbuf + src_off)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed")
- /* Compute offset in memory */
- buf = (const unsigned char *)io_info->u.wbuf + mem_offset_arr[v];
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_contig_writevv_cb() */
- /* Write data */
- if(H5F_block_write(file, H5FD_MEM_DRAW, addr, size, io_info->dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
+
+/*-------------------------------------------------------------------------
+ * Function: H5D_contig_writevv
+ *
+ * Purpose: Writes some data vectors into a dataset from vectors into a
+ * buffer. The address is the start of the dataset,
+ * relative to the base address for the file and the offsets and
+ * sequence lengths are in bytes.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Friday, May 2, 2003
+ *
+ * Notes:
+ * Offsets in the sequences must be monotonically increasing
+ *
+ *-------------------------------------------------------------------------
+ */
+static ssize_t
+H5D_contig_writevv(const H5D_io_info_t *io_info,
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
+{
+ ssize_t ret_value; /* Return value (Size of sequence in bytes) */
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
+ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv)
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
+ /* Check args */
+ HDassert(io_info);
+ HDassert(dset_curr_seq);
+ HDassert(dset_len_arr);
+ HDassert(dset_off_arr);
+ HDassert(mem_curr_seq);
+ HDassert(mem_len_arr);
+ HDassert(mem_off_arr);
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
+ /* Check if data sieving is enabled */
+ if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_DATA_SIEVE)) {
+ H5D_contig_writevv_sieve_ud_t udata; /* User data for H5V_opvv() operator */
+
+ /* Set up user data for H5V_opvv() */
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_contig = &(io_info->dset->shared->cache.contig);
+ udata.store_contig = &(io_info->store->contig);
+ udata.wbuf = (const unsigned char *)io_info->u.wbuf;
+ udata.dxpl_id = io_info->dxpl_id;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_contig_writevv_sieve_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer write")
+ } /* end if */
+ else {
+ H5D_contig_writevv_ud_t udata; /* User data for H5V_opvv() operator */
+
+ /* Set up user data for H5V_opvv() */
+ udata.file = io_info->dset->oloc.file;
+ udata.dset_addr = io_info->store->contig.dset_addr;
+ udata.wbuf = (const unsigned char *)io_info->u.wbuf;
+ udata.dxpl_id = io_info->dxpl_id;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_contig_writevv_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
} /* end else */
- /* Update current sequence vectors */
- *dset_curr_seq = u;
- *mem_curr_seq = v;
-
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_writevv() */
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 87471f1..bcb47a2 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -33,6 +33,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* Files */
#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Vprivate.h" /* Vector and array functions */
/****************/
@@ -44,6 +45,18 @@
/* Local Typedefs */
/******************/
+/* Callback info for readvv operation */
+typedef struct H5D_efl_readvv_ud_t {
+ const H5O_efl_t *efl; /* Pointer to efl info */
+ unsigned char *rbuf; /* Read buffer */
+} H5D_efl_readvv_ud_t;
+
+/* Callback info for writevv operation */
+typedef struct H5D_efl_writevv_ud_t {
+ const H5O_efl_t *efl; /* Pointer to efl info */
+ const unsigned char *wbuf; /* Write buffer */
+} H5D_efl_writevv_ud_t;
+
/********************/
/* Local Prototypes */
@@ -398,6 +411,35 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D_efl_readvv_cb
+ *
+ * Purpose: Callback operator for H5D_efl_readvv().
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, Sept 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
+{
+ H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5D_efl_readvv_cb)
+
+ /* Read data */
+ if(H5D_efl_read(udata->efl, dst_off, len, (udata->rbuf + src_off)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "EFL read failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_efl_readvv_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D_efl_readvv
*
* Purpose: Reads data from an external file list. It is an error to
@@ -414,65 +456,67 @@ done:
*/
static ssize_t
H5D_efl_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[])
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- const H5O_efl_t *efl = &(io_info->store->efl); /* Pointer to efl info */
- unsigned char *buf; /* Pointer to buffer to write */
- haddr_t addr; /* Actual address to read */
- size_t size; /* Size of sequence in bytes */
- size_t u, v; /* Counting variables */
- ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
+ H5D_efl_readvv_ud_t udata; /* User data for H5V_opvv() operator */
+ ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
FUNC_ENTER_NOAPI_NOINIT(H5D_efl_readvv)
/* Check args */
- HDassert(efl && efl->nused > 0);
+ HDassert(io_info);
+ HDassert(io_info->store->efl.nused > 0);
HDassert(io_info->u.rbuf);
+ HDassert(dset_curr_seq);
+ HDassert(dset_len_arr);
+ HDassert(dset_off_arr);
+ HDassert(mem_curr_seq);
+ HDassert(mem_len_arr);
+ HDassert(mem_off_arr);
+
+ /* Set up user data for H5V_opvv() */
+ udata.efl = &(io_info->store->efl);
+ udata.rbuf = (unsigned char *)io_info->u.rbuf;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_efl_readvv_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL read")
- /* Work through all the sequences */
- for(u = *dset_curr_seq, v = *mem_curr_seq; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
-
- /* Compute offset on disk */
- addr = dset_offset_arr[u];
-
- /* Compute offset in memory */
- buf = (unsigned char *)io_info->u.rbuf + mem_offset_arr[v];
-
- /* Read data */
- if(H5D_efl_read(efl, addr, size, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
-
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
-
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D_efl_readvv() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5D_efl_writevv_cb
+ *
+ * Purpose: Callback operator for H5D_efl_writevv().
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, Sept 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D_efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
+{
+ H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5D_efl_writevv_cb)
- /* Update current sequence vectors */
- *dset_curr_seq = u;
- *mem_curr_seq = v;
+ /* Write data */
+ if(H5D_efl_write(udata->efl, dst_off, len, (udata->wbuf + src_off)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "EFL write failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_efl_readvv() */
+} /* end H5D_efl_writevv_cb() */
/*-------------------------------------------------------------------------
@@ -492,62 +536,34 @@ done:
*/
static ssize_t
H5D_efl_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[])
+ size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
+ size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
{
- const H5O_efl_t *efl = &(io_info->store->efl); /* Pointer to efl info */
- const unsigned char *buf; /* Pointer to buffer to write */
- haddr_t addr; /* Actual address to read */
- size_t size; /* Size of sequence in bytes */
- size_t u, v; /* Counting variables */
- ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
+ H5D_efl_writevv_ud_t udata; /* User data for H5V_opvv() operator */
+ ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
FUNC_ENTER_NOAPI_NOINIT(H5D_efl_writevv)
/* Check args */
- HDassert(efl && efl->nused > 0);
+ HDassert(io_info);
+ HDassert(io_info->store->efl.nused > 0);
HDassert(io_info->u.wbuf);
-
- /* Work through all the sequences */
- for(u = *dset_curr_seq, v = *mem_curr_seq; u < dset_max_nseq && v < mem_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(mem_len_arr[v] < dset_len_arr[u])
- size = mem_len_arr[v];
- else
- size = dset_len_arr[u];
-
- /* Compute offset on disk */
- addr = dset_offset_arr[u];
-
- /* Compute offset in memory */
- buf = (const unsigned char *)io_info->u.wbuf + mem_offset_arr[v];
-
- /* Write data */
- if(H5D_efl_write(efl, addr, size, buf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed")
-
- /* Update memory information */
- mem_len_arr[v] -= size;
- if(mem_len_arr[v] == 0)
- v++;
- else
- mem_offset_arr[v] += size;
-
- /* Update file information */
- dset_len_arr[u] -= size;
- if(dset_len_arr[u] == 0)
- u++;
- else
- dset_offset_arr[u] += size;
-
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
-
- /* Update current sequence vectors */
- *dset_curr_seq = u;
- *mem_curr_seq = v;
-
+ HDassert(dset_curr_seq);
+ HDassert(dset_len_arr);
+ HDassert(dset_off_arr);
+ HDassert(mem_curr_seq);
+ HDassert(mem_len_arr);
+ HDassert(mem_off_arr);
+
+ /* Set up user data for H5V_opvv() */
+ udata.efl = &(io_info->store->efl);
+ udata.wbuf = (const unsigned char *)io_info->u.wbuf;
+
+ /* Call generic sequence operation routine */
+ if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
+ mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
+ H5D_efl_writevv_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL write")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_efl_writevv() */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 34bf1da..96acc58 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -394,7 +394,7 @@ typedef struct H5D_rdcdc_t {
haddr_t sieve_loc; /* File location (offset) of the data sieve buffer */
size_t sieve_size; /* Size of the data sieve buffer used (in bytes) */
size_t sieve_buf_size; /* Size of the data sieve buffer allocated (in bytes) */
- unsigned sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
+ hbool_t sieve_dirty; /* Flag to indicate that the data sieve buffer is dirty */
} H5D_rdcdc_t;
/*
@@ -583,12 +583,6 @@ H5_DLL herr_t H5D_contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *typ
H5_DLL herr_t H5D_contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t *fm);
-H5_DLL ssize_t H5D_contig_readvv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-H5_DLL ssize_t H5D_contig_writevv(const H5D_io_info_t *io_info,
- size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
- size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
H5_DLL herr_t H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
H5F_t *f_dst, H5O_storage_contig_t *storage_dst, H5T_t *src_dtype,
H5O_copy_t *cpy_info, hid_t dxpl_id);
diff --git a/src/H5E.c b/src/H5E.c
index 50509b8..8b6afc5 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -173,7 +173,8 @@ H5E_set_default_auto(H5E_t *stk)
#ifndef H5_NO_DEPRECATED_SYMBOLS
#ifdef H5_USE_16_API_DEFAULT
stk->auto_op.vers = 1;
-#else /* H5_USE_16_API_DEFAULT */
+ stk->auto_op.u.func1 = (H5E_auto1_t)H5Eprint1;
+#else /* H5_USE_16_API */
stk->auto_op.vers = 2;
#endif /* H5_USE_16_API_DEFAULT */
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 2fc53ea..600c3f3 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -312,12 +312,6 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
accum->dirty = FALSE;
} /* end if */
- /* Move remnant of accumulator down */
- HDmemmove(accum->buf, (accum->buf + shrink_size), remnant_size);
-
- /* Adjust accumulator's location */
- accum->loc += shrink_size;
-
/* Adjust dirty region tracking info */
accum->dirty_off -= shrink_size;
} /* end else */
@@ -325,6 +319,15 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
/* Trim the accumulator's use of its buffer */
accum->size = remnant_size;
+
+ /* When appending, need to adjust location of accumulator */
+ if(H5F_ACCUM_APPEND == adjust) {
+ /* Move remnant of accumulator down */
+ HDmemmove(accum->buf, (accum->buf + shrink_size), remnant_size);
+
+ /* Adjust accumulator's location */
+ accum->loc += shrink_size;
+ } /* end if */
} /* end if */
/* Check for accumulator needing to be reallocated */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 1f56737..4aa887b 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -140,7 +140,7 @@ H5FL_DEFINE_STATIC(H5S_hyper_span_info_t);
static herr_t
H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned depth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans_helper)
while(span) {
HDfprintf(f,"%s: depth=%u, span=%p, (%d, %d), nelem=%u, pstride=%u\n",FUNC,depth,span,(int)span->low,(int)span->high,(unsigned)span->nelem,(unsigned)span->pstride);
@@ -151,30 +151,30 @@ H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned dep
span=span->next;
} /* end while */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
herr_t
H5S_hyper_print_spans(FILE *f, const struct H5S_hyper_span_info_t *span_lst)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans)
if(span_lst!=NULL) {
HDfprintf(f,"%s: spans=%p, count=%u, scratch=%p, head=%p\n",FUNC,span_lst,span_lst->count,span_lst->scratch,span_lst->head);
H5S_hyper_print_spans_helper(f,span_lst->head,0);
} /* end if */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
herr_t
H5S_space_print_spans(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_space_print_spans);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_space_print_spans)
H5S_hyper_print_spans(f,space->select.sel_info.hslab->span_lst);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
static herr_t
@@ -182,7 +182,7 @@ H5S_hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, const
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo_helper)
if(dinfo!=NULL) {
HDfprintf(f,"%s: %s: start=[",FUNC,field);
@@ -201,18 +201,18 @@ H5S_hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, const
else
HDfprintf(f,"%s: %s==NULL\n",FUNC,field);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
herr_t
H5S_hyper_print_diminfo(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo)
H5S_hyper_print_diminfo_helper(f,"opt_diminfo",space->extent.rank,space->select.sel_info.hslab->opt_diminfo);
H5S_hyper_print_diminfo_helper(f,"app_diminfo",space->extent.rank,space->select.sel_info.hslab->app_diminfo);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
#endif /* H5S_HYPER_DEBUG */
@@ -232,8 +232,6 @@ H5S_hyper_print_diminfo(FILE *f, const H5S_t *space)
* is used by the H5S_select_shape_same() code to avoid changing
* the rank and appearance of the selection.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -245,31 +243,31 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
unsigned u; /* Index variable */
int i; /* Index variable */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_iter_init);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_iter_init)
/* Check args */
- assert(space && H5S_SEL_HYPERSLABS==H5S_GET_SELECT_TYPE(space));
- assert(iter);
+ HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ HDassert(iter);
/* Initialize the number of points to iterate over */
- iter->elmt_left=space->select.num_elem;
- iter->u.hyp.iter_rank=0;
+ iter->elmt_left = space->select.num_elem;
+ iter->u.hyp.iter_rank = 0;
/* Get the rank of the dataspace */
- rank=space->extent.rank;
+ rank = space->extent.rank;
/* Set the temporary pointer to the dimension information */
- tdiminfo=space->select.sel_info.hslab->opt_diminfo;
+ tdiminfo = space->select.sel_info.hslab->opt_diminfo;
/* Check for the special case of just one H5Sselect_hyperslab call made */
if(space->select.sel_info.hslab->diminfo_valid) {
/* Initialize the information needed for regular hyperslab I/O */
const hsize_t *mem_size; /* Temporary pointer to dataspace extent's dimension sizes */
hsize_t acc; /* Accumulator for "flattened" dimension's sizes */
- unsigned cont_dim=0; /* # of contiguous dimensions */
+ unsigned cont_dim = 0; /* # of contiguous dimensions */
/* Set the temporary pointer to the dataspace extent's dimension sizes */
- mem_size=space->extent.size;
+ mem_size = space->extent.size;
/*
* For a regular hyperslab to be contiguous up to some dimension, it
@@ -295,7 +293,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
} /* end if */
/* Check if the regular selection can be "flattened" */
- if(cont_dim>0) {
+ if(cont_dim > 0) {
unsigned last_dim_flattened = 1; /* Flag to indicate that the last dimension was flattened */
unsigned flat_rank = rank-cont_dim; /* Number of dimensions after flattening */
unsigned curr_dim; /* Current dimension */
@@ -320,7 +318,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
iter->u.hyp.diminfo[curr_dim].start = tdiminfo[i].start * acc;
/* Special case for single block regular selections */
- if(tdiminfo[i].count==1)
+ if(tdiminfo[i].count == 1)
iter->u.hyp.diminfo[curr_dim].stride = 1;
else
iter->u.hyp.diminfo[curr_dim].stride = tdiminfo[i].stride * acc;
@@ -333,7 +331,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
last_dim_flattened = 0;
/* Reset the "accumulator" for possible further dimension flattening */
- acc=1;
+ acc = 1;
} /* end if */
else {
/* All other dimensions */
@@ -351,13 +349,13 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
} /* end for */
/* Initialize "flattened" iterator offset to initial location and dataspace extent and selection information to correct values */
- for(u=0; u<flat_rank; u++)
- iter->u.hyp.off[u]=iter->u.hyp.diminfo[u].start;
+ for(u = 0; u < flat_rank; u++)
+ iter->u.hyp.off[u] = iter->u.hyp.diminfo[u].start;
} /* end if */
else {
/* Initialize position to initial location */
/* Also make local copy of the regular selection information */
- for(u=0; u<rank; u++) {
+ for(u = 0; u < rank; u++) {
/* Regular selection information */
iter->u.hyp.diminfo[u].start = tdiminfo[u].start;
iter->u.hyp.diminfo[u].stride = tdiminfo[u].stride;
@@ -365,51 +363,50 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
iter->u.hyp.diminfo[u].block = tdiminfo[u].block;
/* Position information */
- iter->u.hyp.off[u]=tdiminfo[u].start;
+ iter->u.hyp.off[u] = tdiminfo[u].start;
} /* end if */
} /* end else */
/* Flag the diminfo information as valid in the iterator */
- iter->u.hyp.diminfo_valid=TRUE;
+ iter->u.hyp.diminfo_valid = TRUE;
/* Initialize irregular region information also (for release) */
- iter->u.hyp.spans=NULL;
+ iter->u.hyp.spans = NULL;
} /* end if */
else {
/* Initialize the information needed for non-regular hyperslab I/O */
- assert(space->select.sel_info.hslab->span_lst);
+ HDassert(space->select.sel_info.hslab->span_lst);
/* Make a copy of the span tree to iterate over */
- iter->u.hyp.spans=H5S_hyper_copy_span(space->select.sel_info.hslab->span_lst);
+ iter->u.hyp.spans = H5S_hyper_copy_span(space->select.sel_info.hslab->span_lst);
/* Set the nelem & pstride values according to the element size */
H5S_hyper_span_precompute(iter->u.hyp.spans,iter->elmt_size);
/* Initialize the starting span_info's and spans */
- spans=iter->u.hyp.spans;
- for(u=0; u<rank; u++) {
+ spans = iter->u.hyp.spans;
+ for(u = 0; u < rank; u++) {
/* Set the pointers to the initial span in each dimension */
- assert(spans);
- assert(spans->head);
+ HDassert(spans);
+ HDassert(spans->head);
/* Set the pointer to the first span in the list for this node */
iter->u.hyp.span[u] = spans->head;
/* Set the initial offset to low bound of span */
- iter->u.hyp.off[u]=iter->u.hyp.span[u]->low;
+ iter->u.hyp.off[u] = iter->u.hyp.span[u]->low;
/* Get the pointer to the next level down */
- spans=spans->head->down;
+ spans = spans->head->down;
} /* end for */
/* Flag the diminfo information as not valid in the iterator */
- iter->u.hyp.diminfo_valid=FALSE;
-
+ iter->u.hyp.diminfo_valid = FALSE;
} /* end else */
/* Initialize type of selection iterator */
- iter->type=H5S_sel_iter_hyper;
+ iter->type = H5S_sel_iter_hyper;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_init() */
@@ -431,11 +428,11 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
static herr_t
H5S_hyper_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_coords);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_coords)
/* Check args */
- assert (iter);
- assert (coords);
+ HDassert(iter);
+ HDassert(coords);
/* Copy the offset of the current point */
@@ -496,7 +493,7 @@ H5S_hyper_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
else
HDmemcpy(coords, iter->u.hyp.off, sizeof(hsize_t) * iter->rank);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_coords() */
@@ -523,12 +520,12 @@ H5S_hyper_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_block);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_block)
/* Check args */
- assert (iter);
- assert (start);
- assert (end);
+ HDassert(iter);
+ HDassert(start);
+ HDassert(end);
/* Copy the offset of the current point */
@@ -550,7 +547,7 @@ H5S_hyper_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
end[u]=iter->u.hyp.span[u]->high;
} /* end else */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_block() */
@@ -571,12 +568,12 @@ H5S_hyper_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S_hyper_iter_nelmts (const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_nelmts);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_nelmts)
/* Check args */
- assert (iter);
+ HDassert(iter);
- FUNC_LEAVE_NOAPI(iter->elmt_left);
+ FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* H5S_hyper_iter_nelmts() */
@@ -661,7 +658,7 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned i; /* Counters */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next)
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection */
@@ -826,9 +823,9 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
if(curr_dim>=0) {
/* Walk back down the iterator positions, reseting them */
while(curr_dim<fast_dim) {
- assert(curr_span);
- assert(curr_span->down);
- assert(curr_span->down->head);
+ HDassert(curr_span);
+ HDassert(curr_span->down);
+ HDassert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -844,12 +841,12 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- assert(curr_span==ispan[fast_dim]);
+ HDassert(curr_span==ispan[fast_dim]);
} /* end if */
} /* end while */
} /* end else */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_next() */
@@ -876,7 +873,7 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned u; /* Counters */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next_block);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next_block)
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection */
@@ -1012,9 +1009,9 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
if(curr_dim>=0) {
/* Walk back down the iterator positions, reseting them */
while(curr_dim<fast_dim) {
- assert(curr_span);
- assert(curr_span->down);
- assert(curr_span->down->head);
+ HDassert(curr_span);
+ HDassert(curr_span->down);
+ HDassert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1030,11 +1027,11 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- assert(curr_span==ispan[fast_dim]);
+ HDassert(curr_span == ispan[fast_dim]);
} /* end if */
} /* end else */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_next() */
@@ -1058,17 +1055,17 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
static herr_t
H5S_hyper_iter_release (H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_release);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_release)
/* Check args */
- assert (iter);
+ HDassert(iter);
/* Release the information needed for non-regular hyperslab I/O */
/* Free the copy of the selections span tree */
- if(iter->u.hyp.spans!=NULL)
+ if(iter->u.hyp.spans != NULL)
H5S_hyper_free_span_info(iter->u.hyp.spans);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_iter_release() */
@@ -1144,11 +1141,11 @@ static herr_t
H5S_hyper_span_precompute_helper (H5S_hyper_span_info_t *spans, size_t elmt_size)
{
H5S_hyper_span_t *span; /* Hyperslab span */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_precompute_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_precompute_helper)
- assert(spans);
+ HDassert(spans);
/* Check if we've already set this down span tree */
if(spans->scratch!=(H5S_hyper_span_info_t *)~((size_t)NULL)) {
@@ -1163,7 +1160,7 @@ H5S_hyper_span_precompute_helper (H5S_hyper_span_info_t *spans, size_t elmt_size
/* If there are down spans, set their scratch value also */
if(span->down!=NULL) {
if(H5S_hyper_span_precompute_helper(span->down,elmt_size)==FAIL)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't reset hyperslab scratch pointer");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't reset hyperslab scratch pointer")
} /* end if */
/* Change the nelem & pstride values into bytes */
@@ -1176,7 +1173,7 @@ H5S_hyper_span_precompute_helper (H5S_hyper_span_info_t *spans, size_t elmt_size
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_span_precompute_helper() */
@@ -1422,7 +1419,7 @@ H5S_hyper_cmp_spans (H5S_hyper_span_info_t *span_info1, H5S_hyper_span_info_t *s
htri_t nest=FAIL;
htri_t ret_value=FAIL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_cmp_spans);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_cmp_spans)
/* Check for redundant comparison */
if(span_info1==span_info2)
@@ -1441,8 +1438,8 @@ H5S_hyper_cmp_spans (H5S_hyper_span_info_t *span_info1, H5S_hyper_span_info_t *s
span2=span_info2->head;
/* Sanity checking */
- assert(span1);
- assert(span2);
+ HDassert(span1);
+ HDassert(span2);
/* infinite loop which must be broken out of */
while (1) {
@@ -1494,7 +1491,7 @@ H5S_hyper_cmp_spans (H5S_hyper_span_info_t *span_info1, H5S_hyper_span_info_t *s
} /* end else */
} /* end else */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_cmp_spans() */
@@ -1523,9 +1520,9 @@ H5S_hyper_free_span_info (H5S_hyper_span_info_t *span_info)
H5S_hyper_span_t *span, *next_span;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span_info);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span_info)
- assert(span_info);
+ HDassert(span_info);
/* Decrement the span tree's reference count */
span_info->count--;
@@ -1538,7 +1535,7 @@ H5S_hyper_free_span_info (H5S_hyper_span_info_t *span_info)
while(span!=NULL) {
next_span=span->next;
if(H5S_hyper_free_span(span)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab span");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab span")
span=next_span;
} /* end while */
@@ -1547,7 +1544,7 @@ H5S_hyper_free_span_info (H5S_hyper_span_info_t *span_info)
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_free_span_info() */
@@ -1575,21 +1572,21 @@ H5S_hyper_free_span (H5S_hyper_span_t *span)
{
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span)
- assert(span);
+ HDassert(span);
/* Decrement the reference count of the 'down spans', freeing them if appropriate */
if(span->down!=NULL) {
if(H5S_hyper_free_span_info(span->down)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab span tree");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab span tree")
} /* end if */
/* Free this span */
span = H5FL_FREE(H5S_hyper_span_t, span);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_free_span() */
@@ -1624,14 +1621,14 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
const H5S_hyper_sel_t *src_hslab; /* Pointer to source hyperslab info */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_copy, FAIL);
+ FUNC_ENTER_NOAPI(H5S_hyper_copy, FAIL)
- assert(src);
- assert(dst);
+ HDassert(src);
+ HDassert(dst);
/* Allocate space for the hyperslab selection information */
if(NULL == (dst->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info")
/* Set temporary pointers */
dst_hslab=dst->select.sel_info.hslab;
@@ -1662,7 +1659,7 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_hyper_copy() */
@@ -1696,12 +1693,12 @@ H5S_hyper_is_valid_helper (const H5S_hyper_span_info_t *spans, const hssize_t *o
htri_t tmp; /* temporary return value */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_is_valid_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_is_valid_helper)
- assert(spans);
- assert(offset);
- assert(size);
- assert(rank<H5O_LAYOUT_NDIMS);
+ HDassert(spans);
+ HDassert(offset);
+ HDassert(size);
+ HDassert(rank < H5O_LAYOUT_NDIMS);
/* Check each point to determine whether selection+offset is within extent */
curr=spans->head;
@@ -1728,7 +1725,7 @@ H5S_hyper_is_valid_helper (const H5S_hyper_span_info_t *spans, const hssize_t *o
curr=curr->next;
} /* end while */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_hyper_is_valid_helper() */
@@ -1758,9 +1755,9 @@ H5S_hyper_is_valid (const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_valid);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_valid)
- assert(space);
+ HDassert(space);
/* Check for a "regular" hyperslab selection */
if(space->select.sel_info.hslab->diminfo_valid) {
@@ -1792,7 +1789,7 @@ H5S_hyper_is_valid (const H5S_t *space)
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_hyper_is_valid() */
@@ -2003,14 +2000,14 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start,
hsize_t u; /* Index variable */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_serialize_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_serialize_helper)
/* Sanity checks */
- assert(spans);
- assert(start);
- assert(end);
- assert(rank<H5O_LAYOUT_NDIMS);
- assert(buf && *buf);
+ HDassert(spans);
+ HDassert(start);
+ HDassert(end);
+ HDassert(rank < H5O_LAYOUT_NDIMS);
+ HDassert(buf && *buf);
/* Walk through the list of spans, recursing or outputing them */
curr=spans->head;
@@ -2023,7 +2020,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start,
/* Recurse down to the next dimension */
if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,buf)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
} /* end if */
else {
/* Encode all the previous dimensions starting & ending points */
@@ -2048,7 +2045,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start,
} /* end while */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_serialize_helper() */
@@ -2250,17 +2247,17 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf)
unsigned i,j; /* local counting variables */
herr_t ret_value=FAIL; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_deserialize, FAIL);
+ FUNC_ENTER_NOAPI(H5S_hyper_deserialize, FAIL)
/* Check args */
- assert(space);
- assert(buf);
+ HDassert(space);
+ HDassert(buf);
/* Deserialize slabs to select */
buf+=16; /* Skip over selection header */
UINT32DECODE(buf,rank); /* decode the rank of the point selection */
if(rank!=space->extent.rank)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace")
UINT32DECODE(buf,num_elem); /* decode the number of points */
/* Set the count & stride for all blocks */
@@ -2285,11 +2282,11 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf)
/* Select or add the hyperslab to the current selection */
if((ret_value=H5S_select_hyperslab(space,(i==0 ? H5S_SELECT_SET : H5S_SELECT_OR),start,stride,count,block))<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection")
} /* end for */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_deserialize() */
@@ -2355,7 +2352,7 @@ H5S_hyper_span_blocklist(H5S_hyper_span_info_t *spans, hsize_t start[], hsize_t
/* Recurse down to the next dimension */
if(H5S_hyper_span_blocklist(curr->down, start, end, (rank + 1), startblock, numblocks, buf) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
} /* end if */
else {
/* Skip this block if we haven't skipped all the startblocks yet */
@@ -2889,9 +2886,9 @@ H5S_hyper_is_contiguous(const H5S_t *space)
unsigned u; /* index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_contiguous);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_contiguous)
- assert(space);
+ HDassert(space);
/* Check for a "regular" hyperslab selection */
if(space->select.sel_info.hslab->diminfo_valid) {
@@ -3044,7 +3041,7 @@ H5S_hyper_is_contiguous(const H5S_t *space)
ret_value=TRUE;
} /* end else */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_is_contiguous() */
@@ -3074,9 +3071,9 @@ H5S_hyper_is_single(const H5S_t *space)
unsigned u; /* index variable */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_single);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_single)
- assert(space);
+ HDassert(space);
/* Check for a "single" hyperslab selection */
if(space->select.sel_info.hslab->diminfo_valid) {
@@ -3112,7 +3109,7 @@ H5S_hyper_is_single(const H5S_t *space)
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_is_single() */
@@ -3141,10 +3138,10 @@ H5S_hyper_is_regular(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_regular);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_regular)
/* Check args */
- assert(space);
+ HDassert(space);
/* Only simple check for regular hyperslabs for now... */
if(space->select.sel_info.hslab->diminfo_valid)
@@ -3152,7 +3149,7 @@ H5S_hyper_is_regular(const H5S_t *space)
else
ret_value=FALSE;
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_is_regular() */
@@ -3228,10 +3225,10 @@ done:
static herr_t
H5S_hyper_recover_span (unsigned *recover, H5S_hyper_span_t **curr_span, H5S_hyper_span_t *next_span)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_recover_span);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_recover_span)
- assert(recover);
- assert(curr_span);
+ HDassert(recover);
+ HDassert(curr_span);
/* Check if the span should be recovered */
if(*recover) {
@@ -3242,7 +3239,7 @@ H5S_hyper_recover_span (unsigned *recover, H5S_hyper_span_t **curr_span, H5S_hyp
/* Set the current span to next span */
*curr_span=next_span;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_recover_span() */
@@ -3271,16 +3268,16 @@ H5S_hyper_coord_to_span(unsigned rank, hsize_t *coords)
H5S_hyper_span_info_t *down=NULL; /* Pointer to new span tree for next level down */
H5S_hyper_span_t *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_coord_to_span);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_coord_to_span)
- assert(rank>0);
- assert(coords);
+ HDassert(rank > 0);
+ HDassert(coords);
/* Search for location to insert new element in tree */
if(rank>1) {
/* Allocate a span info node */
if((down = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Set the reference count */
down->count=0;
@@ -3290,12 +3287,12 @@ H5S_hyper_coord_to_span(unsigned rank, hsize_t *coords)
/* Build span tree for coordinates below this one */
if((down->head=H5S_hyper_coord_to_span(rank-1,&coords[1]))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
/* Build span for this coordinate */
if((new_span = H5S_hyper_new_span(coords[0],coords[0],down,NULL))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Set return value */
ret_value=new_span;
@@ -3306,7 +3303,7 @@ done:
H5S_hyper_free_span_info(down);
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_coord_to_span() */
@@ -3340,11 +3337,11 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
H5S_hyper_span_t *new_span; /* New span created for element */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_add_span_element_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_add_span_element_helper)
- assert(span_tree);
- assert(rank>0);
- assert(coords);
+ HDassert(span_tree);
+ HDassert(rank > 0);
+ HDassert(coords);
/* Get pointer to last span in span tree */
tspan_info=span_tree;
@@ -3352,7 +3349,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
tmp_span=(H5S_hyper_span_t *)span_tree->scratch;
else {
tmp_span=span_tree->head;
- assert(tmp_span);
+ HDassert(tmp_span);
span_tree->scratch=(H5S_hyper_span_info_t *)tmp_span;
} /* end else */
@@ -3372,7 +3369,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
tmp_span=(H5S_hyper_span_t *)tspan_info->scratch;
else {
tmp_span=tspan_info->head;
- assert(tmp_span);
+ HDassert(tmp_span);
tspan_info->scratch=(H5S_hyper_span_info_t *)tmp_span;
} /* end else */
} /* end while */
@@ -3424,14 +3421,14 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
/* Make span tree for current coordinates */
if((new_span=H5S_hyper_coord_to_span(rank,coords))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Add new span tree as span */
- assert(tmp_span);
+ HDassert(tmp_span);
tmp_span->next=new_span;
/* Make scratch pointer point to last span in list */
- assert(tspan_info);
+ HDassert(tspan_info);
tspan_info->scratch=(H5S_hyper_span_info_t *)new_span;
/* Set the proper 'pstride' for new span */
@@ -3493,10 +3490,10 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
} /* end if */
else {
if((new_span = H5S_hyper_new_span(coords[0],coords[0],NULL,NULL))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Add new span tree as span */
- assert(tmp_span);
+ HDassert(tmp_span);
tmp_span->next=new_span;
/* Make scratch pointer point to last span in list */
@@ -3508,7 +3505,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_add_span_element_helper() */
@@ -3652,9 +3649,9 @@ H5S_hyper_convert(H5S_t *space)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_convert);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_convert)
- assert(space);
+ HDassert(space);
/* Check the type of selection */
switch(H5S_GET_SELECT_TYPE(space)) {
@@ -3677,7 +3674,7 @@ H5S_hyper_convert(H5S_t *space)
/* Convert to hyperslab selection */
if(H5S_select_hyperslab(space,H5S_SELECT_SET,tmp_start,tmp_stride,tmp_count,tmp_block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
} /* end case */
break;
@@ -3689,11 +3686,11 @@ H5S_hyper_convert(H5S_t *space)
case H5S_SEL_ERROR: /* Selection error */
case H5S_SEL_N: /* Selection count */
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "can't convert to span tree selection");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "can't convert to span tree selection")
} /* end switch */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_convert() */
#ifdef LATER
@@ -3724,10 +3721,10 @@ H5S_hyper_intersect_helper (H5S_hyper_span_info_t *spans1, H5S_hyper_span_info_t
htri_t status; /* Status from recursive call */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_helper)
/* Sanity check */
- assert((spans1 && spans2) || (spans1==NULL && spans2==NULL));
+ HDassert((spans1 && spans2) || (spans1 == NULL && spans2 == NULL));
/* "NULL" span trees compare as overlapping */
if(spans1==NULL && spans2==NULL)
@@ -3749,7 +3746,7 @@ H5S_hyper_intersect_helper (H5S_hyper_span_info_t *spans1, H5S_hyper_span_info_t
else {
/* Recursively check spans in next dimension down */
if((status=H5S_hyper_intersect_helper(curr1->down,curr2->down))<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check")
/* If there is a span intersection in the down dimensions, the span trees overlap */
if(status==TRUE)
@@ -3764,7 +3761,7 @@ H5S_hyper_intersect_helper (H5S_hyper_span_info_t *spans1, H5S_hyper_span_info_t
} /* end while */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_intersect_helper() */
@@ -3791,27 +3788,27 @@ H5S_hyper_intersect (H5S_t *space1, H5S_t *space2)
{
htri_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect)
/* Sanity check */
- assert(space1);
- assert(space2);
+ HDassert(space1);
+ HDassert(space2);
/* Check that the space selections both have span trees */
if(space1->select.sel_info.hslab->span_lst==NULL ||
space2->select.sel_info.hslab->span_lst==NULL)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
/* Check that the dataspaces are both the same rank */
if(space1->extent.rank!=space2->extent.rank)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "dataspace ranks don't match");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "dataspace ranks don't match")
/* Perform the span-by-span intersection check */
if((ret_value=H5S_hyper_intersect_helper(space1->select.sel_info.hslab->span_lst,space2->select.sel_info.hslab->span_lst))<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_intersect() */
#endif /* LATER */
@@ -3843,12 +3840,12 @@ H5S_hyper_intersect_block_helper (const H5S_hyper_span_info_t *spans, hsize_t *s
htri_t status; /* Status from recursive call */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block_helper)
/* Sanity check */
- assert(spans);
- assert(start);
- assert(end);
+ HDassert(spans);
+ HDassert(start);
+ HDassert(end);
/* Get the span list for spans in this tree */
curr=spans->head;
@@ -3869,7 +3866,7 @@ H5S_hyper_intersect_block_helper (const H5S_hyper_span_info_t *spans, hsize_t *s
else {
/* Recursively check spans in next dimension down */
if((status=H5S_hyper_intersect_block_helper(curr->down,start+1,end+1))<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check")
/* If there is a span intersection in the down dimensions, the span trees overlap */
if(status==TRUE)
@@ -3882,7 +3879,7 @@ H5S_hyper_intersect_block_helper (const H5S_hyper_span_info_t *spans, hsize_t *s
} /* end while */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_intersect_block_helper() */
@@ -3910,12 +3907,12 @@ H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t *end)
{
htri_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block)
/* Sanity check */
- assert(space);
- assert(start);
- assert(end);
+ HDassert(space);
+ HDassert(start);
+ HDassert(end);
/* Check for 'all' selection, instead of a hyperslab selection */
/* (Technically, this shouldn't be in the "hyperslab" routines...) */
@@ -3925,14 +3922,14 @@ H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t *end)
/* Check that the space selection has a span tree */
if(space->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
/* Perform the span-by-span intersection check */
if((ret_value=H5S_hyper_intersect_block_helper(space->select.sel_info.hslab->span_lst,start,end))<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab intersection check")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_intersect_block() */
@@ -3959,11 +3956,11 @@ H5S_hyper_adjust_helper_u (H5S_hyper_span_info_t *spans, const hsize_t *offset)
{
H5S_hyper_span_t *span; /* Pointer to current span in span tree */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_adjust_helper_u);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_adjust_helper_u)
/* Sanity check */
- assert(spans);
- assert(offset);
+ HDassert(spans);
+ HDassert(offset);
/* Check if we've already set this down span tree */
if(spans->scratch!=(H5S_hyper_span_info_t *)~((size_t)NULL)) {
@@ -3976,7 +3973,7 @@ H5S_hyper_adjust_helper_u (H5S_hyper_span_info_t *spans, const hsize_t *offset)
/* Iterate over the spans in tree */
while(span!=NULL) {
/* Adjust span offset */
- assert(span->low>=*offset);
+ HDassert(span->low>=*offset);
span->low-=*offset;
span->high-=*offset;
@@ -3989,7 +3986,7 @@ H5S_hyper_adjust_helper_u (H5S_hyper_span_info_t *spans, const hsize_t *offset)
} /* end while */
} /* end if */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_adjust_helper_u() */
@@ -4017,15 +4014,15 @@ H5S_hyper_adjust_u(H5S_t *space, const hsize_t *offset)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_u);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_u)
- assert(space);
- assert(offset);
+ HDassert(space);
+ HDassert(offset);
/* Subtract the offset from the "regular" coordinates, if they exist */
if(space->select.sel_info.hslab->diminfo_valid) {
for(u=0; u<space->extent.rank; u++) {
- assert(space->select.sel_info.hslab->opt_diminfo[u].start>=offset[u]);
+ HDassert(space->select.sel_info.hslab->opt_diminfo[u].start>=offset[u]);
space->select.sel_info.hslab->opt_diminfo[u].start-=offset[u];
} /* end for */
} /* end if */
@@ -4033,14 +4030,14 @@ H5S_hyper_adjust_u(H5S_t *space, const hsize_t *offset)
/* Subtract the offset from the span tree coordinates, if they exist */
if(space->select.sel_info.hslab->span_lst) {
if(H5S_hyper_adjust_helper_u(space->select.sel_info.hslab->span_lst,offset)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab offset adjustment");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab offset adjustment")
/* Reset the scratch pointers for the next routine which needs them */
H5S_hyper_span_scratch(space->select.sel_info.hslab->span_lst, NULL);
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_adjust_u() */
@@ -4629,7 +4626,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
H5S_hyper_span_t *new_span = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_append_span);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_append_span)
HDassert(prev_span);
HDassert(span_tree);
@@ -4638,16 +4635,16 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
if(*prev_span==NULL) {
/* Allocate new span node to append to list */
if((new_span = H5S_hyper_new_span(low,high,down,next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Make first node in span list */
/* Check that we haven't already allocated a span tree */
- assert(*span_tree==NULL);
+ HDassert(*span_tree==NULL);
/* Allocate a new span_info node */
if((*span_tree = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Set the span tree's basic information */
(*span_tree)->count=1;
@@ -4669,7 +4666,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
else {
/* Allocate new span node to append to list */
if((new_span = H5S_hyper_new_span(low,high,down,next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Check if there is actually a down span */
if(new_span->down) {
@@ -4753,14 +4750,14 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
unsigned recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_clip_spans);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_clip_spans)
/* Check args */
- assert (a_spans);
- assert (b_spans);
- assert (a_not_b);
- assert (a_and_b);
- assert (b_not_a);
+ HDassert(a_spans);
+ HDassert(b_spans);
+ HDassert(a_not_b);
+ HDassert(a_and_b);
+ HDassert(b_not_a);
/* Check if both span trees are not defined */
if(a_spans==NULL && b_spans==NULL) {
@@ -4773,12 +4770,12 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
*a_not_b=NULL;
*a_and_b=NULL;
if((*b_not_a=H5S_hyper_copy_span(b_spans))==NULL)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree")
} /* end if */
/* If span 'b' is not defined, but 'a' is, copy 'a' and set the other return span trees to empty */
else if(b_spans==NULL) {
if((*a_not_b=H5S_hyper_copy_span(a_spans))==NULL)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree")
*a_and_b=NULL;
*b_not_a=NULL;
} /* end if */
@@ -4788,7 +4785,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(H5S_hyper_cmp_spans(a_spans,b_spans)==TRUE) {
*a_not_b=NULL;
if((*a_and_b=H5S_hyper_copy_span(a_spans))==NULL)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree")
*b_not_a=NULL;
} /* end if */
else {
@@ -4815,7 +4812,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Advance span 'a', leave span 'b' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -4830,18 +4827,18 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Check for overlaps between upper part of span 'a' and lower part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- assert((span_a->down!=NULL && span_b->down!=NULL) || (span_a->down==NULL && span_b->down==NULL));
+ HDassert((span_a->down != NULL && span_b->down != NULL) || (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -4852,13 +4849,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_a->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -4868,7 +4865,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -4878,7 +4875,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -4891,7 +4888,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->high<span_b->high) {
/* Allocate new span node for upper part of span 'b' */
if((tmp_span = H5S_hyper_new_span(span_a->high+1,span_b->high,span_b->down,span_b->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -4917,18 +4914,18 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Check for overlaps between middle part of span 'a' and span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- assert((span_a->down!=NULL && span_b->down!=NULL) || (span_a->down==NULL && span_b->down==NULL));
+ HDassert((span_a->down != NULL && span_b->down != NULL) || (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -4939,13 +4936,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_b->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -4955,7 +4952,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -4965,7 +4962,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -4976,7 +4973,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Allocate new span node for upper part of span 'a' */
if((tmp_span = H5S_hyper_new_span(span_b->high+1,span_a->high,span_a->down,span_a->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Make upper part of span 'a' the new span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,tmp_span);
@@ -4996,7 +4993,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
else {
/* Keep going, nothing to split off */
@@ -5005,13 +5002,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between span 'a' and midle of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- assert((span_a->down!=NULL && span_b->down!=NULL) || (span_a->down==NULL && span_b->down==NULL));
+ HDassert((span_a->down != NULL && span_b->down != NULL) || (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -5022,13 +5019,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -5038,7 +5035,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -5048,7 +5045,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_a->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -5061,7 +5058,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Allocate new span node for upper part of spans 'a' */
if((tmp_span = H5S_hyper_new_span(span_a->high+1,span_b->high,span_b->down,span_b->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* And advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5088,7 +5085,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add lower part of span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
else {
/* Keep going, nothing to split off */
@@ -5097,13 +5094,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between lower part of span 'a' and upper part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- assert((span_a->down!=NULL && span_b->down!=NULL) || (span_a->down==NULL && span_b->down==NULL));
+ HDassert((span_a->down != NULL && span_b->down != NULL) || (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if(span_a->down==NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,NULL,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
} /* end if */
/* If there are down spans, check for the overlap in them and add to each appropriate list */
else {
@@ -5114,13 +5111,13 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->high,down_a_not_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_not_b);
@@ -5130,7 +5127,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_a_and_b!=NULL) {
/* Merge/add overlapped part with/to a_and_b list */
if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,down_a_and_b,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_a_and_b);
@@ -5140,7 +5137,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
if(down_b_not_a!=NULL) {
/* Merge/add overlapped part with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_b->high,down_b_not_a,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Release the down span tree generated */
H5S_hyper_free_span_info(down_b_not_a);
@@ -5151,7 +5148,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Allocate new span node for upper part of span 'a' */
if((tmp_span = H5S_hyper_new_span(span_b->high+1,span_a->high,span_a->down,span_a->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Make upper part of span 'a' into new span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,tmp_span);
@@ -5169,7 +5166,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Advance span 'b', leave span 'a' */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5183,7 +5180,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'a' with/to a_not_b list */
if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Advance to the next 'a' span */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5196,7 +5193,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Merge/add span 'b' with/to b_not_a list */
if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Advance to the next 'b' span */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5206,7 +5203,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_clip_spans() */
@@ -5243,10 +5240,10 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
unsigned recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
H5S_hyper_span_info_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_merge_spans_helper);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_merge_spans_helper)
/* Make certain both 'a' & 'b' spans have down span trees or neither does */
- assert((a_spans!=NULL && b_spans!=NULL) || (a_spans==NULL && b_spans==NULL));
+ HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
/* Check if the span trees for the 'a' span and the 'b' span are the same */
if(H5S_hyper_cmp_spans(a_spans,b_spans)==TRUE) {
@@ -5255,7 +5252,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
else {
/* Copy one of the span trees to return */
if((merged_spans=H5S_hyper_copy_span(a_spans))==NULL)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree")
} /* end else */
} /* end if */
else {
@@ -5278,7 +5275,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(span_a->high<span_b->low) {
/* Merge/add span 'a' with/to the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5293,19 +5290,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of span 'a' with/to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Merge/add lower part of span 'a' with/to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Get merged span tree for overlapped section */
tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down);
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5317,7 +5314,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Allocate new span node to append to list */
if((tmp_span = H5S_hyper_new_span(span_a->high+1,span_b->high,span_b->down,span_b->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5342,19 +5339,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of lower & middle parts of span 'a' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Merge/add lower part of span 'a' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Get merged span tree for overlapped section */
tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down);
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5364,7 +5361,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Allocate new span node to append to list */
if((tmp_span = H5S_hyper_new_span(span_b->high+1,span_a->high,span_a->down,span_a->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Set new span 'a' to tmp_span */
H5S_hyper_recover_span(&recover_a,&span_a,tmp_span);
@@ -5382,14 +5379,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of lower & middle parts of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Check if there is a lower part of span 'b' */
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* No lower part of span 'b' , keep going... */
@@ -5400,7 +5397,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5412,7 +5409,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Allocate new span node to append to list */
if((tmp_span = H5S_hyper_new_span(span_a->high+1,span_b->high,span_b->down,span_b->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance span 'a' */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5437,14 +5434,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) {
/* Merge/add copy of span 'b' to merged spans if so */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* Check if there is a lower part of span 'b' */
if(span_a->low>span_b->low) {
/* Merge/add lower part of span 'b' to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
} /* end if */
else {
/* No lower part of span 'b' , keep going... */
@@ -5455,7 +5452,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Merge/add overlapped section to merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,tmp_spans,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Release merged span tree for overlapped section */
H5S_hyper_free_span_info(tmp_spans);
@@ -5465,7 +5462,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Allocate new span node to append to list */
if((tmp_span = H5S_hyper_new_span(span_b->high+1,span_a->high,span_a->down,span_a->next))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Set new span 'a' to tmp_span */
H5S_hyper_recover_span(&recover_a,&span_a,tmp_span);
@@ -5481,7 +5478,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
else {
/* Merge/add span 'b' with the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance span 'b' */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5493,7 +5490,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
while(span_a!=NULL) {
/* Merge/add all 'a' spans into the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance to next 'a' span, until all processed */
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
@@ -5505,7 +5502,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
while(span_b!=NULL) {
/* Merge/add all 'b' spans into the merged spans */
if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Advance to next 'b' span, until all processed */
H5S_hyper_recover_span(&recover_b,&span_b,span_b->next);
@@ -5523,7 +5520,7 @@ done:
HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, NULL, "failed to release merged hyperslab spans")
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_merge_spans_helper() */
@@ -5555,11 +5552,11 @@ done:
static herr_t
H5S_hyper_merge_spans (H5S_t *space, H5S_hyper_span_info_t *new_spans, hbool_t can_own)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_merge_spans);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_merge_spans)
/* Check args */
- assert (space);
- assert (new_spans);
+ HDassert(space);
+ HDassert(new_spans);
/* If this is the first span tree in the hyperslab selection, just use it */
if(space->select.sel_info.hslab->span_lst==NULL) {
@@ -5575,7 +5572,7 @@ H5S_hyper_merge_spans (H5S_t *space, H5S_hyper_span_info_t *new_spans, hbool_t c
merged_spans=H5S_hyper_merge_spans_helper(space->select.sel_info.hslab->span_lst, new_spans);
/* Sanity checking since we started with some spans, we should still have some after the merge */
- assert(merged_spans);
+ HDassert(merged_spans);
/* Free the previous spans */
H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst);
@@ -5584,7 +5581,7 @@ H5S_hyper_merge_spans (H5S_t *space, H5S_hyper_span_info_t *new_spans, hbool_t c
space->select.sel_info.hslab->span_lst=merged_spans;
} /* end else */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_hyper_merge_spans() */
@@ -5611,7 +5608,7 @@ H5S_hyper_spans_nelem (H5S_hyper_span_info_t *spans)
H5S_hyper_span_t *span; /* Hyperslab span */
hsize_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_spans_nelem);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_spans_nelem)
/* Count the number of elements in the span tree */
if(spans==NULL)
@@ -5632,7 +5629,7 @@ H5S_hyper_spans_nelem (H5S_hyper_span_info_t *spans)
} /* end while */
} /* end else */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_spans_nelem() */
@@ -5673,7 +5670,7 @@ H5S_hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride,
unsigned u; /* Counters */
H5S_hyper_span_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_make_spans);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_make_spans)
/* Check args */
HDassert(rank > 0);
@@ -6004,10 +6001,10 @@ H5S_hyper_generate_spans(H5S_t *space)
unsigned u; /* Counter */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_generate_spans);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_generate_spans)
- assert(space);
- assert(H5S_GET_SELECT_TYPE(space)==H5S_SEL_HYPERSLABS);
+ HDassert(space);
+ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Get the diminfo */
for(u=0; u<space->extent.rank; u++) {
@@ -6019,10 +6016,10 @@ H5S_hyper_generate_spans(H5S_t *space)
/* Build the hyperslab information also */
if(H5S_generate_hyperslab (space, H5S_SELECT_SET, tmp_start, tmp_stride, tmp_count, tmp_block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_hyper_generate_spans() */
#ifndef NEW_HYPERSLAB_API
@@ -6054,25 +6051,25 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
H5S_hyper_span_info_t *b_not_a=NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab)
/* Check args */
- assert(space);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
- assert(start);
- assert(stride);
- assert(count);
- assert(block);
+ HDassert(space);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ HDassert(start);
+ HDassert(stride);
+ HDassert(count);
+ HDassert(block);
/* Generate span tree for new hyperslab information */
if((new_spans=H5S_hyper_make_spans(space->extent.rank,start,stride,count,block))==NULL)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information")
/* Generate list of blocks to add/remove based on selection operation */
if(op==H5S_SELECT_SET) {
/* Add new spans to current selection */
if(H5S_hyper_merge_spans(space,new_spans,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Set the number of elements in current selection */
space->select.num_elem=H5S_hyper_spans_nelem(new_spans);
@@ -6085,14 +6082,14 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Generate lists of spans which overlap and don't overlap */
if(H5S_hyper_clip_spans(space->select.sel_info.hslab->span_lst,new_spans,&a_not_b,&a_and_b,&b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
switch(op) {
case H5S_SELECT_OR:
/* Add any new spans from b_not_a to current selection */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(space,b_not_a,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem+=H5S_hyper_spans_nelem(b_not_a);
@@ -6105,7 +6102,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_AND:
/* Free the current selection */
if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
space->select.sel_info.hslab->span_lst=NULL;
/* Reset the number of items in selection */
@@ -6114,7 +6111,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Check if there are any overlapped selections */
if(a_and_b!=NULL) {
if(H5S_hyper_merge_spans(space,a_and_b,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem=H5S_hyper_spans_nelem(a_and_b);
@@ -6130,7 +6127,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_XOR:
/* Free the current selection */
if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
space->select.sel_info.hslab->span_lst=NULL;
/* Reset the number of items in selection */
@@ -6139,7 +6136,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Check if there are any non-overlapped selections */
if(a_not_b!=NULL) {
if(H5S_hyper_merge_spans(space,a_not_b,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem=H5S_hyper_spans_nelem(a_not_b);
@@ -6149,7 +6146,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
} /* end if */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(space,b_not_a,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem+=H5S_hyper_spans_nelem(b_not_a);
@@ -6162,7 +6159,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_NOTB:
/* Free the current selection */
if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
space->select.sel_info.hslab->span_lst=NULL;
/* Reset the number of items in selection */
@@ -6171,7 +6168,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Check if there are any non-overlapped selections */
if(a_not_b!=NULL) {
if(H5S_hyper_merge_spans(space,a_not_b,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem=H5S_hyper_spans_nelem(a_not_b);
@@ -6187,7 +6184,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_NOTA:
/* Free the current selection */
if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst)<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans");
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
space->select.sel_info.hslab->span_lst=NULL;
/* Reset the number of items in selection */
@@ -6196,7 +6193,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Check if there are any non-overlapped selections */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(space,b_not_a,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
space->select.num_elem=H5S_hyper_spans_nelem(b_not_a);
@@ -6215,7 +6212,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_PREPEND:
case H5S_SELECT_INVALID:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
/* Check if the resulting hyperslab span tree is empty */
@@ -6223,11 +6220,11 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
H5S_hyper_span_info_t *spans; /* Empty hyperslab span tree */
/* Sanity check */
- assert(space->select.num_elem==0);
+ HDassert(space->select.num_elem == 0);
/* Allocate a span info node */
if((spans = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span")
/* Set the reference count */
spans->count=1;
@@ -6268,7 +6265,7 @@ done:
if(H5S_hyper_free_span_info(new_spans) < 0)
HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release temporary hyperslab spans")
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_generate_hyperslab() */
@@ -6300,13 +6297,13 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
unsigned u; /* Counters */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL);
+ FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL)
/* Check args */
- assert(space);
- assert(start);
- assert(count);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
+ HDassert(space);
+ HDassert(start);
+ HDassert(count);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Point to the correct stride values */
if(stride==NULL)
@@ -6322,7 +6319,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
for(u=0; u<space->extent.rank; u++) {
/* Check for overlapping hyperslab blocks in new selection. */
if(count[u]>1 && stride[u]<block[u])
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap")
/* Detect zero-sized hyperslabs in new selection */
if(count[u] == 0 || block[u] == 0) {
@@ -6332,7 +6329,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
if(H5S_select_none(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
HGOTO_DONE(SUCCEED);
case H5S_SELECT_OR: /* Binary "or" operation for hyperslabs */
@@ -6345,7 +6342,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_PREPEND:
case H5S_SELECT_INVALID:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
} /* end if */
} /* end for */
@@ -6376,7 +6373,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
if(count[u]==1)
int_stride[u]=1;
else {
- assert(stride[u]>block[u]);
+ HDassert(stride[u] > block[u]);
int_stride[u]=stride[u];
} /* end else */
int_count[u]=count[u];
@@ -6408,7 +6405,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_PREPEND:
case H5S_SELECT_INVALID:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
break;
@@ -6445,14 +6442,14 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Convert to hyperslab selection */
if(H5S_select_hyperslab(space,H5S_SELECT_SET,tmp_start,tmp_stride,tmp_count,tmp_block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
} /* end case */
break;
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
if(H5S_select_none(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
HGOTO_DONE(SUCCEED);
case H5S_SELECT_NOOP:
@@ -6460,7 +6457,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_PREPEND:
case H5S_SELECT_INVALID:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
break;
@@ -6476,7 +6473,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
if(op == H5S_SELECT_SET) {
@@ -6571,7 +6568,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_hyperslab, FAIL);
+ FUNC_ENTER_API(H5Sselect_hyperslab, FAIL)
H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
@@ -6589,15 +6586,15 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
/* Check for 0-sized strides */
for(u=0; u<space->extent.rank; u++) {
if(stride[u]==0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value")
} /* end for */
} /* end if */
if (H5S_select_hyperslab(space, op, start, stride, count, block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Sselect_hyperslab() */
#else /* NEW_HYPERSLAB_API */ /* Works */
@@ -6625,18 +6622,18 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
H5S_hyper_span_info_t *b_not_a=NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_operate_hyperslab);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_operate_hyperslab)
/* Check args */
- assert(result);
- assert(spans2);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
+ HDassert(result);
+ HDassert(spans2);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Just copy the selection from spans2 if we are setting the selection */
/* ('space1' to 'result' aliasing happens at the next layer up) */
if(op==H5S_SELECT_SET) {
if(H5S_hyper_merge_spans(result,spans2,can_own_span2)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(spans2);
@@ -6648,11 +6645,11 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
else {
hbool_t updated_spans = FALSE; /* Whether the spans in the selection were modified */
- assert(spans1);
+ HDassert(spans1);
/* Generate lists of spans which overlap and don't overlap */
if(H5S_hyper_clip_spans(spans1,spans2,&a_not_b,&a_and_b,&b_not_a)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
/* Switch on the operation */
switch(op) {
@@ -6660,7 +6657,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Copy spans from spans1 to current selection */
if(spans1!=NULL) {
if(H5S_hyper_merge_spans(result,spans1,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(spans1);
@@ -6669,7 +6666,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Add any new spans from spans2 to current selection */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(result,b_not_a,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem+=H5S_hyper_spans_nelem(b_not_a);
@@ -6683,7 +6680,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Check if there are any overlapped selections */
if(a_and_b!=NULL) {
if(H5S_hyper_merge_spans(result,a_and_b,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(a_and_b);
@@ -6700,7 +6697,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Check if there are any non-overlapped selections */
if(a_not_b!=NULL) {
if(H5S_hyper_merge_spans(result,a_not_b,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(a_not_b);
@@ -6710,7 +6707,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
} /* end if */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(result,b_not_a,FALSE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem+=H5S_hyper_spans_nelem(b_not_a);
@@ -6724,7 +6721,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Check if there are any non-overlapped selections */
if(a_not_b!=NULL) {
if(H5S_hyper_merge_spans(result,a_not_b,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(a_not_b);
@@ -6741,7 +6738,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
/* Check if there are any non-overlapped selections */
if(b_not_a!=NULL) {
if(H5S_hyper_merge_spans(result,b_not_a,TRUE)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs")
/* Update the number of elements in current selection */
result->select.num_elem=H5S_hyper_spans_nelem(b_not_a);
@@ -6755,7 +6752,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
break;
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
/* Free the hyperslab trees generated from the clipping algorithm */
@@ -6771,11 +6768,11 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
H5S_hyper_span_info_t *spans; /* Empty hyperslab span tree */
/* Sanity check */
- assert(result->select.num_elem==0);
+ HDassert(result->select.num_elem == 0);
/* Allocate a span info node */
if((spans = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span")
/* Set the reference count */
spans->count=1;
@@ -6802,7 +6799,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_operate_hyperslab() */
@@ -6832,19 +6829,19 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab)
/* Check args */
- assert(space);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
- assert(start);
- assert(stride);
- assert(count);
- assert(block);
+ HDassert(space);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ HDassert(start);
+ HDassert(stride);
+ HDassert(count);
+ HDassert(block);
/* Generate span tree for new hyperslab information */
if((new_spans=H5S_hyper_make_spans(space->extent.rank,start,stride,count,block))==NULL)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information")
/* Copy the original dataspace */
if(space->select.sel_info.hslab->span_lst!=NULL) {
@@ -6855,27 +6852,27 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Reset the other dataspace selection information */
if(H5S_SELECT_RELEASE(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection")
/* Allocate space for the hyperslab selection information */
if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info")
} /* end if */
/* Combine tmp_space (really space) & new_space, with the result in space */
if(H5S_operate_hyperslab(space,tmp_spans,op,new_spans,TRUE,&span2_owned)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
done:
/* Free temporary data structures */
if(tmp_spans!=NULL)
if(H5S_hyper_free_span_info(tmp_spans)<0)
- HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release temporary hyperslab spans");
+ HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release temporary hyperslab spans")
if(new_spans!=NULL && span2_owned==FALSE)
if(H5S_hyper_free_span_info(new_spans)<0)
- HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release temporary hyperslab spans");
+ HDONE_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release temporary hyperslab spans")
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_generate_hyperslab() */
@@ -6909,13 +6906,13 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
unsigned u; /* Counters */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL);
+ FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL)
/* Check args */
- assert(space);
- assert(start);
- assert(count);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
+ HDassert(space);
+ HDassert(start);
+ HDassert(count);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Point to the correct stride values */
if(stride==NULL)
@@ -6931,7 +6928,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
for(u=0; u<space->extent.rank; u++) {
/* Check for overlapping hyperslab blocks in new selection. */
if(count[u]>1 && stride[u]<block[u])
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap")
/* Detect zero-sized hyperslabs in new selection */
if(count[u] == 0 || block[u] == 0) {
@@ -6941,7 +6938,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
if(H5S_select_none(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
HGOTO_DONE(SUCCEED);
case H5S_SELECT_OR: /* Binary "or" operation for hyperslabs */
@@ -6950,7 +6947,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
HGOTO_DONE(SUCCEED); /* Selection stays same */
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
} /* end if */
} /* end for */
@@ -6981,7 +6978,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
if(count[u]==1)
int_stride[u]=1;
else {
- assert(stride[u]>block[u]);
+ HDassert(stride[u] > block[u]);
int_stride[u]=stride[u];
} /* end else */
int_count[u]=count[u];
@@ -7009,7 +7006,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
HGOTO_DONE(SUCCEED); /* Selection stays "none" */
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
break;
@@ -7046,18 +7043,18 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Convert to hyperslab selection */
if(H5S_select_hyperslab(space,H5S_SELECT_SET,tmp_start,tmp_stride,tmp_count,tmp_block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
} /* end case */
break;
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
if(H5S_select_none(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection")
HGOTO_DONE(SUCCEED);
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
break;
@@ -7071,18 +7068,18 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
/* Else fall through to error */
default:
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
} /* end switch */
if(op==H5S_SELECT_SET) {
/* If we are setting a new selection, remove current selection first */
if(H5S_SELECT_RELEASE(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab")
/* Allocate space for the hyperslab selection information */
if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info")
/* Save the diminfo */
space->select.num_elem=1;
@@ -7108,28 +7105,28 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
} /* end if */
else if(op>=H5S_SELECT_OR && op<=H5S_SELECT_NOTA) {
/* Sanity check */
- assert(H5S_GET_SELECT_TYPE(space)==H5S_SEL_HYPERSLABS);
+ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Check if there's no hyperslab span information currently */
if(space->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
/* Add in the new hyperslab information */
if(H5S_generate_hyperslab (space, op, start, opt_stride, opt_count, opt_block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs")
/* Indicate that the regular dimensions are no longer valid */
space->select.sel_info.hslab->diminfo_valid=FALSE;
} /* end if */
else
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
/* Set selection type */
space->select.type=H5S_sel_hyper;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_hyperslab() */
@@ -7166,35 +7163,35 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5S_t *space = NULL; /* Dataspace to modify selection of */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_hyperslab, FAIL);
+ FUNC_ENTER_API(H5Sselect_hyperslab, FAIL)
H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if (H5S_SCALAR==H5S_GET_EXTENT_TYPE(space))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space")
if (H5S_NULL==H5S_GET_EXTENT_TYPE(space))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_NULL space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_NULL space")
if(start==NULL || count==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
if(stride!=NULL) {
unsigned u; /* Local index variable */
/* Check for 0-sized strides */
for(u=0; u<space->extent.rank; u++) {
if(stride[u]==0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value")
} /* end for */
} /* end if */
if (H5S_select_hyperslab(space, op, start, stride, count, block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Sselect_hyperslab() */
@@ -7235,35 +7232,35 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5S_t *new_space = NULL; /* New dataspace created */
hid_t ret_value;
- FUNC_ENTER_API(H5Scombine_hyperslab, FAIL);
+ FUNC_ENTER_API(H5Scombine_hyperslab, FAIL)
H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(start==NULL || count==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
/* Copy the first dataspace */
if (NULL == (new_space = H5S_copy (space, TRUE, TRUE)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to copy data space");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to copy data space")
/* Go modify the selection in the new dataspace */
if (H5S_select_hyperslab(new_space, op, start, stride, count, block)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection")
/* Atomize */
if ((ret_value=H5I_register (H5I_DATASPACE, new_space, TRUE))<0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom");
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom")
done:
if (ret_value<0 && new_space)
H5S_close(new_space);
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Scombine_hyperslab() */
@@ -7288,36 +7285,36 @@ H5S_combine_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
H5S_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_combine_select);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_combine_select)
/* Check args */
- assert(space1);
- assert(space2);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
+ HDassert(space1);
+ HDassert(space2);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Check that the space selections both have span trees */
if(space1->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space1)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree")
if(space2->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space2)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree")
/* Copy the first dataspace */
if (NULL == (new_space = H5S_copy (space1, TRUE, TRUE)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to copy data space");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to copy data space")
/* Free the current selection for the new dataspace */
if(H5S_SELECT_RELEASE(new_space)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, NULL, "can't release selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, NULL, "can't release selection")
/* Allocate space for the hyperslab selection information */
if((new_space->select.sel_info.hslab=H5FL_CALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info")
/* Combine space1 & space2, with the result in new_space */
if(H5S_operate_hyperslab(new_space,space1->select.sel_info.hslab->span_lst,op,space2->select.sel_info.hslab->span_lst,FALSE,&span2_owned)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, NULL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, NULL, "can't clip hyperslab information")
/* Set return value */
ret_value=new_space;
@@ -7326,7 +7323,7 @@ done:
if(ret_value==NULL && new_space!=NULL)
H5S_close(new_space);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_combine_select() */
@@ -7360,38 +7357,38 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5S_t *new_space = NULL; /* New Dataspace */
hid_t ret_value;
- FUNC_ENTER_API(H5Scombine_select, FAIL);
+ FUNC_ENTER_API(H5Scombine_select, FAIL)
H5TRACE3("i", "iSsi", space1_id, op, space2_id);
/* Check args */
if (NULL == (space1=H5I_object_verify(space1_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if (NULL == (space2=H5I_object_verify(space2_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
/* Check that both dataspaces have the same rank */
if(space1->extent.rank!=space2->extent.rank)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank")
/* Check that both dataspaces have hyperslab selections */
if(H5S_GET_SELECT_TYPE(space1)!=H5S_SEL_HYPERSLABS || H5S_GET_SELECT_TYPE(space2)!=H5S_SEL_HYPERSLABS)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections")
/* Go combine the dataspaces */
if ((new_space=H5S_combine_select(space1, op, space2))==NULL)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to create hyperslab selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to create hyperslab selection")
/* Atomize */
if ((ret_value=H5I_register (H5I_DATASPACE, new_space, TRUE))<0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom");
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom")
done:
if (ret_value<0 && new_space)
H5S_close(new_space);
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Scombine_select() */
@@ -7416,20 +7413,20 @@ H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_select_select);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_select_select)
/* Check args */
- assert(space1);
- assert(space2);
- assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
+ HDassert(space1);
+ HDassert(space2);
+ HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Check that the space selections both have span trees */
if(space1->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space1)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
if(space2->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space2)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
/* Take ownership of the dataspace's hyperslab spans */
/* (These are freed later) */
@@ -7438,21 +7435,21 @@ H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
/* Reset the other dataspace selection information */
if(H5S_SELECT_RELEASE(space1)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection")
/* Allocate space for the hyperslab selection information */
if((space1->select.sel_info.hslab=H5FL_CALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info")
/* Combine tmp_spans (from space1) & spans from space2, with the result in space1 */
if(H5S_operate_hyperslab(space1,tmp_spans,op,space2->select.sel_info.hslab->span_lst,FALSE,&span2_owned)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information")
done:
if(tmp_spans!=NULL)
H5S_hyper_free_span_info(tmp_spans);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_select() */
@@ -7485,31 +7482,31 @@ H5Sselect_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5S_t *space2; /* Second Dataspace */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_select, FAIL);
+ FUNC_ENTER_API(H5Sselect_select, FAIL)
H5TRACE3("e", "iSsi", space1_id, op, space2_id);
/* Check args */
if (NULL == (space1=H5I_object_verify(space1_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if (NULL == (space2=H5I_object_verify(space2_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation");
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
/* Check that both dataspaces have the same rank */
if(space1->extent.rank!=space2->extent.rank)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank")
/* Check that both dataspaces have hyperslab selections */
if(H5S_GET_SELECT_TYPE(space1)!=H5S_SEL_HYPERSLABS || H5S_GET_SELECT_TYPE(space2)!=H5S_SEL_HYPERSLABS)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections")
/* Go refine the first selection */
if (H5S_select_select(space1, op, space2)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to modify hyperslab selection");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to modify hyperslab selection")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Sselect_select() */
#endif /* NEW_HYPERSLAB_API */ /* Works */
@@ -8420,18 +8417,16 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
hsize_t base_offset[H5O_LAYOUT_NDIMS]; /* Base coordinate offset in dataspace */
hsize_t offset[H5O_LAYOUT_NDIMS]; /* Coordinate offset in dataspace */
hsize_t slab[H5O_LAYOUT_NDIMS]; /* Hyperslab size */
- hsize_t skip[H5O_LAYOUT_NDIMS]; /* Bytes to skip between blocks */
hsize_t fast_dim_block; /* Local copies of fastest changing dimension info */
hsize_t acc; /* Accumulator */
hsize_t loc; /* Coordinate offset */
size_t tot_blk_count; /* Total number of blocks left to output */
- size_t blk_count; /* Total number of blocks left to output */
size_t elem_size; /* Size of each element iterating over */
size_t io_left; /* The number of elements left in I/O operation */
size_t actual_elem; /* The actual number of elements to count */
unsigned ndims; /* Number of dimensions of dataset */
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
- int temp_dim; /* Temporary rank holder */
+ unsigned skip_dim; /* Rank of the dimension to skip along */
unsigned u; /* Local index variable */
int i; /* Local index variable */
@@ -8454,7 +8449,6 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
if(iter->u.hyp.iter_rank != 0 && iter->u.hyp.iter_rank < space->extent.rank) {
/* Set the aliases for a few important dimension ranks */
ndims = iter->u.hyp.iter_rank;
- fast_dim = ndims - 1;
/* Set the local copy of the selection offset */
sel_off = iter->u.hyp.sel_off;
@@ -8465,7 +8459,6 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
else {
/* Set the aliases for a few important dimension ranks */
ndims = space->extent.rank;
- fast_dim = ndims - 1;
/* Set the local copy of the selection offset */
sel_off = space->select.offset;
@@ -8473,6 +8466,7 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
/* Set up the pointer to the size of the memory space */
mem_size = space->extent.size;
} /* end else */
+ fast_dim = ndims - 1;
/* initialize row sizes for each dimension */
elem_size = iter->elmt_size;
@@ -8481,10 +8475,6 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
acc *= mem_size[i];
} /* end for */
- /* Compute the amount to skip between sequences */
- for(u = 0; u < ndims; u++)
- skip[u] = (mem_size[u] - tdiminfo[u].block) * slab[u];
-
/* Copy the base location of the block */
/* (Add in the selection offset) */
for(u = 0; u < ndims; u++)
@@ -8518,16 +8508,11 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
/* Check for blocks to operate on */
if(tot_blk_count > 0) {
- hsize_t tmp_block[H5O_LAYOUT_NDIMS];/* Temporary block offset */
size_t actual_bytes; /* The actual number of bytes to copy */
/* Set the number of actual bytes */
actual_bytes = actual_elem * elem_size;
- /* Set the starting block location */
- for(u = 0; u < ndims; u++)
- tmp_block[u] = iter->u.hyp.off[u] - tdiminfo[u].start;
-
/* Check for 1-dim selection */
if(0 == fast_dim) {
/* Sanity checks */
@@ -8539,53 +8524,101 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
*len++ = actual_bytes;
} /* end if */
else {
- /* Create sequences until an entire row can't be used */
- blk_count = tot_blk_count;
- while(blk_count > 0) {
- /* Store the sequence information */
- *off++ = loc;
- *len++ = actual_bytes;
-
- /* Set temporary dimension for advancing offsets */
- temp_dim = (int)fast_dim - 1;
+ hsize_t skip_slab; /* Temporary copy of slab[fast_dim - 1] */
+ size_t blk_count; /* Total number of blocks left to output */
+
+ /* Find first dimension w/block >1 */
+ skip_dim = fast_dim;
+ for(i = (int)(fast_dim - 1); i >= 0; i--)
+ if(tdiminfo[i].block > 1) {
+ skip_dim = (unsigned)i;
+ break;
+ } /* end if */
+ skip_slab = slab[skip_dim];
+
+ /* Check for being able to use fast algorithm for 1-D */
+ if(0 == skip_dim) {
+ /* Create sequences until an entire row can't be used */
+ blk_count = tot_blk_count;
+ while(blk_count > 0) {
+ /* Store the sequence information */
+ *off++ = loc;
+ *len++ = actual_bytes;
+
+ /* Increment offset in destination buffer */
+ loc += skip_slab;
+
+ /* Decrement block count */
+ blk_count--;
+ } /* end while */
- /* Increment offset in destination buffer */
- loc += slab[temp_dim];
+ /* Move to the next location */
+ offset[skip_dim] += tot_blk_count;
+ } /* end if */
+ else {
+ hsize_t tmp_block[H5O_LAYOUT_NDIMS];/* Temporary block offset */
+ hsize_t skip[H5O_LAYOUT_NDIMS]; /* Bytes to skip between blocks */
+ int temp_dim; /* Temporary rank holder */
- /* Increment the offset and count for the other dimensions */
- while(temp_dim >= 0) {
- /* Move to the next row in the curent dimension */
- offset[temp_dim]++;
- tmp_block[temp_dim]++;
+ /* Set the starting block location */
+ for(u = 0; u < ndims; u++)
+ tmp_block[u] = iter->u.hyp.off[u] - tdiminfo[u].start;
- /* If this block is still in the range of blocks to output for the dimension, break out of loop */
- if(tmp_block[temp_dim] < tdiminfo[temp_dim].block)
- break;
- else {
- offset[temp_dim] = base_offset[temp_dim];
- loc += skip[temp_dim];
- tmp_block[temp_dim] = 0;
- } /* end else */
+ /* Compute the amount to skip between sequences */
+ for(u = 0; u < ndims; u++)
+ skip[u] = (mem_size[u] - tdiminfo[u].block) * slab[u];
- /* Decrement dimension count */
- temp_dim--;
- } /* end while */
+ /* Create sequences until an entire row can't be used */
+ blk_count = tot_blk_count;
+ while(blk_count > 0) {
+ /* Store the sequence information */
+ *off++ = loc;
+ *len++ = actual_bytes;
- /* Decrement block count */
- blk_count--;
- } /* end while */
+ /* Set temporary dimension for advancing offsets */
+ temp_dim = (int)skip_dim;
+
+ /* Increment offset in destination buffer */
+ loc += skip_slab;
+
+ /* Increment the offset and count for the other dimensions */
+ while(temp_dim >= 0) {
+ /* Move to the next row in the curent dimension */
+ offset[temp_dim]++;
+ tmp_block[temp_dim]++;
+
+ /* If this block is still in the range of blocks to output for the dimension, break out of loop */
+ if(tmp_block[temp_dim] < tdiminfo[temp_dim].block)
+ break;
+ else {
+ offset[temp_dim] = base_offset[temp_dim];
+ loc += skip[temp_dim];
+ tmp_block[temp_dim] = 0;
+ } /* end else */
+
+ /* Decrement dimension count */
+ temp_dim--;
+ } /* end while */
+
+ /* Decrement block count */
+ blk_count--;
+ } /* end while */
+ } /* end else */
} /* end else */
/* Update the iterator, if there were any blocks used */
- /* Update the iterator with the location we stopped */
- /* (Subtract out the selection offset) */
- for(u = 0; u < ndims; u++)
- iter->u.hyp.off[u] = (hsize_t)((hssize_t)offset[u] - sel_off[u]);
-
/* Decrement the number of elements left in selection */
iter->elmt_left -= tot_blk_count * actual_elem;
+ /* Check if there are elements left in iterator */
+ if(iter->elmt_left > 0) {
+ /* Update the iterator with the location we stopped */
+ /* (Subtract out the selection offset) */
+ for(u = 0; u < ndims; u++)
+ iter->u.hyp.off[u] = (hsize_t)((hssize_t)offset[u] - sel_off[u]);
+ } /* end if */
+
/* Increment the number of sequences generated */
*nseq += tot_blk_count;
@@ -8619,6 +8652,10 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
*nelem += elmt_remainder;
} /* end if */
+ /* Sanity check */
+ HDassert(*nseq > 0);
+ HDassert(*nelem > 0);
+
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_hyper_get_seq_list_single() */
@@ -8666,6 +8703,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
/* Check args */
HDassert(space);
HDassert(iter);
+ HDassert(iter->elmt_left > 0);
HDassert(maxseq > 0);
HDassert(maxelem > 0);
HDassert(nseq);
@@ -8690,7 +8728,6 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
if(iter->u.hyp.iter_rank != 0 && iter->u.hyp.iter_rank < space->extent.rank) {
/* Set the aliases for a few important dimension ranks */
ndims = iter->u.hyp.iter_rank;
- fast_dim = ndims - 1;
/* Set the local copy of the selection offset */
sel_off = iter->u.hyp.sel_off;
@@ -8701,7 +8738,6 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
else {
/* Set the aliases for a few important dimension ranks */
ndims = space->extent.rank;
- fast_dim = ndims - 1;
/* Set the local copy of the selection offset */
sel_off = space->select.offset;
@@ -8709,6 +8745,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
/* Set up the pointer to the size of the memory space */
mem_size = space->extent.size;
} /* end else */
+ fast_dim = ndims - 1;
/* Check if we stopped in the middle of a sequence of elements */
if((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 ||
diff --git a/src/H5V.c b/src/H5V.c
index 979b591..37d558f 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -24,6 +24,12 @@
#include "H5Oprivate.h"
#include "H5Vprivate.h"
+/* Local typedefs */
+typedef struct H5V_memcpy_ud_t {
+ unsigned char *dst; /* Pointer to destination buffer */
+ const unsigned char *src; /* Pointer to source buffer */
+} H5V_memcpy_ud_t;
+
/* Local macros */
#define H5V_HYPER_NDIMS H5O_LAYOUT_NDIMS
@@ -1149,9 +1155,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5V_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *total_size,
- const hsize_t *down, hsize_t *coords)
+static herr_t
+H5V_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down,
+ hsize_t *coords)
{
unsigned u; /* Local index variable */
@@ -1159,7 +1165,6 @@ H5V_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *total_size,
/* Sanity check */
HDassert(n <= H5V_HYPER_NDIMS);
- HDassert(total_size);
HDassert(coords);
/* Compute the coordinates from the offset */
@@ -1210,7 +1215,7 @@ H5V_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *c
HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute down sizes")
/* Compute the coordinates from the offset */
- if(H5V_array_calc_pre(offset, n, total_size, idx, coords) < 0)
+ if(H5V_array_calc_pre(offset, n, idx, coords) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute coordinates")
done:
@@ -1287,6 +1292,212 @@ H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk,
/*-------------------------------------------------------------------------
+ * Function: H5V_opvv
+ *
+ * Purpose: Perform an operation on a source & destination sequences
+ * of offset/length pairs. Each set of sequnces has an array
+ * of lengths, an array of offsets, the maximum number of
+ * sequences and the current sequence to start at in the sequence.
+ *
+ * There may be different numbers of bytes in the source and
+ * destination sequences, the operation stops when either the
+ * source or destination sequence runs out of information.
+ *
+ * Note: The algorithm in this routine is [basically] the same as for
+ * H5V_memcpyvv(). Changes should be made to both!
+ *
+ * Return: Non-negative # of bytes operated on, on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, September 30, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5V_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[],
+ hsize_t dst_off_arr[],
+ size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[],
+ hsize_t src_off_arr[],
+ H5V_opvv_func_t op, void *op_data)
+{
+ hsize_t *max_dst_off_ptr, *max_src_off_ptr; /* Pointers to max. source and destination offset locations */
+ hsize_t *dst_off_ptr, *src_off_ptr; /* Pointers to source and destination offset arrays */
+ size_t *dst_len_ptr, *src_len_ptr; /* Pointers to source and destination length arrays */
+ hsize_t tmp_dst_off, tmp_src_off; /* Temporary source and destination offset values */
+ size_t tmp_dst_len, tmp_src_len; /* Temporary source and destination length values */
+ size_t acc_len; /* Accumulated length of sequences */
+ ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
+
+ FUNC_ENTER_NOAPI(H5V_opvv, FAIL)
+
+ /* Sanity check */
+ HDassert(dst_curr_seq);
+ HDassert(*dst_curr_seq < dst_max_nseq);
+ HDassert(dst_len_arr);
+ HDassert(dst_off_arr);
+ HDassert(src_curr_seq);
+ HDassert(*src_curr_seq < src_max_nseq);
+ HDassert(src_len_arr);
+ HDassert(src_off_arr);
+ HDassert(op);
+
+ /* Set initial offset & length pointers */
+ dst_len_ptr = dst_len_arr + *dst_curr_seq;
+ dst_off_ptr = dst_off_arr + *dst_curr_seq;
+ src_len_ptr = src_len_arr + *src_curr_seq;
+ src_off_ptr = src_off_arr + *src_curr_seq;
+
+ /* Get temporary source & destination sequence offsets & lengths */
+ tmp_dst_len = *dst_len_ptr;
+ tmp_dst_off = *dst_off_ptr;
+ tmp_src_len = *src_len_ptr;
+ tmp_src_off = *src_off_ptr;
+
+ /* Compute maximum offset pointer values */
+ max_dst_off_ptr = dst_off_arr + dst_max_nseq;
+ max_src_off_ptr = src_off_arr + src_max_nseq;
+
+/* Work through the sequences */
+/* (Choose smallest sequence available initially) */
+
+ /* Source sequence is less than destination sequence */
+ if(tmp_src_len < tmp_dst_len) {
+src_smaller:
+ acc_len = 0;
+ do {
+ /* Make operator callback */
+ if((*op)(tmp_dst_off, tmp_src_off, tmp_src_len, op_data) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation")
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_src_len;
+
+ /* Update destination length */
+ tmp_dst_off += tmp_src_len;
+ tmp_dst_len -= tmp_src_len;
+
+ /* Advance source offset & check for being finished */
+ src_off_ptr++;
+ if(src_off_ptr >= max_src_off_ptr) {
+ /* Roll accumulated changes into appropriate counters */
+ *dst_off_ptr = tmp_dst_off;
+ *dst_len_ptr = tmp_dst_len;
+
+ /* Done with sequences */
+ goto finished;
+ } /* end if */
+ tmp_src_off = *src_off_ptr;
+
+ /* Update source information */
+ src_len_ptr++;
+ tmp_src_len = *src_len_ptr;
+ } while(tmp_src_len < tmp_dst_len);
+
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Transition to next state */
+ if(tmp_dst_len < tmp_src_len)
+ goto dst_smaller;
+ else
+ goto equal;
+ } /* end if */
+ /* Destination sequence is less than source sequence */
+ else if(tmp_dst_len < tmp_src_len) {
+dst_smaller:
+ acc_len = 0;
+ do {
+ /* Make operator callback */
+ if((*op)(tmp_dst_off, tmp_src_off, tmp_dst_len, op_data) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation")
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_dst_len;
+
+ /* Update source length */
+ tmp_src_off += tmp_dst_len;
+ tmp_src_len -= tmp_dst_len;
+
+ /* Advance destination offset & check for being finished */
+ dst_off_ptr++;
+ if(dst_off_ptr >= max_dst_off_ptr) {
+ /* Roll accumulated changes into appropriate counters */
+ *src_off_ptr = tmp_src_off;
+ *src_len_ptr = tmp_src_len;
+
+ /* Done with sequences */
+ goto finished;
+ } /* end if */
+ tmp_dst_off = *dst_off_ptr;
+
+ /* Update destination information */
+ dst_len_ptr++;
+ tmp_dst_len = *dst_len_ptr;
+ } while(tmp_dst_len < tmp_src_len);
+
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Transition to next state */
+ if(tmp_src_len < tmp_dst_len)
+ goto src_smaller;
+ else
+ goto equal;
+ } /* end else-if */
+ /* Destination sequence and source sequence are same length */
+ else {
+equal:
+ acc_len = 0;
+ do {
+ /* Make operator callback */
+ if((*op)(tmp_dst_off, tmp_src_off, tmp_dst_len, op_data) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation")
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_dst_len;
+
+ /* Advance source & destination offset & check for being finished */
+ src_off_ptr++;
+ dst_off_ptr++;
+ if(src_off_ptr >= max_src_off_ptr || dst_off_ptr >= max_dst_off_ptr)
+ /* Done with sequences */
+ goto finished;
+ tmp_src_off = *src_off_ptr;
+ tmp_dst_off = *dst_off_ptr;
+
+ /* Update source information */
+ src_len_ptr++;
+ tmp_src_len = *src_len_ptr;
+
+ /* Update destination information */
+ dst_len_ptr++;
+ tmp_dst_len = *dst_len_ptr;
+ } while(tmp_dst_len == tmp_src_len);
+
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Transition to next state */
+ if(tmp_dst_len < tmp_src_len)
+ goto dst_smaller;
+ else
+ goto src_smaller;
+ } /* end else */
+
+finished:
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Update current sequence vectors */
+ *dst_curr_seq = (size_t)(dst_off_ptr - dst_off_arr);
+ *src_curr_seq = (size_t)(src_off_ptr - src_off_arr);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5V_opvv() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5V_memcpyvv
*
* Purpose: Given source and destination buffers in memory (SRC & DST)
@@ -1299,6 +1510,9 @@ H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk,
* destination sequences, data copying stops when either the
* source or destination buffer runs out of sequence information.
*
+ * Note: The algorithm in this routine is [basically] the same as for
+ * H5V_opvv(). Changes should be made to both!
+ *
* Return: Non-negative # of bytes copied on success/Negative on failure
*
* Programmer: Quincey Koziol
@@ -1314,8 +1528,12 @@ H5V_memcpyvv(void *_dst,
{
unsigned char *dst; /* Destination buffer pointer */
const unsigned char *src; /* Source buffer pointer */
- size_t size; /* Size of sequence in bytes */
- size_t u,v; /* Local index variables */
+ hsize_t *max_dst_off_ptr, *max_src_off_ptr; /* Pointers to max. source and destination offset locations */
+ hsize_t *dst_off_ptr, *src_off_ptr; /* Pointers to source and destination offset arrays */
+ size_t *dst_len_ptr, *src_len_ptr; /* Pointers to source and destination length arrays */
+ size_t tmp_dst_len; /* Temporary dest. length value */
+ size_t tmp_src_len; /* Temporary source length value */
+ size_t acc_len; /* Accumulated length of sequences */
ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
FUNC_ENTER_NOAPI_NOFUNC(H5V_memcpyvv)
@@ -1332,44 +1550,159 @@ H5V_memcpyvv(void *_dst,
HDassert(src_len_arr);
HDassert(src_off_arr);
- /* Work through all the sequences */
- for(u = *dst_curr_seq, v = *src_curr_seq; u < dst_max_nseq && v < src_max_nseq; ) {
- /* Choose smallest buffer to write */
- if(src_len_arr[v] < dst_len_arr[u])
- size = src_len_arr[v];
- else
- size = dst_len_arr[u];
+ /* Set initial offset & length pointers */
+ dst_len_ptr = dst_len_arr + *dst_curr_seq;
+ dst_off_ptr = dst_off_arr + *dst_curr_seq;
+ src_len_ptr = src_len_arr + *src_curr_seq;
+ src_off_ptr = src_off_arr + *src_curr_seq;
+
+ /* Get temporary source & destination sequence lengths */
+ tmp_dst_len = *dst_len_ptr;
+ tmp_src_len = *src_len_ptr;
+
+ /* Compute maximum offset pointer values */
+ max_dst_off_ptr = dst_off_arr + dst_max_nseq;
+ max_src_off_ptr = src_off_arr + src_max_nseq;
+
+ /* Compute buffer offsets */
+ dst = (unsigned char *)_dst + *dst_off_ptr;
+ src = (const unsigned char *)_src + *src_off_ptr;
+
+/* Work through the sequences */
+/* (Choose smallest sequence available initially) */
+
+ /* Source sequence is less than destination sequence */
+ if(tmp_src_len < tmp_dst_len) {
+src_smaller:
+ acc_len = 0;
+ do {
+ /* Copy data */
+ HDmemcpy(dst, src, tmp_src_len);
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_src_len;
+
+ /* Update destination length */
+ tmp_dst_len -= tmp_src_len;
+
+ /* Advance source offset & check for being finished */
+ src_off_ptr++;
+ if(src_off_ptr >= max_src_off_ptr) {
+ /* Roll accumulated changes into appropriate counters */
+ *dst_off_ptr += acc_len;
+ *dst_len_ptr = tmp_dst_len;
+
+ /* Done with sequences */
+ goto finished;
+ } /* end if */
- /* Compute offset on disk */
- dst = (unsigned char *)_dst + dst_off_arr[u];
+ /* Update destination pointer */
+ dst += tmp_src_len;
- /* Compute offset in memory */
- src = (const unsigned char *)_src + src_off_arr[v];
+ /* Update source information */
+ src_len_ptr++;
+ tmp_src_len = *src_len_ptr;
+ src = (const unsigned char *)_src + *src_off_ptr;
+ } while(tmp_src_len < tmp_dst_len);
- /* Copy data */
- HDmemcpy(dst, src, size);
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
- /* Update source information */
- src_len_arr[v] -= size;
- if(0 == src_len_arr[v])
- v++;
+ /* Transition to next state */
+ if(tmp_dst_len < tmp_src_len)
+ goto dst_smaller;
else
- src_off_arr[v] += size;
+ goto equal;
+ } /* end if */
+ /* Destination sequence is less than source sequence */
+ else if(tmp_dst_len < tmp_src_len) {
+dst_smaller:
+ acc_len = 0;
+ do {
+ /* Copy data */
+ HDmemcpy(dst, src, tmp_dst_len);
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_dst_len;
+
+ /* Update source length */
+ tmp_src_len -= tmp_dst_len;
+
+ /* Advance destination offset & check for being finished */
+ dst_off_ptr++;
+ if(dst_off_ptr >= max_dst_off_ptr) {
+ /* Roll accumulated changes into appropriate counters */
+ *src_off_ptr += acc_len;
+ *src_len_ptr = tmp_src_len;
+
+ /* Done with sequences */
+ goto finished;
+ } /* end if */
+
+ /* Update source pointer */
+ src += tmp_dst_len;
+
+ /* Update destination information */
+ dst_len_ptr++;
+ tmp_dst_len = *dst_len_ptr;
+ dst = (unsigned char *)_dst + *dst_off_ptr;
+ } while(tmp_dst_len < tmp_src_len);
- /* Update destination information */
- dst_len_arr[u] -= size;
- if(0 == dst_len_arr[u])
- u++;
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Transition to next state */
+ if(tmp_src_len < tmp_dst_len)
+ goto src_smaller;
+ else
+ goto equal;
+ } /* end else-if */
+ /* Destination sequence and source sequence are same length */
+ else {
+equal:
+ acc_len = 0;
+ do {
+ /* Copy data */
+ HDmemcpy(dst, src, tmp_dst_len);
+
+ /* Accumulate number of bytes copied */
+ acc_len += tmp_dst_len;
+
+ /* Advance source & destination offset & check for being finished */
+ src_off_ptr++;
+ dst_off_ptr++;
+ if(src_off_ptr >= max_src_off_ptr || dst_off_ptr >= max_dst_off_ptr)
+ /* Done with sequences */
+ goto finished;
+
+ /* Update source information */
+ src_len_ptr++;
+ tmp_src_len = *src_len_ptr;
+ src = (const unsigned char *)_src + *src_off_ptr;
+
+ /* Update destination information */
+ dst_len_ptr++;
+ tmp_dst_len = *dst_len_ptr;
+ dst = (unsigned char *)_dst + *dst_off_ptr;
+ } while(tmp_dst_len == tmp_src_len);
+
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
+
+ /* Transition to next state */
+ if(tmp_dst_len < tmp_src_len)
+ goto dst_smaller;
else
- dst_off_arr[u] += size;
+ goto src_smaller;
+ } /* end else */
- /* Increment number of bytes copied */
- ret_value += (ssize_t)size;
- } /* end for */
+finished:
+ /* Roll accumulated sequence lengths into return value */
+ ret_value += (ssize_t)acc_len;
/* Update current sequence vectors */
- *dst_curr_seq = u;
- *src_curr_seq = v;
+ *dst_curr_seq = (size_t)(dst_off_ptr - dst_off_arr);
+ *src_curr_seq = (size_t)(src_off_ptr - src_off_arr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5V_memcpyvv() */
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index e351f86..382263f 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -24,6 +24,10 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+/* Vector-Vector sequence operation callback */
+typedef herr_t (*H5V_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
+ size_t len, void *udata);
+
/* Vector comparison functions like Fortran66 comparison operators */
#define H5V_vector_eq_s(N,V1,V2) (H5V_vector_cmp_s (N, V1, V2)==0)
#define H5V_vector_lt_s(N,V1,V2) (H5V_vector_cmp_s (N, V1, V2)<0)
@@ -83,12 +87,15 @@ H5_DLL hsize_t H5V_array_offset_pre(unsigned n,
const hsize_t *acc, const hsize_t *offset);
H5_DLL hsize_t H5V_array_offset(unsigned n, const hsize_t *total_size,
const hsize_t *offset);
-H5_DLL herr_t H5V_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *total_size,
- const hsize_t *down, hsize_t *coords);
H5_DLL herr_t H5V_array_calc(hsize_t offset, unsigned n,
const hsize_t *total_size, hsize_t *coords);
H5_DLL herr_t H5V_chunk_index(unsigned ndims, const hsize_t *coord,
const uint32_t *chunk, const hsize_t *down_nchunks, hsize_t *chunk_idx);
+H5_DLL ssize_t H5V_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[],
+ hsize_t dst_off_arr[],
+ size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[],
+ hsize_t src_off_arr[],
+ H5V_opvv_func_t op, void *op_data);
H5_DLL ssize_t H5V_memcpyvv(void *_dst,
size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[],
const void *_src,
diff --git a/src/H5public.h b/src/H5public.h
index df2ce6f..e94b758 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 75 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 77 /* 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.75" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.77" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index 5037064..48f1878 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -423,14 +423,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
@@ -445,7 +455,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 = 65
+LT_VERS_REVISION = 67
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 906afb5..7e12026 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -168,6 +168,78 @@ MACRO (ADD_H5_TEST file)
ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
ENDMACRO (ADD_H5_TEST file)
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME h5test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_test.h5
+ coord.h5
+ dt_arith1.h5
+ dt_arith2.h5
+ dtransform.h5
+ dtypes4.h5
+ dtypes5.h5
+ extlinks16A00000.h5
+ extlinks16A00001.h5
+ extlinks16A00002.h5
+ extlinks16B-b.h5
+ extlinks16B-g.h5
+ extlinks16B-l.h5
+ extlinks16B-r.h5
+ extlinks16B-s.h5
+ extlinks19B00000.h5
+ extlinks19B00001.h5
+ extlinks19B00002.h5
+ extlinks19B00003.h5
+ extlinks19B00004.h5
+ extlinks19B00005.h5
+ extlinks19B00006.h5
+ extlinks19B00007.h5
+ extlinks19B00008.h5
+ extlinks19B00009.h5
+ extlinks19B00010.h5
+ extlinks19B00011.h5
+ extlinks19B00012.h5
+ extlinks19B00013.h5
+ extlinks19B00014.h5
+ extlinks19B00015.h5
+ extlinks19B00016.h5
+ extlinks19B00017.h5
+ extlinks19B00018.h5
+ extlinks19B00019.h5
+ extlinks19B00020.h5
+ extlinks19B00021.h5
+ extlinks19B00022.h5
+ extlinks19B00023.h5
+ extlinks19B00024.h5
+ extlinks19B00025.h5
+ extlinks19B00026.h5
+ extlinks19B00027.h5
+ extlinks19B00028.h5
+ fheap.h5
+ objcopy_ext.h5
+ sys_file1
+ tattr.h5
+ testmeta.h5
+ tfile1.h5
+ tfile2.h5
+ tfile3.h5
+ tfile4.h5
+ tfile5.h5
+ th5o_file
+ th5s1.h5
+ th5s2.h5
+ th5s3.h5
+ tnullspace.h5
+ tselect.h5
+ tsohm.h5
+ tsohm_dst.h5
+ tsohm_src.h5
+ tstint1.h5
+ tstint2.h5
+)
+
SET (H5_TESTS
lheap
ohdr
@@ -183,6 +255,7 @@ SET (H5_TESTS
dt_arith
dtypes
cmpd_dset
+ filter_fail
extend
external
objcopy
diff --git a/test/Makefile.in b/test/Makefile.in
index 8f327dc..493a684 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -659,14 +659,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 8d4b65b..413f326 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -5177,8 +5177,8 @@ run_int_fp_conv(const char *name)
static int
run_fp_int_conv(const char *name)
{
-#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS
int nerrors = 0;
+#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS
int test_values;
#ifdef H5_VMS
diff --git a/test/dtransform.c b/test/dtransform.c
index 15c5934..5d5cefe 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -641,7 +641,7 @@ static int
test_set(void)
{
hid_t dxpl_id = -1;
- H5E_auto_t func;
+ H5E_auto2_t func;
const char *str = "(9/5.0)*x + 32";
char *ptrgetTest = NULL;
@@ -654,15 +654,9 @@ test_set(void)
TEST_ERROR
/* Test get before set */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func, NULL);
+ H5Eget_auto2(H5E_DEFAULT, &func, NULL);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT, &func, NULL);
-
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
if(H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
PASSED()
@@ -699,11 +693,7 @@ test_set(void)
TESTING("H5Pset_data_transform (set with invalid transform 8)")
INVALID_SET_TEST("(9/5)*x + x^2");
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(func, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, func, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, func, NULL);
if(H5Pclose(dxpl_id) < 0)
TEST_ERROR
diff --git a/test/enum.c b/test/enum.c
index 0033c44..c627af1 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -383,11 +383,7 @@ test_value_dsnt_exist(void)
TESTING("for non-existing name and value");
/* Turn off error reporting since we expect failure in this test */
-#ifdef H5_USE_16_API_DEFAULT
- if (H5Eset_auto(NULL, NULL) < 0) goto error;
-#else /* H5_USE_16_API_DEFAULT */
- if (H5Eset_auto(H5E_DEFAULT, NULL, NULL) < 0) goto error;
-#endif /* H5_USE_16_API_DEFAULT */
+ if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0) goto error;
if ((datatype_id = H5Tenum_create(H5T_NATIVE_INT))< 0) goto error;
diff --git a/test/err_compat.c b/test/err_compat.c
index 50a48fe..c08e259 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -397,13 +397,14 @@ test_error2(hid_t file)
#endif
TEST_ERROR;
- /* Make H5Dwrite fail, verify default printing is disabled */
+ /* Make H5Dwrite fail, verify default print is disabled */
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)<0) {
H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR,
"H5Dwrite shouldn't succeed");
goto error;
}
+ /* In case program comes to this point, close dataset */
if(H5Dclose(dataset)<0) TEST_ERROR;
TEST_ERROR;
diff --git a/test/error_test.c b/test/error_test.c
index 6a37b80..52dcc0c 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -21,7 +21,7 @@
*/
#include "h5test.h"
-#ifdef H5_USE_16_API_DEFAULT
+#ifdef H5_USE_16_API
int main(void)
{
printf("Test skipped because backward compatbility with v1.6 is configured in\n");
@@ -127,8 +127,13 @@ test_error(hid_t file)
TEST_ERROR;
if(old_data != NULL)
TEST_ERROR;
+#ifdef H5_USE_16_API
+ if (old_func != (H5E_auto_t)H5Eprint)
+ TEST_ERROR;
+#else /* H5_USE_16_API */
if (old_func != (H5E_auto2_t)H5Eprint2)
TEST_ERROR;
+#endif /* H5_USE_16_API */
if(H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
TEST_ERROR;
diff --git a/test/filter_fail.c b/test/filter_fail.c
index abb25cd..9b46421 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -25,13 +25,13 @@
#include "H5srcdir.h"
#define DSET_NAME "dset_fail"
-#define ONE_MB 1048576
#define H5Z_FILTER_FAIL_TEST 312
#define DIM 10
#define FILTER_CHUNK_DIM 2
const char *FILENAME[] = {
- "filter_fail",
+ "filter_fail_with_cache",
+ "filter_fail_without_cache",
NULL
};
@@ -70,9 +70,6 @@ filter_fail(unsigned int flags, size_t cd_nelmts,
size_t *buf_size, void **buf)
{
int *dst = (int*)(*buf);
- unsigned int offset;
- unsigned int length;
- unsigned int value;
size_t ret_value = 0;
if(flags & H5Z_FLAG_REVERSE) { /* do nothing during read */
@@ -89,7 +86,6 @@ filter_fail(unsigned int flags, size_t cd_nelmts,
}
} /* end else */
-error:
return ret_value;
} /* end filter_fail() */
@@ -112,27 +108,30 @@ error:
* 25 August 2010
*
* Modifications:
- *
+ * Raymond Lu
+ * 5 Oct 2010
+ * Test when the chunk cache is enable and disabled to make
+ * sure the library behaves properly.
*-------------------------------------------------------------------------
*/
static herr_t
-test_filter_write(char *file_name, hid_t my_fapl)
+test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
{
- char filename[1024];
hid_t file = -1;
hid_t dataset=-1; /* dataset ID */
hid_t sid=-1; /* dataspace ID */
hid_t dcpl=-1; /* dataset creation property list ID */
hsize_t dims[1]={DIM}; /* dataspace dimension - 10*/
hsize_t chunk_dims[1]={FILTER_CHUNK_DIM}; /* chunk dimension - 2*/
- int nfilters; /* number of filters in DCPL */
- unsigned flags; /* flags for filter */
int points[DIM]; /* Data */
- int rbuf[DIM]; /* Data */
herr_t ret; /* generic return value */
int i;
- TESTING("data writing when a mandatory filter fails");
+ if(cache_enabled) {
+ TESTING("data writing when a mandatory filter fails and chunk cache is enabled");
+ } else {
+ TESTING("data writing when a mandatory filter fails and chunk cache is disabled");
+ }
/* Create file */
if((file = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) TEST_ERROR
@@ -161,24 +160,44 @@ test_filter_write(char *file_name, hid_t my_fapl)
for(i = 0; i < DIM; i++)
points[i] = i;
- /* Write data */
- if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, points) < 0) TEST_ERROR
+ /* Write data. If the chunk cache is enabled, H5Dwrite should succeed. If it is
+ * diabled, H5Dwrite should fail. */
+ if(cache_enabled) {
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, points) < 0)
+ TEST_ERROR
+ } else {
+ /* Data writing should fail */
+ H5E_BEGIN_TRY {
+ ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, points);
+ } H5E_END_TRY;
+ if(ret >= 0) {
+ H5_FAILED();
+ puts(" Data writing is supposed to fail because the chunk can't be written to file.");
+ TEST_ERROR
+ }
+ }
/* clean up objects used for this test */
if(H5Pclose (dcpl) < 0) TEST_ERROR
if(H5Sclose (sid) < 0) TEST_ERROR
- /* Dataset closing should fail */
- H5E_BEGIN_TRY {
- ret = H5Dclose (dataset);
- } H5E_END_TRY;
- if(ret >= 0) {
- H5_FAILED();
- puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
- TEST_ERROR
+ /* Close dataset. If the chunk cache is enabled, the flushing of chunks should fail
+ * during H5Dclose. If it is diabled, H5Dwrite should fail but H5Dclose should succeed. */
+ if(cache_enabled) {
+ H5E_BEGIN_TRY {
+ ret = H5Dclose (dataset);
+ } H5E_END_TRY;
+ if(ret >= 0) {
+ H5_FAILED();
+ puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
+ TEST_ERROR
+ }
+ } else {
+ if(H5Dclose (dataset) < 0)
+ TEST_ERROR
}
- /* Even though H5Dclose fails, it should release all resources.
+ /* Even though H5Dclose or H5Dwrite fails, it should release all resources.
* So the file should close successfully. */
if(H5Fclose (file) < 0) TEST_ERROR
@@ -222,7 +241,6 @@ test_filter_read(char *file_name, hid_t my_fapl)
hid_t sid = -1;
hid_t mspace = -1;
hsize_t dims[1]={DIM}; /* dataspace dimension - 10*/
- hsize_t chunk_dims[1]={FILTER_CHUNK_DIM}; /* chunk dimension - 2*/
int rbuf[DIM]; /* Data */
hsize_t dset_size = 0; /* Dataset storage size */
hsize_t hs_offset[H5S_MAX_RANK];
@@ -346,9 +364,9 @@ int main(void)
{
hid_t fapl;
int mdc_nelmts = 0;
- size_t rdcc_nelmts = 521;
- size_t rdcc_nbytes = ONE_MB;
- double rdcc_w0 = 0.75;
+ size_t rdcc_nelmts = 0;
+ size_t rdcc_nbytes = 0;
+ double rdcc_w0 = 0;
char filename[1024];
unsigned nerrors = 0;
@@ -357,12 +375,21 @@ int main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- /* Make sure the chunk cache is used. All values are default. */
+ /* The chunk cache is used so that the flushing of data chunks happens
+ * during H5Dclose. All values are default. */
+ nerrors += (test_filter_write(filename, fapl, TRUE) < 0 ? 1 : 0);
+ nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
+
+ h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
+
+ /* Disable the chunk cache so that the writing of data chunks happens
+ * during H5Dwrite. */
if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0)
TEST_ERROR
- nerrors += (test_filter_write(filename, fapl) < 0 ? 1 : 0);
- nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
+ /* Run the test again. */
+ nerrors += (test_filter_write(filename, fapl, FALSE) < 0 ? 1 : 0);
+ nerrors += (test_filter_read(filename, fapl) < 0 ? 1 : 0);
h5_cleanup(FILENAME, fapl);
diff --git a/test/flush2.c b/test/flush2.c
index c674426..5675856 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -158,7 +158,7 @@ int
main(void)
{
hid_t fapl;
- H5E_auto_t func;
+ H5E_auto2_t func;
char name[1024];
h5_reset();
@@ -178,14 +178,8 @@ main(void)
/* Check the case where the file was not flushed. This should give an error
* so we turn off the error stack temporarily */
TESTING("H5Fflush (part2 without flush)");
-
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func,NULL);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT,&func,NULL);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT,&func,NULL);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
h5_fixname(FILENAME[1], fapl, name, sizeof name);
if(check_file(name, fapl, FALSE))
@@ -202,23 +196,13 @@ main(void)
goto error;
#endif
}
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(func, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, func, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, func, NULL);
/* Check the case where the file was flushed, but more data was added afterward. This should give an error
* so we turn off the error stack temporarily */
TESTING("H5Fflush (part2 with flush and later addition)");
-
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func,NULL);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT,&func,NULL);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT,&func,NULL);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
h5_fixname(FILENAME[2], fapl, name, sizeof name);
if(check_file(name, fapl, TRUE))
@@ -236,12 +220,7 @@ main(void)
#endif
}
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(func, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, func, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
-
+ H5Eset_auto2(H5E_DEFAULT, func, NULL);
h5_cleanup(FILENAME, fapl);
diff --git a/test/h5test.c b/test/h5test.c
index d02fea9..229efec 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -212,11 +212,7 @@ h5_reset(void)
HDfflush(stdout);
HDfflush(stderr);
H5close();
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(h5_errors, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, h5_errors, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
/*
* I commented this chunk of code out because it's not clear what diagnostics
diff --git a/test/testframe.c b/test/testframe.c
index f933d8b..082a27f 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -135,11 +135,7 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
* half the functions this test calls are private, so automatic error
* reporting wouldn't do much good since it's triggered at the API layer.
*/
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/*
* Record the program name and private routines if provided.
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index edc5c07..f55afdc 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -158,24 +158,16 @@ void *tts_error_thread(void UNUSED *arg)
{
hid_t dataspace, datatype, dataset;
hsize_t dimsf[1]; /* dataset dimensions */
- H5E_auto_t old_error_cb;
+ H5E_auto2_t old_error_cb;
void *old_error_client_data;
int value;
int ret;
-#ifdef H5_USE_16_API_DEFAULT
/* preserve previous error stack handler */
- H5Eget_auto(&old_error_cb, &old_error_client_data);
+ H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data);
/* set each thread's error stack handler */
- H5Eset_auto(error_callback, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- /* preserve previous error stack handler */
- H5Eget_auto(H5E_DEFAULT, &old_error_cb, &old_error_client_data);
-
- /* set each thread's error stack handler */
- H5Eset_auto(H5E_DEFAULT, error_callback, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, error_callback, NULL);
/* define dataspace for dataset */
dimsf[0] = 1;
@@ -201,11 +193,7 @@ void *tts_error_thread(void UNUSED *arg)
assert(ret >= 0);
/* turn our error stack handler off */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(old_error_cb, old_error_client_data);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, old_error_cb, old_error_client_data);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data);
return NULL;
}
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 7ed5215..4d1008c 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -359,14 +359,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 5d2a203..9e408d4 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -349,14 +349,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 4ef368e..ccb1466 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -131,15 +131,20 @@ IF (BUILD_TESTING)
SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
-############# COPY OBJECTS ##############
-
# Remove any output file left over from previous test run
ADD_TEST (
- NAME H5COPY-clear-objects
+ NAME H5COPY-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
./testfiles/${HDF_FILE1}.out.h5
./testfiles/${HDF_FILE1}.out.out
+ ./testfiles/${HDF_FILE1}.out.out.err
+ ./testfiles/${HDF_FILE2}.out.h5
+ ./testfiles/${HDF_FILE2}.out.out
+ ./testfiles/${HDF_FILE2}.out.out.err
+ ./testfiles/${HDF_EXT_SRC_FILE}.out.h5
+ ./testfiles/${HDF_EXT_SRC_FILE}.out.out
+ ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err
)
# "Test copying various forms of datasets"
@@ -190,6 +195,7 @@ IF (BUILD_TESTING)
-E remove
./testfiles/${HDF_FILE2}.out.h5
./testfiles/${HDF_FILE2}.out.out
+ ./testfiles/${HDF_FILE2}.out.out.err
)
# "Test copying object and region references"
@@ -207,6 +213,7 @@ IF (BUILD_TESTING)
-E remove
./testfiles/${HDF_EXT_SRC_FILE}.out.h5
./testfiles/${HDF_EXT_SRC_FILE}.out.out
+ ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err
)
# "Test copying external link directly without -f ext"
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index 9e382d1..83fb97d 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -341,14 +341,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index b5a1e5b..a784ae7 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -233,7 +233,7 @@ IF (BUILD_TESTING)
)
ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- IF (WIN32)
+ IF (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5diff
POST_BUILD
@@ -247,7 +247,7 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt
)
- ELSE (WIN32)
+ ELSE (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5diff
POST_BUILD
@@ -261,7 +261,7 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt
)
- ENDIF (WIN32)
+ ENDIF (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -293,40 +293,314 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
-SET (FILE1 h5diff_basic1.h5)
-SET (FILE2 h5diff_basic2.h5)
-SET (FILE3 h5diff_types.h5)
-SET (FILE4 h5diff_dtypes.h5)
-SET (FILE5 h5diff_attr1.h5)
-SET (FILE6 h5diff_attr2.h5)
-SET (FILE7 h5diff_dset1.h5)
-SET (FILE8 h5diff_dset2.h5)
-SET (FILE9 h5diff_hyper1.h5)
-SET (FILE10 h5diff_hyper2.h5)
-SET (FILE11 h5diff_empty.h5)
-SET (FILE12 h5diff_links.h5)
-SET (FILE13 h5diff_softlinks.h5)
-SET (FILE14 h5diff_linked_softlink.h5)
-SET (FILE15 h5diff_extlink_src.h5)
-SET (FILE16 h5diff_extlink_trg.h5)
-SET (FILE17 h5diff_ext2softlink_src.h5)
-SET (FILE18 h5diff_ext2softlink_trg.h5)
-SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
-SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
-SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
-SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
-# group recursive - same structure via external links through files
-SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
-SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
-SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
-SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
-# same structure, same obj name with different value
-SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
-SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
-# different structure and obj names
-SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
-SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
-
+ SET (FILE1 h5diff_basic1.h5)
+ SET (FILE2 h5diff_basic2.h5)
+ SET (FILE3 h5diff_types.h5)
+ SET (FILE4 h5diff_dtypes.h5)
+ SET (FILE5 h5diff_attr1.h5)
+ SET (FILE6 h5diff_attr2.h5)
+ SET (FILE7 h5diff_dset1.h5)
+ SET (FILE8 h5diff_dset2.h5)
+ SET (FILE9 h5diff_hyper1.h5)
+ SET (FILE10 h5diff_hyper2.h5)
+ SET (FILE11 h5diff_empty.h5)
+ SET (FILE12 h5diff_links.h5)
+ SET (FILE13 h5diff_softlinks.h5)
+ SET (FILE14 h5diff_linked_softlink.h5)
+ SET (FILE15 h5diff_extlink_src.h5)
+ SET (FILE16 h5diff_extlink_trg.h5)
+ SET (FILE17 h5diff_ext2softlink_src.h5)
+ SET (FILE18 h5diff_ext2softlink_trg.h5)
+ SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
+ SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
+ SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
+ SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
+ # group recursive - same structure via external links through files
+ SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
+ SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
+ SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
+ SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
+ # same structure, same obj name with different value
+ SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
+ SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
+ # different structure and obj names
+ SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
+ SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DIFF-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5diff_10.out
+ h5diff_10.out.err
+ h5diff_100.out
+ h5diff_100.out.err
+ h5diff_101.out
+ h5diff_101.out.err
+ h5diff_102.out
+ h5diff_102.out.err
+ h5diff_11.out
+ h5diff_11.out.err
+ h5diff_12.out
+ h5diff_12.out.err
+ h5diff_13.out
+ h5diff_13.out.err
+ h5diff_14.out
+ h5diff_14.out.err
+ h5diff_15.out
+ h5diff_15.out.err
+ h5diff_16_1.out
+ h5diff_16_1.out.err
+ h5diff_16_2.out
+ h5diff_16_2.out.err
+ h5diff_16_3.out
+ h5diff_16_3.out.err
+ h5diff_17.out
+ h5diff_17.out.err
+ h5diff_171.out
+ h5diff_171.out.err
+ h5diff_172.out
+ h5diff_172.out.err
+ h5diff_18_1.out
+ h5diff_18_1.out.err
+ h5diff_18.out
+ h5diff_18.out.err
+ h5diff_20.out
+ h5diff_20.out.err
+ h5diff_200.out
+ h5diff_200.out.err
+ h5diff_201.out
+ h5diff_201.out.err
+ h5diff_202.out
+ h5diff_202.out.err
+ h5diff_203.out
+ h5diff_203.out.err
+ h5diff_204.out
+ h5diff_204.out.err
+ h5diff_205.out
+ h5diff_205.out.err
+ h5diff_206.out
+ h5diff_206.out.err
+ h5diff_207.out
+ h5diff_207.out.err
+ h5diff_21.out
+ h5diff_21.out.err
+ h5diff_22.out
+ h5diff_22.out.err
+ h5diff_23.out
+ h5diff_23.out.err
+ h5diff_24.out
+ h5diff_24.out.err
+ h5diff_25.out
+ h5diff_25.out.err
+ h5diff_26.out
+ h5diff_26.out.err
+ h5diff_27.out
+ h5diff_27.out.err
+ h5diff_28.out
+ h5diff_28.out.err
+ h5diff_300.out
+ h5diff_300.out.err
+ h5diff_400.out
+ h5diff_400.out.err
+ h5diff_401.out
+ h5diff_401.out.err
+ h5diff_402.out
+ h5diff_402.out.err
+ h5diff_403.out
+ h5diff_403.out.err
+ h5diff_404.out
+ h5diff_404.out.err
+ h5diff_405.out
+ h5diff_405.out.err
+ h5diff_406.out
+ h5diff_406.out.err
+ h5diff_407.out
+ h5diff_407.out.err
+ h5diff_408.out
+ h5diff_408.out.err
+ h5diff_409.out
+ h5diff_409.out.err
+ h5diff_410.out
+ h5diff_410.out.err
+ h5diff_411.out
+ h5diff_411.out.err
+ h5diff_412.out
+ h5diff_412.out.err
+ h5diff_413.out
+ h5diff_413.out.err
+ h5diff_414.out
+ h5diff_414.out.err
+ h5diff_415.out
+ h5diff_415.out.err
+ h5diff_416.out
+ h5diff_416.out.err
+ h5diff_417.out
+ h5diff_417.out.err
+ h5diff_418.out
+ h5diff_418.out.err
+ h5diff_419.out
+ h5diff_419.out.err
+ h5diff_420.out
+ h5diff_420.out.err
+ h5diff_421.out
+ h5diff_421.out.err
+ h5diff_422.out
+ h5diff_422.out.err
+ h5diff_423.out
+ h5diff_423.out.err
+ h5diff_424.out
+ h5diff_424.out.err
+ h5diff_425.out
+ h5diff_425.out.err
+ h5diff_450.out
+ h5diff_450.out.err
+ h5diff_451.out
+ h5diff_451.out.err
+ h5diff_452.out
+ h5diff_452.out.err
+ h5diff_453.out
+ h5diff_453.out.err
+ h5diff_454.out
+ h5diff_454.out.err
+ h5diff_455.out
+ h5diff_455.out.err
+ h5diff_456.out
+ h5diff_456.out.err
+ h5diff_457.out
+ h5diff_457.out.err
+ h5diff_458.out
+ h5diff_458.out.err
+ h5diff_459.out
+ h5diff_459.out.err
+ h5diff_480.out
+ h5diff_480.out.err
+ h5diff_481.out
+ h5diff_481.out.err
+ h5diff_482.out
+ h5diff_482.out.err
+ h5diff_483.out
+ h5diff_483.out.err
+ h5diff_484.out
+ h5diff_484.out.err
+ h5diff_50.out
+ h5diff_50.out.err
+ h5diff_51.out
+ h5diff_51.out.err
+ h5diff_52.out
+ h5diff_52.out.err
+ h5diff_53.out
+ h5diff_53.out.err
+ h5diff_54.out
+ h5diff_54.out.err
+ h5diff_55.out
+ h5diff_55.out.err
+ h5diff_56.out
+ h5diff_56.out.err
+ h5diff_57.out
+ h5diff_57.out.err
+ h5diff_58.out
+ h5diff_58.out.err
+ h5diff_500.out
+ h5diff_500.out.err
+ h5diff_501.out
+ h5diff_501.out.err
+ h5diff_502.out
+ h5diff_502.out.err
+ h5diff_503.out
+ h5diff_503.out.err
+ h5diff_504.out
+ h5diff_504.out.err
+ h5diff_505.out
+ h5diff_505.out.err
+ h5diff_506.out
+ h5diff_506.out.err
+ h5diff_507.out
+ h5diff_507.out.err
+ h5diff_508.out
+ h5diff_508.out.err
+ h5diff_509.out
+ h5diff_509.out.err
+ h5diff_510.out
+ h5diff_510.out.err
+ h5diff_511.out
+ h5diff_511.out.err
+ h5diff_512.out
+ h5diff_512.out.err
+ h5diff_513.out
+ h5diff_513.out.err
+ h5diff_514.out
+ h5diff_514.out.err
+ h5diff_515.out
+ h5diff_515.out.err
+ h5diff_516.out
+ h5diff_516.out.err
+ h5diff_517.out
+ h5diff_517.out.err
+ h5diff_518.out
+ h5diff_518.out.err
+ h5diff_600.out
+ h5diff_600.out.err
+ h5diff_601.out
+ h5diff_601.out.err
+ h5diff_603.out
+ h5diff_603.out.err
+ h5diff_604.out
+ h5diff_604.out.err
+ h5diff_605.out
+ h5diff_605.out.err
+ h5diff_606.out
+ h5diff_606.out.err
+ h5diff_607.out
+ h5diff_607.out.err
+ h5diff_608.out
+ h5diff_608.out.err
+ h5diff_609.out
+ h5diff_609.out.err
+ h5diff_610.out
+ h5diff_610.out.err
+ h5diff_612.out
+ h5diff_612.out.err
+ h5diff_613.out
+ h5diff_613.out.err
+ h5diff_614.out
+ h5diff_614.out.err
+ h5diff_615.out
+ h5diff_615.out.err
+ h5diff_616.out
+ h5diff_616.out.err
+ h5diff_617.out
+ h5diff_617.out.err
+ h5diff_618.out
+ h5diff_618.out.err
+ h5diff_619.out
+ h5diff_619.out.err
+ h5diff_621.out
+ h5diff_621.out.err
+ h5diff_622.out
+ h5diff_622.out.err
+ h5diff_623.out
+ h5diff_623.out.err
+ h5diff_624.out
+ h5diff_624.out.err
+ h5diff_625.out
+ h5diff_625.out.err
+ h5diff_626.out
+ h5diff_626.out.err
+ h5diff_627.out
+ h5diff_627.out.err
+ h5diff_628.out
+ h5diff_628.out.err
+ h5diff_629.out
+ h5diff_629.out.err
+ h5diff_70.out
+ h5diff_70.out.err
+ h5diff_80.out
+ h5diff_80.out.err
+ h5diff_90.out
+ h5diff_90.out.err
+ )
# ############################################################################
# # Common usage
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index ce3acd9..3bfbf8e 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -348,14 +348,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index a678b2f..84eb49a 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -453,6 +453,30 @@ void usage(void)
printf(" comparing floating point values.\n");
printf(" By default, strict equality is used. Use -p or -d to\n");
printf(" set specific tolerance.\n");
+ printf(" --exclude-path \"path\" Exclude the specified path to an object when\n");
+ printf(" comparing files or groups. If a group is excluded,\n");
+ printf(" all member objects will also be excluded.\n");
+ printf(" The specified path is excluded wherever it occurs.\n");
+ printf(" This flexibility enables the same option to exclude\n");
+ printf(" either objects that exist only in one file or\n");
+ printf(" common objects that are known to differ.\n");
+ printf("\n");
+ printf(" When comparing files, \"path\" is the absolute path to\n");
+ printf(" the excluded object; when comparing groups, \"path\" is\n");
+ printf(" similar to the relative path from the group to the\n");
+ printf(" excluded object. This \"path\" can be taken from the\n");
+ printf(" first section of the output of the --verbose option.\n");
+ printf(" For example, if you are comparing the group /groupA\n");
+ printf(" in two files and you want to exclude\n");
+ printf(" /groupA/groupB/groupC in both files, the exclude\n");
+ printf(" option would read as follows:\n");
+ printf(" --exclude-path \"/groupB/groupC\"\n");
+ printf("\n");
+ printf(" If there are multiple paths to an object, only the\n");
+ printf(" specified path(s) will be excluded; the comparison\n");
+ printf(" will include any path not explicitly excluded.\n");
+ printf(" This option can be used repeatedly to exclude\n");
+ printf(" multiple paths.\n");
printf("\n");
printf(" Modes of output:\n");
diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt
index 224f9bc..4dae480 100644
--- a/tools/h5diff/testfiles/h5diff_10.txt
+++ b/tools/h5diff/testfiles/h5diff_10.txt
@@ -62,6 +62,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt
index b096ab5..ea767fc 100644
--- a/tools/h5diff/testfiles/h5diff_600.txt
+++ b/tools/h5diff/testfiles/h5diff_600.txt
@@ -62,6 +62,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt
index 2b37530..1c48c8b 100644
--- a/tools/h5diff/testfiles/h5diff_603.txt
+++ b/tools/h5diff/testfiles/h5diff_603.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt
index 63a1d53..8f3bbd6 100644
--- a/tools/h5diff/testfiles/h5diff_606.txt
+++ b/tools/h5diff/testfiles/h5diff_606.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt
index 6141495..e348caa 100644
--- a/tools/h5diff/testfiles/h5diff_612.txt
+++ b/tools/h5diff/testfiles/h5diff_612.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt
index eaa2078..1bb0eb5 100644
--- a/tools/h5diff/testfiles/h5diff_615.txt
+++ b/tools/h5diff/testfiles/h5diff_615.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt
index 8319db9..172cade 100644
--- a/tools/h5diff/testfiles/h5diff_621.txt
+++ b/tools/h5diff/testfiles/h5diff_621.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt
index 1ccff92..beb04c5 100644
--- a/tools/h5diff/testfiles/h5diff_622.txt
+++ b/tools/h5diff/testfiles/h5diff_622.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt
index 2c15d98..56c0b4c 100644
--- a/tools/h5diff/testfiles/h5diff_623.txt
+++ b/tools/h5diff/testfiles/h5diff_623.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt
index 272b9fc..c0a95ed 100644
--- a/tools/h5diff/testfiles/h5diff_624.txt
+++ b/tools/h5diff/testfiles/h5diff_624.txt
@@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
comparing floating point values.
By default, strict equality is used. Use -p or -d to
set specific tolerance.
+ --exclude-path "path" Exclude the specified path to an object when
+ comparing files or groups. If a group is excluded,
+ all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude
+ either objects that exist only in one file or
+ common objects that are known to differ.
+
+ When comparing files, "path" is the absolute path to
+ the excluded object; when comparing groups, "path" is
+ similar to the relative path from the group to the
+ excluded object. This "path" can be taken from the
+ first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA
+ in two files and you want to exclude
+ /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
+
+ If there are multiple paths to an object, only the
+ specified path(s) will be excluded; the comparison
+ will include any path not explicitly excluded.
+ This option can be used repeatedly to exclude
+ multiple paths.
Modes of output:
Default mode: print the number of differences found and where they occured
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 15b869e..2949f6a 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -54,10 +54,10 @@ FILE17=h5diff_ext2softlink_src.h5
FILE18=h5diff_ext2softlink_trg.h5
DANGLE_LINK_FILE1=h5diff_danglelinks1.h5
DANGLE_LINK_FILE2=h5diff_danglelinks2.h5
-/* group recursive */
+# group recursive
GRP_RECURSE_FILE1=h5diff_grp_recurse1.h5
GRP_RECURSE_FILE2=h5diff_grp_recurse2.h5
-/* group recursive - same structure via external links through files */
+# group recursive - same structure via external links through files
GRP_RECURSE1_EXT=h5diff_grp_recurse_ext1.h5
GRP_RECURSE2_EXT1=h5diff_grp_recurse_ext2-1.h5
GRP_RECURSE2_EXT2=h5diff_grp_recurse_ext2-2.h5
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 4af24c7..5458b9d 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -372,17 +372,17 @@ IF (BUILD_TESTING)
ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl
)
- IF (WIN32 AND NOT MINGW)
+ IF (WIN32 AND NOT CYGWIN)
FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
FILE (WRITE ${PROJECT_BINARY_DIR}/tbinregR.exp "${TEST_STREAM}")
- ELSE (WIN32 AND NOT MINGW)
+ ELSE (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp
)
- ENDIF (WIN32 AND NOT MINGW)
+ ENDIF (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -473,6 +473,225 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tall-1.out
+ tall-1.out.err
+ tall-2.out
+ tall-2.out.err
+ tall-2A.out
+ tall-2A.out.err
+ tall-2B.out
+ tall-2B.out.err
+ tall-3.out
+ tall-3.out.err
+ tall-4s.out
+ tall-4s.out.err
+ tall-5s.out
+ tall-5s.out.err
+ tallfilters.out
+ tallfilters.out.err
+ tarray1.out
+ tarray1.out.err
+ tarray2.out
+ tarray2.out.err
+ tarray3.out
+ tarray3.out.err
+ tarray4.out
+ tarray4.out.err
+ tarray5.out
+ tarray5.out.err
+ tarray6.out
+ tarray6.out.err
+ tarray7.out
+ tarray7.out.err
+ tarray8.out
+ tarray8.out.err
+ tattr-1.out
+ tattr-1.out.err
+ tattr-2.out
+ tattr-2.out.err
+ tattr-3.out
+ tattr-3.out.err
+ tattrreg.out
+ tattrreg.out.err
+ tattrregR.out
+ tattrregR.out.err
+ tbinregR.out
+ tbinregR.out.err
+ tbigdims.out
+ tbigdims.out.err
+ tboot1.out
+ tboot1.out.err
+ tboot2.out
+ tboot2.out.err
+ tchar1.out
+ tchar1.out.err
+ tchunked.out
+ tchunked.out.err
+ tcomp-1.out
+ tcomp-1.out.err
+ tcomp-2.out
+ tcomp-2.out.err
+ tcomp-3.out
+ tcomp-3.out.err
+ tcomp-4.out
+ tcomp-4.out.err
+ tcompact.out
+ tcompact.out.err
+ tcontents.out
+ tcontents.out.err
+ tcontiguos.out
+ tcontiguos.out.err
+ tdatareg.out
+ tdatareg.out.err
+ tdataregR.out
+ tdataregR.out.err
+ tdeflate.out
+ tdeflate.out.err
+ tdset-1.out
+ tdset-1.out.err
+ tdset-2.out
+ tdset-2.out.err
+ tdset-3s.out
+ tdset-3s.out.err
+ tempty.out
+ tempty.out.err
+ texternal.out
+ texternal.out.err
+ textlinksrc.out
+ textlinksrc.out.err
+ textlinkfar.out
+ textlinkfar.out.err
+ tfamily.out
+ tfamily.out.err
+ tfill.out
+ tfill.out.err
+ tfletcher32.out
+ tfletcher32.out.err
+ tfpformat.out
+ tfpformat.out.err
+ tgroup-1.out
+ tgroup-1.out.err
+ tgroup-2.out
+ tgroup-2.out.err
+ tgrp_comments.out
+ tgrp_comments.out.err
+ thlink-1.out
+ thlink-1.out.err
+ thlink-2.out
+ thlink-2.out.err
+ thlink-3.out
+ thlink-3.out.err
+ thlink-4.out
+ thlink-4.out.err
+ thlink-5.out
+ thlink-5.out.err
+ thyperslab.out
+ thyperslab.out.err
+ tindicesno.out
+ tindicesno.out.err
+ tindicessub1.out
+ tindicessub1.out.err
+ tindicessub2.out
+ tindicessub2.out.err
+ tindicessub3.out
+ tindicessub3.out.err
+ tindicessub4.out
+ tindicessub4.out.err
+ tindicesyes.out
+ tindicesyes.out.err
+ tlarge_objname.out
+ tlarge_objname.out.err
+ tldouble.out
+ tldouble.out.err
+ tlonglinks.out
+ tlonglinks.out.err
+ tloop-1.out
+ tloop-1.out.err
+ tmulti.out
+ tmulti.out.err
+ tnamed_dtype_attr.out
+ tnamed_dtype_attr.out.err
+ tnestcomp-1.out
+ tnestcomp-1.out.err
+ tnbit.out
+ tnbit.out.err
+ tnofilename.out
+ tnofilename.out.err
+ tnullspace.out
+ tnullspace.out.err
+ tordergr1.out
+ tordergr1.out.err
+ tordergr2.out
+ tordergr2.out.err
+ tordergr3.out
+ tordergr3.out.err
+ tordergr4.out
+ tordergr4.out.err
+ tordergr5.out
+ tordergr5.out.err
+ torderattr1.out
+ torderattr1.out.err
+ torderattr2.out
+ torderattr2.out.err
+ torderattr3.out
+ torderattr3.out.err
+ torderattr4.out
+ torderattr4.out.err
+ tperror.out
+ tperror.out.err
+ treference.out
+ treference.out.err
+ tsaf.out
+ tsaf.out.err
+ tscaleoffset.out
+ tscaleoffset.out.err
+ tshuffle.out
+ tshuffle.out.err
+ tslink-1.out
+ tslink-1.out.err
+ tslink-2.out
+ tslink-2.out.err
+ tsplit_file.out
+ tsplit_file.out.err
+ tstr-1.out
+ tstr-1.out.err
+ tstr-2.out
+ tstr-2.out.err
+ tstring.out
+ tstring.out.err
+ tstring2.out
+ tstring2.out.err
+ tstringe.out
+ tstringe.out.err
+ tszip.out
+ tszip.out.err
+ tudlink-1.out
+ tudlink-1.out.err
+ tudlink-2.out
+ tudlink-2.out.err
+ tuserfilter.out
+ tuserfilter.out.err
+ tvldtypes1.out
+ tvldtypes1.out.err
+ tvldtypes2.out
+ tvldtypes2.out.err
+ tvldtypes3.out
+ tvldtypes3.out.err
+ tvldtypes4.out
+ tvldtypes4.out.err
+ tvldtypes5.out
+ tvldtypes5.out.err
+ tvlstr.out
+ tvlstr.out.err
+ tvms.out
+ tvms.out.err
+ )
+
# test for displaying groups
ADD_H5_TEST (tgroup-1 0 tgroup.h5)
# test for displaying the selected groups
@@ -583,11 +802,7 @@ IF (BUILD_TESTING)
# test failure handling
# Missing file name
- IF (${USE_PACKED_BITS})
- ADD_H5_TEST (tnofilename-with-packed-bits 1)
- ELSE (${USE_PACKED_BITS})
- ADD_H5_TEST (tnofilename 1)
- ENDIF (${USE_PACKED_BITS})
+ ADD_H5_TEST (tnofilename 1)
# rev. 2004
@@ -774,13 +989,156 @@ IF (BUILD_TESTING)
ADD_H5_TEST (textlinksrc 0 textlinksrc.h5)
ADD_H5_TEST (textlinkfar 0 textlinkfar.h5)
- # test for dataset packed bits
- SET (TESTTYPE "TEST")
- IF (NOT ${USE_PACKED_BITS})
- SET (TESTTYPE "SKIP")
- ENDIF (NOT ${USE_PACKED_BITS})
- ADD_SKIP_H5_TEST (tpackedbits 0 ${TESTTYPE} -d /dset1 -M 0,2 tdset.h5)
- ADD_SKIP_H5_TEST (tpackedbits2 0 ${TESTTYPE} -d /dset1 -M 0,2,2,1 tdset.h5)
+ ####### test for dataset packed bits ######
+ IF (HDF5_USE_H5DUMP_PACKED_BITS)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP_PACKED_BITS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tpackedbits.out
+ tpackedbits.out.err
+ tpackedbits2.out
+ tpackedbits2.out.err
+ )
+ ADD_H5_TEST (tpackedbits 0 -d /dset1 -M 0,2 tdset.h5)
+ ADD_H5_TEST (tpackedbits2 0 -d /dset1 -M 0,2,2,1 tdset.h5)
+ ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP-XML-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tall.h5.out
+ tall.h5.out.err
+ tall-2A.h5.out
+ tall-2A.h5.out.err
+ tarray1.h5.out
+ tarray1.h5.out.err
+ tarray2.h5.out
+ tarray2.h5.out.err
+ tarray3.h5.out
+ tarray3.h5.out.err
+ tarray6.h5.out
+ tarray6.h5.out.err
+ tarray7.h5.out
+ tarray7.h5.out.err
+ tattr.h5.out
+ tattr.h5.out.err
+ tbitfields.h5.out
+ tbitfields.h5.out.err
+ tcompound.h5.out
+ tcompound.h5.out.err
+ tcompound2.h5.out
+ tcompound2.h5.out.err
+ tcompound_complex.h5.out
+ tcompound_complex.h5.out.err
+ tdatareg.h5.out
+ tdatareg.h5.out.err
+ tdset.h5.out
+ tdset.h5.out.err
+ tdset2.h5.out
+ tdset2.h5.out.err
+ tempty-dtd-2.h5.out
+ tempty-dtd-2.h5.out.err
+ tempty-dtd-uri.h5.out
+ tempty-dtd-uri.h5.out.err
+ tempty-dtd.h5.out
+ tempty-dtd.h5.out.err
+ tempty-nons-2.h5.out
+ tempty-nons-2.h5.out.err
+ tempty-nons-uri.h5.out
+ tempty-nons-uri.h5.out.err
+ tempty-nons.h5.out
+ tempty-nons.h5.out.err
+ tempty-ns-2.h5.out
+ tempty-ns-2.h5.out.err
+ tempty-ns.h5.out
+ tempty-ns.h5.out.err
+ tempty.h5.out
+ tempty.h5.out.err
+ tenum.h5.out
+ tenum.h5.out.err
+ textlink.h5.out
+ textlink.h5.out.err
+ tfpformat.h5.out
+ tfpformat.h5.out.err
+ tgroup.h5.out
+ tgroup.h5.out.err
+ thlink.h5.out
+ thlink.h5.out.err
+ tloop.h5.out
+ tloop.h5.out.err
+ tloop2.h5.out
+ tloop2.h5.out.err
+ tmany.h5.out
+ tmany.h5.out.err
+ tname-amp.h5.out
+ tname-amp.h5.out.err
+ tname-apos.h5.out
+ tname-apos.h5.out.err
+ tname-gt.h5.out
+ tname-gt.h5.out.err
+ tname-lt.h5.out
+ tname-lt.h5.out.err
+ tname-quot.h5.out
+ tname-quot.h5.out.err
+ tname-sp.h5.out
+ tname-sp.h5.out.err
+ tnamed_dtype_attr.h5.out
+ tnamed_dtype_attr.h5.out.err
+ tnestedcomp.h5.out
+ tnestedcomp.h5.out.err
+ tnodata.h5.out
+ tnodata.h5.out.err
+ tnoname.h5.out
+ tnoname.h5.out.err
+ tobjref.h5.out
+ tobjref.h5.out.err
+ topaque.h5.out
+ topaque.h5.out.err
+ torderattr1.h5.out
+ torderattr1.h5.out.err
+ torderattr2.h5.out
+ torderattr2.h5.out.err
+ torderattr3.h5.out
+ torderattr3.h5.out.err
+ torderattr4.h5.out
+ torderattr4.h5.out.err
+ tref-escapes-at.h5.out
+ tref-escapes-at.h5.out.err
+ tref-escapes.h5.out
+ tref-escapes.h5.out.err
+ tref.h5.out
+ tref.h5.out.err
+ tsaf.h5.out
+ tsaf.h5.out.err
+ tslink.h5.out
+ tslink.h5.out.err
+ tstr.h5.out
+ tstr.h5.out.err
+ tstr2.h5.out
+ tstr2.h5.out.err
+ tstring.h5.out
+ tstring.h5.out.err
+ tstring-at.h5.out
+ tstring-at.h5.out.err
+ tudlink.h5.out
+ tudlink.h5.out.err
+ tvldtypes1.h5.out
+ tvldtypes1.h5.out.err
+ tvldtypes2.h5.out
+ tvldtypes2.h5.out.err
+ tvldtypes3.h5.out
+ tvldtypes3.h5.out.err
+ tvldtypes4.h5.out
+ tvldtypes4.h5.out.err
+ tvldtypes5.h5.out
+ tvldtypes5.h5.out.err
+ tvlstr.h5.out
+ tvlstr.h5.out.err
+ )
########## test XML
ADD_XML_H5_TEST (tall.h5 0 tall.h5)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 3e76f2d..338e08c 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -346,14 +346,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index e304a41..261fe15 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -4312,7 +4312,7 @@ main(int argc, const char *argv[])
hid_t fid, gid;
char *fname = NULL;
void *edata;
- H5E_auto_t func;
+ H5E_auto2_t func;
H5O_info_t oi;
struct handler_t *hand;
int i;
@@ -4324,13 +4324,8 @@ main(int argc, const char *argv[])
dump_function_table = &ddl_function_table;
/* Disable error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func, &edata);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT, &func, &edata);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/* Initialize h5tools lib */
h5tools_init();
@@ -4538,11 +4533,8 @@ done:
HDfree(fname);
/* To Do: clean up XML table */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(func, edata);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, func, edata);
-#endif /* H5_USE_16_API_DEFAULT */
+
+ H5Eset_auto2(H5E_DEFAULT, func, edata);
leave(h5tools_getstatus());
}
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 00f6f1f..e2015dc 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -44,6 +44,22 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5IMPORT-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ binfp64.bin
+ binin8.bin
+ binin8w.bin
+ binin16.bin
+ binin32.bin
+ binuin16.bin
+ binuin32.bin
+ txtin16.txt
+ txtin32.txt
+ )
+
ADD_TEST (NAME h5importtest COMMAND $<TARGET_FILE:h5importtest>)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index fb40139..7c81903 100755
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -341,14 +341,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 2850a08..aac8ece 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -355,14 +355,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c
index 14d3f6a..17b1384 100644
--- a/tools/h5jam/h5jam.c
+++ b/tools/h5jam/h5jam.c
@@ -166,7 +166,7 @@ main (int argc, const char *argv[])
int h5fid;
int ofid;
void *edata;
- H5E_auto_t func;
+ H5E_auto2_t func;
hid_t ifile;
hid_t plist;
herr_t status;
@@ -185,13 +185,8 @@ main (int argc, const char *argv[])
h5tools_setstatus(EXIT_SUCCESS);
/* Disable error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func, &edata);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT, &func, &edata);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
parse_command_line (argc, argv);
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c
index c5a337d..8e31ce1 100644
--- a/tools/h5jam/h5unjam.c
+++ b/tools/h5jam/h5unjam.c
@@ -169,7 +169,7 @@ main(int argc, const char *argv[])
int ufid;
int h5fid;
void *edata;
- H5E_auto_t func;
+ H5E_auto2_t func;
hid_t ifile;
off_t fsize;
hsize_t usize;
@@ -183,13 +183,8 @@ main(int argc, const char *argv[])
h5tools_setstatus(EXIT_SUCCESS);
/* Disable error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func, &edata);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT, &func, &edata);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
parse_command_line(argc, argv);
diff --git a/tools/h5jam/tellub.c b/tools/h5jam/tellub.c
index ba71712..f1b6756 100644
--- a/tools/h5jam/tellub.c
+++ b/tools/h5jam/tellub.c
@@ -129,7 +129,7 @@ main (int argc, const char *argv[])
{
char *ifname;
void *edata;
- H5E_auto_t func;
+ H5E_auto2_t func;
hid_t ifile;
hsize_t usize;
htri_t testval;
@@ -140,13 +140,8 @@ main (int argc, const char *argv[])
h5tools_setstatus(EXIT_SUCCESS);
/* Disable error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eget_auto(&func, &edata);
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eget_auto(H5E_DEFAULT, &func, &edata);
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eget_auto2(H5E_DEFAULT, &func, &edata);
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
parse_command_line (argc, argv);
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index f6c1b4ce..c81f42b 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -151,6 +151,111 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5LS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ help-1.out
+ help-1.out.err
+ help-2.out
+ help-2.out.err
+ help-3.out
+ help-3.out.err
+ nosuchfile.out
+ nosuchfile.out.err
+ tall-1.out
+ tall-1.out.err
+ tall-2.out
+ tall-2.out.err
+ tarray1.out
+ tarray1.out.err
+ tattr2.out
+ tattr2.out.err
+ tcomp-1.out
+ tcomp-1.out.err
+ tdataregbe.out
+ tdataregbe.out.err
+ tdataregle.out
+ tdataregle.out.err
+ tdset-1.out
+ tdset-1.out.err
+ tempty.out
+ tempty.out.err
+ textlink-1.out
+ textlink-1.out.err
+ textlinksrc-1.out
+ textlinksrc-1.out.err
+ textlinksrc-2.out
+ textlinksrc-2.out.err
+ textlinksrc-3.out
+ textlinksrc-3.out.err
+ textlinksrc-4.out
+ textlinksrc-4.out.err
+ textlinksrc-5.out
+ textlinksrc-5.out.err
+ textlinksrc-6.out
+ textlinksrc-6.out.err
+ textlinksrc-7.out
+ textlinksrc-7.out.err
+ textlinksrc-1-old.out
+ textlinksrc-1-old.out.err
+ textlinksrc-2-old.out
+ textlinksrc-2-old.out.err
+ textlinksrc-3-old.out
+ textlinksrc-3-old.out.err
+ textlinksrc-6-old.out
+ textlinksrc-6-old.out.err
+ textlinksrc-7-old.out
+ textlinksrc-7-old.out.err
+ tsoftlinks-1.out
+ tsoftlinks-1.out.err
+ tsoftlinks-2.out
+ tsoftlinks-2.out.err
+ tsoftlinks-3.out
+ tsoftlinks-3.out.err
+ tsoftlinks-4.out
+ tsoftlinks-4.out.err
+ tsoftlinks-5.out
+ tsoftlinks-5.out.err
+ textlinksrc-nodangle-1.out
+ textlinksrc-nodangle-1.out.err
+ textlinksrc-nodangle-2.out
+ textlinksrc-nodangle-2.out.err
+ tsoftlinks-nodangle-1.out
+ tsoftlinks-nodangle-1.out.err
+ thlinks-nodangle-1.out
+ thlinks-nodangle-1.out.err
+ tgroup.out
+ tgroup.out.err
+ tgroup-1.out
+ tgroup-1.out.err
+ tgroup-2.out
+ tgroup-2.out.err
+ tgroup-3.out
+ tgroup-3.out.err
+ thlink-1.out
+ thlink-1.out.err
+ tloop-1.out
+ tloop-1.out.err
+ tnestcomp-1.out
+ tnestcomp-1.out.err
+ tsaf.out
+ tsaf.out.err
+ tslink-1.out
+ tslink-1.out.err
+ tstr-1.out
+ tstr-1.out.err
+ tudlink-1.out
+ tudlink-1.out.err
+ tvldtypes1.out
+ tvldtypes1.out.err
+ tvldtypes2le.out
+ tvldtypes2le.out.err
+ tvldtypes2be.out
+ tvldtypes2be.out.err
+ )
+
# test the help syntax
ADD_H5_TEST (help-1 0 -w80 -h)
ADD_H5_TEST (help-2 0 -w80 --help)
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 93f8e97..6c3a01a 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -335,14 +335,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 115a86c..b1d9ee9 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -2417,11 +2417,7 @@ main(int argc, const char *argv[])
/* Turn off HDF5's automatic error printing unless you're debugging h5ls */
if(!show_errors_g)
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/* Each remaining argument is an hdf5 file followed by an optional slash
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index b66020f..1fbc503 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -225,6 +225,72 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5REPACK-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5repack_attr.h5.out
+ h5repack_attr.h5.out.err
+ h5repack_deflate.h5.out
+ h5repack_deflate.h5.out.err
+ h5repack_early.h5.out
+ h5repack_early.h5.out.err
+ h5repack_ext.h5.out
+ h5repack_ext.h5.out.err
+ h5repack_fill.h5.out
+ h5repack_fill.h5.out.err
+ h5repack_filters.h5.out
+ h5repack_filters.h5.out.err
+ h5repack_fletcher.h5.out
+ h5repack_fletcher.h5.out.err
+ h5repack_hlink.h5.out
+ h5repack_hlink.h5.out.err
+ h5repack_layout.h5.out
+ h5repack_layout.h5.out.err
+ h5repack_layout.h5-v.out
+ h5repack_layout.h5-v.out.err
+ h5repack_layouto.h5.out
+ h5repack_layouto.h5.out.err
+ h5repack_layout2.h5-v.out
+ h5repack_layout2.h5-v.out.err
+ h5repack_named_dtypes.h5.out
+ h5repack_named_dtypes.h5.out.err
+ h5repack_nbit.h5.out
+ h5repack_nbit.h5.out.err
+ h5repack_objs.h5.out
+ h5repack_objs.h5.out.err
+ h5repack_refs.h5.out
+ h5repack_refs.h5.out.err
+ h5repack_shuffle.h5.out
+ h5repack_shuffle.h5.out.err
+ h5repack_soffset.h5.out
+ h5repack_soffset.h5.out.err
+ h5repack_szip.h5.out
+ h5repack_szip.h5.out.err
+ h5repack_attr_out.h5
+ h5repack_deflate_out.h5
+ h5repack_early_out.h5
+ h5repack_ext_out.h5
+ h5repack_fill_out.h5
+ h5repack_filters_out.h5
+ h5repack_fletcher_out.h5
+ h5repack_hlink_out.h5
+ h5repack_layout_out.h5
+ h5repack_layouto_out.h5
+ h5repack_layout2_out.h5
+ h5repack_named_dtypes_out.h5
+ h5repack_nbit_out.h5
+ h5repack_objs_out.h5
+ h5repack_refs_out.h5
+ h5repack_shuffle_out.h5
+ h5repack_soffset_out.h5
+ h5repack_szip_out.h5
+ h5repack_ub.h5
+ h5repack_ub_out.h5
+ h5repack_attr_refs_out.h5
+ )
+
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 23f5844..b4e6b48 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -355,14 +355,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 69793ae..3fa2041 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -109,6 +109,41 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5STAT-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5stat_help1.out
+ h5stat_help1.out.err
+ h5stat_help2.out
+ h5stat_help2.out.err
+ h5stat_filters.out
+ h5stat_filters.out.err
+ h5stat_filters-file.out
+ h5stat_filters-file.out.err
+ h5stat_filters-F.out
+ h5stat_filters-F.out.err
+ h5stat_filters-d.out
+ h5stat_filters-d.out.err
+ h5stat_filters-g.out
+ h5stat_filters-g.out.err
+ h5stat_filters-dT.out
+ h5stat_filters-dT.out.err
+ h5stat_filters-UD.out
+ h5stat_filters-UD.out.err
+ h5stat_filters-UT.out
+ h5stat_filters-UT.out.err
+ h5stat_tsohm.out
+ h5stat_tsohm.out.err
+ h5stat_newgrat.out
+ h5stat_newgrat.out.err
+ h5stat_newgrat-UG.out
+ h5stat_newgrat-UG.out.err
+ h5stat_newgrat-UA.out
+ h5stat_newgrat-UA.out.err
+ )
+
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)
ADD_H5_TEST (h5stat_help2 0 --help)
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 2e259c4..2fe9bc7 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -364,14 +364,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index 7cc098d..fd21266 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -1544,11 +1544,7 @@ main(int argc, const char *argv[])
h5tools_setstatus(EXIT_SUCCESS);
/* Disable error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/* Initialize h5tools lib */
h5tools_init();
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 020dab5..5e8ac33 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -334,14 +334,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 7509365..a1e2e49 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -102,10 +102,36 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME h5repart_20K-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ fst_family00000.h5
+ )
# repartition family member size to 20,000 bytes.
ADD_TEST (NAME h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME h5repart_5K-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ scd_family00000.h5
+ scd_family00001.h5
+ scd_family00002.h5
+ scd_family00003.h5
+ )
# repartition family member size to 5 KB.
ADD_TEST (NAME h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME h5repart_sec2-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ family_to_sec2.h5
+ )
# convert family file to sec2 file of 20,000 bytes
ADD_TEST (NAME h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 2627ce4..b33d14d 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -389,14 +389,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index c274f3f..a1421a2 100755
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -34,6 +34,25 @@ HL="@HL@"
############################################################################
## ##
+## Things You Can Modify to Override HDF5 Library Build Components: ##
+## ##
+## (Advanced usage - know what you're doing - you're on your own here.) ##
+## The four variables below can be used to insert paths and flags in ##
+## CPPFLAGS, CFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ##
+## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS ##
+## $LIBS $clibpath $link_objs $link_args $shared_link ##
+## ##
+## These settings can be overriden by setting HDF5_CFLAGS, ##
+## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
+## ##
+############################################################################
+CFLAGSBASE=""
+CPPFLAGSBASE=""
+LDFLAGSBASE=""
+LIBSBASE=""
+
+############################################################################
+## ##
## You shouldn't have to modify anything below this line. ##
## ##
############################################################################
@@ -62,13 +81,26 @@ get_output_file="no"
SHOW="eval"
CCBASE="@CC@"
CLINKERBASE="@CC@"
-CFLAGS="@AM_CFLAGS@ @CFLAGS@"
-CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
-LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
-LIBS="@LIBS@"
+
+# CFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user.
+# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
+
+# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
+H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@"
+H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
+H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
+H5BLD_LIBS="@LIBS@"
CC="${HDF5_CC:-$CCBASE}"
CLINKER="${HDF5_CLINKER:-$CLINKERBASE}"
+CFLAGS="${HDF5_CFLAGS:-$CFLAGSBASE}"
+CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
+LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
+LIBS="${HDF5_LIBS:-$LIBSBASE}"
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
@@ -80,6 +112,13 @@ usage() {
echo " -echo Show all the shell commands executed"
echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
echo " subdirectories [default: $prefix]"
+ # A wonderfully informative "usage" message.
+ echo "usage: $prog_name [OPTIONS] <compile line>"
+ echo " OPTIONS:"
+ echo " -help This help message."
+ echo " -echo Show all the shell commands executed"
+ echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
+ 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"
@@ -99,6 +138,19 @@ usage() {
echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library"
echo " [default: no]"
echo " "
+ echo " You can also add or change paths and flags to the compile line using"
+ echo " the following environment varibles or by assigning them to their counterparts"
+ echo " in the 'Things You Can Modify to Override...'" section of $prog_name
+ echo " "
+ echo " Variable Current value to be replaced"
+ echo " HDF5_CPPFLAGS \"$CPPFLAGSBASE\""
+ echo " HDF5_CFLAGS \"$CFLAGSBASE\""
+ echo " HDF5_LDFLAGS \"$LDFLAGSBASE\""
+ echo " HDF5_LIBS \"$LIBSBASE\""
+ echo " "
+ echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version"
+ echo " is located may link your program with that other hdf5 library version."
+ echo " "
exit $EXIT_FAILURE
}
@@ -251,7 +303,7 @@ if test "x$do_compile" = "xyes"; then
compile_args="-c $compile_args"
fi
- $SHOW $CC -I$includedir $CPPFLAGS $CFLAGS $compile_args
+ $SHOW $CC -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $compile_args
status=$?
if test "$status" != "0"; then
@@ -320,9 +372,14 @@ if test "x$do_link" = "xyes"; then
# The LIBS are just a bunch of -l* libraries necessary for the HDF5
# module. It's okay if they're included twice in the compile line.
- link_args="$link_args $LIBS"
-
- $SHOW $CLINKER $CFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS
+ link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
+
+ # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+ $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index 6d8a869..09f23ef 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -216,12 +216,7 @@ main(int argc, const char *argv[])
h5tools_setstatus(EXIT_SUCCESS);
/* Disable the HDF5 library's error reporting */
-#ifdef H5_USE_16_API_DEFAULT
- H5Eset_auto(NULL, NULL);
-#else /* H5_USE_16_API_DEFAULT */
- H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-#endif /* H5_USE_16_API_DEFAULT */
-
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/* Initialize h5tools lib */
h5tools_init();
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index f007bf7..d9acd61 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -489,13 +489,13 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.75"
+#define H5_PACKAGE_STRING "HDF5 1.9.77"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.75"
+#define H5_PACKAGE_VERSION "1.9.77"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -651,7 +651,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.75"
+#define H5_VERSION "1.9.77"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */
diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h
index af1fdaa..26f15b6 100755
--- a/windows/src/H5pubconf.h
+++ b/windows/src/H5pubconf.h
@@ -478,13 +478,13 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.75"
+#define H5_PACKAGE_STRING "HDF5 1.9.77"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.75"
+#define H5_PACKAGE_VERSION "1.9.77"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "I64"
@@ -641,7 +641,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.75"
+#define H5_VERSION "1.9.77"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */