diff options
128 files changed, 3641 insertions, 1783 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index eddb4e9..aa3bbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,7 +343,7 @@ SET (EXE_EXT "") IF (WIN32) SET (EXE_EXT ".exe") IF (NOT CYGWIN) - ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1) + ADD_DEFINITIONS (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS (-D_CONSOLE) ENDIF (NOT CYGWIN) @@ -1108,6 +1108,31 @@ INSTALL ( ) #----------------------------------------------------------------------------- +# Configure the HDF518_Examples.cmake file and the examples +#----------------------------------------------------------------------------- +OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) +IF (HDF5_PACK_EXAMPLES) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in + ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") + INSTALL ( + FILES + ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} + ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") +ENDIF (HDF5_PACK_EXAMPLES) + +#----------------------------------------------------------------------------- # Add Document File(s) to CMake Install #----------------------------------------------------------------------------- IF (NOT HDF5_EXTERNALLY_CONFIGURED) @@ -1183,16 +1208,37 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) + SET (CPACK_GENERATOR "TGZ") IF (WIN32) - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}") + LIST (APPEND CPACK_GENERATOR "NSIS") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") + SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") ELSEIF (APPLE) + LIST (APPEND CPACK_GENERATOR "DragNDrop") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") SET (CPACK_PACKAGING_INSTALL_PREFIX "/") + SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". + + LIST (APPEND CPACK_GENERATOR "Bundle") + #----------------------------------------------------------------------------- + # Configure the Info.plist file for the install bundle + #----------------------------------------------------------------------------- + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY + ) + SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / + SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") + SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") +# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") ELSE (WIN32) SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) @@ -87,6 +87,12 @@ and/or accompanying materials: opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. + ----------------------------------------------------------------------------- +HDF5 is available with the SZIP compression library but SZIP is not part +of HDF5 and has separate copyright and license terms. See “Szip Compression +in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details. + +----------------------------------------------------------------------------- @@ -113,6 +113,7 @@ ./config/powerpc-ibm-aix5.x ./config/solaris2.x ./config/sv1-cray +./config/x86_64-pc-cygwin ./config/x86_64-redstorm-linux-gnu ./config/site-specific/BlankForm @@ -1326,6 +1327,12 @@ # h5stat test files ./tools/h5stat/h5stat_gentest.c ./tools/h5stat/testh5stat.sh.in +./tools/h5stat/testfiles/h5stat_dims1.ddl +./tools/h5stat/testfiles/h5stat_dims2.ddl +./tools/h5stat/testfiles/h5stat_err1_dims.ddl +./tools/h5stat/testfiles/h5stat_err1_links.ddl +./tools/h5stat/testfiles/h5stat_err1_numattrs.ddl +./tools/h5stat/testfiles/h5stat_err2_numattrs.ddl ./tools/h5stat/testfiles/h5stat_filters.ddl ./tools/h5stat/testfiles/h5stat_filters-d.ddl ./tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -1337,11 +1344,22 @@ ./tools/h5stat/testfiles/h5stat_filters.h5 ./tools/h5stat/testfiles/h5stat_help1.ddl ./tools/h5stat/testfiles/h5stat_help2.ddl +./tools/h5stat/testfiles/h5stat_links1.ddl +./tools/h5stat/testfiles/h5stat_links2.ddl +./tools/h5stat/testfiles/h5stat_links3.ddl +./tools/h5stat/testfiles/h5stat_links4.ddl +./tools/h5stat/testfiles/h5stat_links5.ddl ./tools/h5stat/testfiles/h5stat_newgrat.ddl ./tools/h5stat/testfiles/h5stat_newgrat-UA.ddl ./tools/h5stat/testfiles/h5stat_newgrat-UG.ddl ./tools/h5stat/testfiles/h5stat_newgrat.h5 +./tools/h5stat/testfiles/h5stat_nofile.ddl ./tools/h5stat/testfiles/h5stat_notexist.ddl +./tools/h5stat/testfiles/h5stat_numattrs1.ddl +./tools/h5stat/testfiles/h5stat_numattrs2.ddl +./tools/h5stat/testfiles/h5stat_numattrs3.ddl +./tools/h5stat/testfiles/h5stat_numattrs4.ddl +./tools/h5stat/testfiles/h5stat_threshold.h5 ./tools/h5stat/testfiles/h5stat_tsohm.ddl ./tools/h5stat/testfiles/h5stat_tsohm.h5 @@ -1379,6 +1397,8 @@ ./tools/testfiles/tall-5s.ddl ./tools/testfiles/tall-6.ddl ./tools/testfiles/tall-6.exp +./tools/testfiles/tall-7.ddl +./tools/testfiles/tall-7N.ddl ./tools/testfiles/tall.h5 ./tools/testfiles/tarray1.ddl ./tools/testfiles/tarray1.h5 @@ -2395,12 +2415,18 @@ ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake ./config/cmake/CPack.cmake +./config/cmake/CPack.Info.plist.in +./config/cmake/hdf.gif ./config/cmake/NSIS.template.in ./config/cmake/NSIS.InstallOptions.ini.in # CMake-specific User Files ./config/cmake/UserMacros/Windows_MT.cmake +# CMake-specific Examples Files +./config/cmake/HDF518_Examples.cmake.in +./release_docs/USING_CMake_Examples.txt + ./CMakeLists.txt ./CTestConfig.cmake ./UserMacros.cmake @@ -1,4 +1,4 @@ -HDF5 version 1.9.156 currently under development +HDF5 version 1.9.162 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 2480497..874df5d 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -76,7 +76,7 @@ set (CTEST_MAX_N 8) set (LOCAL_NO_SUBMIT TRUE) # No CDash submit. set (MODEL "Experimental") set (CDASH_LOCAL TRUE) -set (SITE_BUILDNAME_SUFFIX "SHARED") +set (SITE_BUILDNAME_SUFFIX "cmakehdf5") # -- URL set for internal check, default is to not update set (LOCAL_SKIP_UPDATE TRUE) @@ -225,7 +225,7 @@ EOF # Run ctest -ctest -S $cfgfile -C Release -O ctest.log +ctest -S $cfgfile -C Release -V -O ctest.log exit_code=$? if [ $exit_code = 0 ]; then echo Complete without error diff --git a/bin/config.guess b/bin/config.guess index f32079a..03fe473 100755 --- a/bin/config.guess +++ b/bin/config.guess @@ -778,9 +778,9 @@ EOF echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; + i*:CYGWIN*:* | x*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -815,7 +815,7 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index b3889a0..0651c29 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -568,8 +568,10 @@ H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const // if H5Oget_comment_by_name returns SUCCEED, return the string comment, // otherwise, throw an exception - if( ret_value < 0 ) - throwException("getComment", "H5Oget_comment_by_name failed"); + if( ret_value < 0 ) { + delete []comment_C; + throwException("getComment", "H5Oget_comment_by_name failed"); + } H5std_string comment = H5std_string(comment_C); delete []comment_C; diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index cb01519..261a7b0 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # Include src directory diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 9e60655..257e4be 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -230,7 +230,7 @@ void test_szip_filter(H5File& file1) issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg()); } - delete tconv_buf; + delete[] tconv_buf; } // if szip presents else { SKIPPED(); diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in new file mode 100644 index 0000000..a701a61 --- /dev/null +++ b/config/cmake/CPack.Info.plist.in @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + +<plist version="1.0"> +<dict> +<key>IFMajorVersion</key> +<integer>@CPACK_PACKAGE_VERSION_MAJOR@</integer> +<key>IFMinorVersion</key> +<integer>@CPACK_PACKAGE_VERSION_MINOR@</integer> +<key>IFPkgFlagAllowBackRev</key> +<false/> +<key>IFPkgFlagAuthorizationAction</key> +<string>AdminAuthorization</string> +<key>IFPkgFlagDefaultLocation</key> +<string>@CPACK_PACKAGE_DEFAULT_LOCATION@</string> +<key>IFPkgFlagInstallFat</key> +<false/> +<key>IFPkgFlagIsRequired</key> +<false/> +<key>IFPkgFlagOverwritePermissions</key> +<true/> +<key>IFPkgFlagRelocatable</key> +<@CPACK_PACKAGE_RELOCATABLE@/> +<key>IFPkgFlagRestartAction</key> +<string>NoRestart</string> +<key>IFPkgFlagRootVolumeOnly</key> +<false/> +<key>IFPkgFlagUpdateInstalledLanguages</key> +<false/> +<key>IFPkgFlagUseUserMask</key> +<false/> +<key>IFPkgFormatVersion</key> +<real>0.10000000149011612</real> +<key>CFBundleIdentifier</key> +<string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string> +</dict> +</plist> diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake index d96fe43..bdfa5b8 100644 --- a/config/cmake/CPack.cmake +++ b/config/cmake/CPack.cmake @@ -442,6 +442,7 @@ if(NOT CPACK_GENERATOR) endif() else() option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) + option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF) option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) endif() @@ -457,6 +458,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) endif() @@ -487,7 +489,7 @@ endif() mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ - CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE + CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) @@ -526,6 +528,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +# WiX specific variables +cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") + if(DEFINED CPACK_COMPONENTS_ALL) if(CPACK_MONOLITHIC_INSTALL) message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.") diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index cce71c7..b467a15 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -172,7 +172,9 @@ IF (WINDOWS) IF (NOT MINGW) SET (H5_HAVE_GETHOSTNAME 1) ENDIF (NOT MINGW) - SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) + SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) SET (H5_HAVE_FUNCTION 1) SET (H5_GETTIMEOFDAY_GIVES_TZ 1) SET (H5_HAVE_TIMEZONE 1) @@ -610,7 +612,9 @@ IF (NOT WINDOWS) CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG) CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO) CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE) - CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + IF (NOT CYGWIN AND NOT MINGW) + CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + ENDIF (NOT CYGWIN AND NOT MINGW) CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ) CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD) ENDIF (NOT WINDOWS) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in new file mode 100644 index 0000000..699e2d0 --- /dev/null +++ b/config/cmake/HDF518_Examples.cmake.in @@ -0,0 +1,112 @@ +cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/@HDF5_PACKAGE_VERSION@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif(APPLE) + +#----------------------------------------------------------------------------- +set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +## Uncompress source in tar file provided +## -------------------------- +if(WIN32) + set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") + message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") + execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) +else(WIN32) + message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") + execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) +endif(WIN32) + +if(NOT rv EQUAL 0) + message("extracting... [error-(${rv}) clean up]") + file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") +endif(NOT rv EQUAL 0) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) + +#----------------------------------------------------------------------------- +## -- set output to english +set($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- + ## NORMAL process + ## -------------------------- + CTEST_START (Experimental) + CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") + CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") + CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) + if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") + endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## +message("DONE")
\ No newline at end of file diff --git a/config/cmake/hdf.gif b/config/cmake/hdf.gif Binary files differnew file mode 100644 index 0000000..656617b --- /dev/null +++ b/config/cmake/hdf.gif diff --git a/config/gnu-flags b/config/gnu-flags index a79cc72..eef38ad 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -156,6 +156,11 @@ case "$cc_vendor-$cc_version" in gcc-3.*) PROD_CFLAGS="-O3" ;; + gcc-4.8.*) + # temp patch: when GCC 4.8.x is used for Linux, dt_arith fails if -O* + # is used. Remove any -O* flags. (AKC HDFFV-8500) + PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" + ;; gcc-4.*) PROD_CFLAGS="-O3" ;; diff --git a/config/lt_vers.am b/config/lt_vers.am index c3ec683..710e2a0 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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/config/x86_64-pc-cygwin b/config/x86_64-pc-cygwin new file mode 100644 index 0000000..9b1ab74 --- /dev/null +++ b/config/x86_64-pc-cygwin @@ -0,0 +1,121 @@ +# -*- shell-script -*- +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + + +# This file is part of the HDF5 build script. It is processed shortly +# after configure starts and defines, among other things, flags for +# the various compile modes. +# +# See BlankForm in this directory for details. + +# The default compiler is `gcc'. +if test -z "$CC"; then + CC=gcc + CC_BASENAME=gcc +fi + +# Figure out GNU C compiler flags +. $srcdir/config/gnu-flags + +# Figure out PGI C compiler flags +. $srcdir/config/pgi-flags + +# Figure out Intel C compiler flags +. $srcdir/config/intel-flags + +# The default Fortran 90 compiler +if test "X-" = "X-$FC"; then + case $CC_BASENAME in + gcc*) + FC=gfortran + FCLIBS=-lgcc + FC_BASENAME=gfortran + ;; + pgcc*) + FC=pgf90 + FC_BASENAME=pgf90 + ;; + icc*) + FC=ifort + FC_BASENAME=ifort + ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + esac +else + case $FC in + # The PGI and Intel compilers are automatically detected below + ifc*|ifort*|pgf90*) + ;; + gfortran) + FCLIBS=-lgcc + ;; + g95) + FCLIBS=-lgcc + ;; + *) + # Figure out which compiler we are using: pgf90 or Absoft f95 + RM='rm -f' + tmpfile=/tmp/cmpver.$$ + $FC -V >$tmpfile + if test -s "$tmpfile"; then + if( grep -s 'Absoft' $tmpfile > /dev/null) then + FC_BASENAME=f95 + fi + if( grep -s 'pgf90' $tmpfile > /dev/null) then + FC_BASENAME=pgf90 + fi + fi + $RM $tmpfile + ;; + esac +fi + +# Figure out PGI F90 compiler flags +. $srcdir/config/pgi-fflags + +# Figure out Intel F90 compiler flags +. $srcdir/config/intel-fflags + +case $FC_BASENAME in + # + # Absoft compiler + # + f95) + # Set required flag for compiling C stubs + H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT" + + F9XSUFFIXFLAG="" +# We force compiler to use upper case for external names +# (just in case since this should be a default EIP) + H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" + FSEARCH_DIRS="" + DEBUG_FCFLAGS="-g" + PROD_FCFLAGS="-O" + PROFILE_FCFLAGS="-g -pg" + f9x_flags_set=yes + ;; + +esac + +# The default C++ compiler + +# The default compiler is `g++'. +if test -z "$CXX"; then + CXX=g++ + CXX_BASENAME=g++ +fi @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.156. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.162. # # Report bugs to <help@hdfgroup.org>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.156' -PACKAGE_STRING='HDF5 1.9.156' +PACKAGE_VERSION='1.9.162' +PACKAGE_STRING='HDF5 1.9.162' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.156 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.162 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.156:";; + short | recursive ) echo "Configuration of HDF5 1.9.162:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.156 +HDF5 configure 1.9.162 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.156, which was +It was created by HDF5 $as_me 1.9.162, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.156' + VERSION='1.9.162' cat >>confdefs.h <<_ACEOF @@ -5243,14 +5243,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## ac_ext=${ac_fc_srcext-f} @@ -26922,7 +26914,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo +for ac_func in _getvideoconfig gettextinfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -26934,6 +26926,23 @@ _ACEOF fi done +case "`uname`" in + CYGWIN*) + ;; + *) + for ac_func in GetConsoleScreenBufferInfo +do : + ac_fn_c_check_func "$LINENO" "GetConsoleScreenBufferInfo" "ac_cv_func_GetConsoleScreenBufferInfo" +if test "x$ac_cv_func_GetConsoleScreenBufferInfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETCONSOLESCREENBUFFERINFO 1 +_ACEOF + +fi +done + + ;; +esac for ac_func in _scrsize ioctl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -28361,44 +28370,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpi_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpi" >&5 +$as_echo_n "checking for mpi_file_open in -lmpi... " >&6; } +if ${ac_cv_lib_mpi_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpi_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpi_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpi_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpi_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPI 1 _ACEOF @@ -28427,44 +28422,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpio_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpio" >&5 +$as_echo_n "checking for mpi_file_open in -lmpio... " >&6; } +if ${ac_cv_lib_mpio_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpio_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpio_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpio_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpio_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpio_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPIO 1 _ACEOF @@ -31632,7 +31613,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -HDF5 config.lt 1.9.156 +HDF5 config.lt 1.9.162 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33743,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.156, which was +This file was extended by HDF5 $as_me 1.9.162, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33809,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.156 +HDF5 config.status 1.9.162 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 0a4d854..7cfb3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.156], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.162], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) @@ -433,14 +433,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## AC_FC_SRCEXT([f90]) @@ -2156,7 +2148,14 @@ AC_TRY_COMPILE([ ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -AC_CHECK_FUNCS([_getvideoconfig gettextinfo GetConsoleScreenBufferInfo]) +AC_CHECK_FUNCS([_getvideoconfig gettextinfo]) +case "`uname`" in + CYGWIN*) + ;; + *) + AC_CHECK_FUNCS([GetConsoleScreenBufferInfo]) + ;; +esac AC_CHECK_FUNCS([_scrsize ioctl]) AC_MSG_CHECKING([for struct videoconfig]) @@ -2716,10 +2715,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpi], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpi], [mpi_file_open],, [PARALLEL=no])]) ## Then try link a simple MPI-IO program. If fail, try again with ## -lmpio. @@ -2730,10 +2726,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpio], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpio], [mpi_file_open],, [PARALLEL=no])]) fi ## Change to the C language diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 8e75989..05eafcf 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -320,7 +320,6 @@ nh5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f * char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ H5O_info_t Oinfo; - struct tm *ts; /* * Convert FORTRAN name to C name @@ -599,7 +598,6 @@ nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *la { char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ - htri_t status = 0; /* * Convert FORTRAN name to C name diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 0799e11..bca050e 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -355,7 +355,6 @@ nh5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; - hdset_reg_ref_t ref_c; int_f ret_value = 0; /* diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 8b6036b..65ebcaf 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,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 = 146 +LT_VERS_REVISION = 152 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 d052046..1285541 100644 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -36,15 +36,15 @@ HL="@HL@" ## ## ## (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 ## +## FCFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ## +## $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ## ## $fmodules $link_objs $link_args $shared_link ## ## ## -## These settings can be overriden by setting HDF5_FFLAGS, ## +## These settings can be overriden by setting HDF5_FCFLAGS, ## ## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## ## ## ############################################################################ -FFLAGSBASE="" +FCFLAGSBASE="" LDFLAGSBASE="" LIBSBASE="" @@ -77,15 +77,15 @@ SHOW="eval" FCBASE="@FC@" FLINKERBASE="@FC@" -# FFLAGS and LDFLAGS are reserved for use by the script user. +# FCFLAGS 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. User's LDFLAGS come just +# User's FCFLAGS come after their H5BLD counterparts. 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. # The order of the flags is intended to give precedence to the user's flags. -H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@" +H5BLD_FCFLAGS="@AM_FCFLAGS@ @FCFLAGS@" F9XMODFLAG="@F9XMODFLAG@" F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" @@ -93,7 +93,7 @@ H5BLD_LIBS="@LIBS@" FC="${HDF5_FC:-$FCBASE}" FLINKER="${HDF5_FLINKER:-$FLINKERBASE}" -FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}" +FCFLAGS="${HDF5_FCFLAGS:-$FCFLAGSBASE}" LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" LIBS="${HDF5_LIBS:-$LIBSBASE}" @@ -140,7 +140,7 @@ usage() { 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_FCFLAGS \"$CFLAGSBASE\"" echo " HDF5_LDFLAGS \"$LDFLAGSBASE\"" echo " HDF5_LIBS \"$LIBSBASE\"" echo " " @@ -287,7 +287,7 @@ if test "x$do_compile" = "xyes"; then fi - $SHOW $FC $H5BLD_FFLAGS $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args + $SHOW $FC $H5BLD_FCFLAGS $FCFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args status=$? if test "$status" != "0"; then @@ -358,12 +358,12 @@ if test "x$do_link" = "xyes"; then # module. It's okay if they're included twice in the compile line. link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" - # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just + # User's FCFLAGS come after their H5BLD counterparts. 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. # The order of the flags is intended to give precedence to the user's flags. - $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link + $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link status=$? fi diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 6639a92..369ccc2 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c index 77398c4..76c3a75 100644 --- a/hl/examples/ex_image2.c +++ b/hl/examples/ex_image2.c @@ -46,6 +46,10 @@ int main( void ) /* make the image */ status=H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf ); + if (gbuf) { + free(gbuf); + gbuf = NULL; + } /*------------------------------------------------------------------------- * define a palette, blue to red tones @@ -75,6 +79,10 @@ int main( void ) /* make dataset */ status=H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf ); + if (gbuf) { + free(gbuf); + gbuf = NULL; + } /* close the file. */ H5Fclose( file_id ); diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 8618fc6..332a7e2 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -212,10 +212,6 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); - -HDF5_HL_F90CSTUBDLL -int_f nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL @@ -224,16 +220,15 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attache HDF5_HL_F90CSTUBDLL int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); +nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); HDF5_HL_F90CSTUBDLL int_f -nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); - +nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, int_f *labellen); HDF5_HL_F90CSTUBDLL int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, int_f *labellen); +nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index caed99d..85e4757 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index cb3a1ce..5f8cd50 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -1872,12 +1872,9 @@ ssize_t H5DSget_scale_name(hid_t did, if (H5Sclose(sid) < 0) goto out; if (buf) - { free(buf); - buf=NULL; - } - return (ssize_t) MAX(0,nbytes-1); + return (ssize_t)(nbytes - 1); /* error zone */ out: @@ -1887,10 +1884,7 @@ out: H5Sclose(sid); } H5E_END_TRY; if (buf) - { free(buf); - buf=NULL; - } return FAIL; } diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 88f8de4..98f2ff2 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -2161,7 +2161,6 @@ out: */ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type) { - extern int H5LTyyparse(void); hid_t type_id; if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG) @@ -2175,8 +2174,10 @@ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type) input_len = HDstrlen(text); myinput = HDstrdup(text); - if((type_id = H5LTyyparse()) < 0) + if((type_id = H5LTyyparse()) < 0) { + HDfree(myinput); goto out; + } HDfree(myinput); input_len = 0; diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 5ec795b..f02bed6 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -1400,54 +1400,58 @@ case 57: YY_RULE_SETUP #line 159 "H5LTanalyze.l" { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } YY_BREAK case 58: YY_RULE_SETUP -#line 165 "H5LTanalyze.l" +#line 169 "H5LTanalyze.l" {return token('{');} YY_BREAK case 59: YY_RULE_SETUP -#line 166 "H5LTanalyze.l" +#line 170 "H5LTanalyze.l" {return token('}');} YY_BREAK case 60: YY_RULE_SETUP -#line 167 "H5LTanalyze.l" +#line 171 "H5LTanalyze.l" {return token('[');} YY_BREAK case 61: YY_RULE_SETUP -#line 168 "H5LTanalyze.l" +#line 172 "H5LTanalyze.l" {return token(']');} YY_BREAK case 62: YY_RULE_SETUP -#line 169 "H5LTanalyze.l" +#line 173 "H5LTanalyze.l" {return token(':');} YY_BREAK case 63: YY_RULE_SETUP -#line 170 "H5LTanalyze.l" +#line 174 "H5LTanalyze.l" {return token(';');} YY_BREAK case 64: YY_RULE_SETUP -#line 171 "H5LTanalyze.l" +#line 175 "H5LTanalyze.l" ; YY_BREAK case 65: YY_RULE_SETUP -#line 172 "H5LTanalyze.l" +#line 176 "H5LTanalyze.l" { return 0; } YY_BREAK case 66: YY_RULE_SETUP -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" ECHO; YY_BREAK #line 1432 "H5LTanalyze.c" @@ -2032,7 +2036,11 @@ FILE *file; #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#ifdef H5_HAVE_WIN32_API + b->yy_is_interactive = file ? (isatty( _fileno(file) ) > 0) : 0; +#else /* H5_HAVE_WIN32_API */ + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif /* H5_HAVE_WIN32_API */ #endif #endif } @@ -2327,7 +2335,7 @@ int main() return 0; } #endif -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" int my_yyinput(char *buf, int max_size) { diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index 3f63f50..581672b 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -157,7 +157,11 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);} return token('"'); } <TAG_STRING>[^\"]+ { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index a021efc..b91e97e 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -329,7 +329,11 @@ enum_list : ; enum_def : '"' enum_symbol '"' { is_enum_memb = 1; /*indicate member of enum*/ +#ifdef H5_HAVE_WIN32_API + enum_memb_symbol = _strdup(yylval.sval); +#else /* H5_HAVE_WIN32_API */ enum_memb_symbol = strdup(yylval.sval); +#endif /* H5_HAVE_WIN32_API */ } enum_val ';' { diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index 69616b1..0ee6b5c 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -48,5 +48,6 @@ H5_HLDLL herr_t H5LT_find_attribute( hid_t loc_id, const char *name ); H5_HLDLL char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, hbool_t no_user_buf); +H5_HLDLL int H5LTyyparse(void); #endif diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 3f82131..89428ff 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # This library is our main target. diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 1bfa23f..57a2b89 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -3126,7 +3126,7 @@ static int test_simple(void) if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0) goto out; - if(HDstrncmp("Latitude set 0",name_out, sizeof(name_out))!=0) + if(HDstrncmp("Latitude set 0",name_out, name_len)!=0) goto out; if(name_out) { HDfree(name_out); diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index b649462..bcf6663 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1812,7 +1812,6 @@ out: static int test_valid_path(void) { hid_t file_id, group; - herr_t status; htri_t path_valid; const char *data_string_in = "test"; @@ -1943,7 +1942,8 @@ static int test_valid_path(void) /* * Close the file. */ - status = H5Fclose (file_id); + if(H5Fclose (file_id) < 0) + goto out; /* Create another file for checking external links */ diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 0e3190c..87fa82c 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -245,52 +245,52 @@ do_pio(parameters param) /* Validate transfer buffer size & block size*/ if(blk_size<=0) { HDfprintf(stderr, - "Transfer block size (%Hd) must be > 0\n", (long long)blk_size); + "Transfer block size (%zu) must be > 0\n", blk_size); GOTOERROR(FAIL); } if(buf_size<=0) { HDfprintf(stderr, - "Transfer buffer size (%Hd) must be > 0\n", (long long)buf_size); + "Transfer buffer size (%zu) must be > 0\n", buf_size); GOTOERROR(FAIL); } if ((buf_size % blk_size) != 0){ HDfprintf(stderr, - "Transfer buffer size (%Hd) must be a multiple of the " - "interleaved I/O block size (%Hd)\n", - (long long)buf_size, (long long)blk_size); + "Transfer buffer size (%zu) must be a multiple of the " + "interleaved I/O block size (%zu)\n", + buf_size, blk_size); GOTOERROR(FAIL); } if((snbytes%pio_mpi_nprocs_g)!=0) { HDfprintf(stderr, - "Dataset size (%Hd) must be a multiple of the " - "number of processes (%d)\n", - (long long)snbytes, pio_mpi_nprocs_g); + "Dataset size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "number of processes (%d)\n", + (long long)snbytes, pio_mpi_nprocs_g); GOTOERROR(FAIL); } if (!param.dim2d){ if(((snbytes/pio_mpi_nprocs_g)%buf_size)!=0) { HDfprintf(stderr, - "Dataset size/process (%Hd) must be a multiple of the " - "trasfer buffer size (%Hd)\n", - (long long)(snbytes/pio_mpi_nprocs_g), (long long)buf_size); + "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size (%zu)\n", + (long long)(snbytes/pio_mpi_nprocs_g), buf_size); GOTOERROR(FAIL); } } else { if((snbytes%buf_size)!=0) { HDfprintf(stderr, - "Dataset side size (%Hd) must be a multiple of the " - "trasfer buffer size (%Hd)\n", - (long long)snbytes, (long long)buf_size); + "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size (%zu)\n", + (long long)snbytes, buf_size); GOTOERROR(FAIL); } } /* Allocate transfer buffer */ if ((buffer = malloc(bsize)) == NULL){ - HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", - (long long)(bsize)); + HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", + bsize); GOTOERROR(FAIL); } @@ -651,13 +651,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, HDprint_rank(output); if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long long)buf_size, (long long)bytes_begin[0], + "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long long)buf_size*blk_size, (long long)bytes_begin[0], + "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size*blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } } @@ -1625,13 +1625,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, HDprint_rank(output); if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long long)buf_size, (long long)bytes_begin[0], + "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long long)buf_size*blk_size, (long long)bytes_begin[0], + "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size*blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } } @@ -2336,10 +2336,10 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, if (++nerror < 20){ /* report at most 20 errors */ HDprint_rank(output); - HDfprintf(output, "read data error, expected (%Hd), " - "got (%Hd)\n", - (long long)pio_mpi_rank_g+1, - (long long)*(ucharptr-1)); + HDfprintf(output, "read data error, expected (%d), " + "got (%d)\n", + pio_mpi_rank_g+1, + (int)*(ucharptr-1)); } /* end if */ } /* end if */ } /* end for */ diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 337e982..a47754b 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -1116,14 +1116,14 @@ recover_size_and_print(long long val, const char *end) if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { if (val >= ONE_GB && (val % ONE_GB) == 0) - HDfprintf(output, "%HdGB%s", val / ONE_GB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""GB%s", val / ONE_GB, end); else - HDfprintf(output, "%HdMB%s", val / ONE_MB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""MB%s", val / ONE_MB, end); } else { - HDfprintf(output, "%HdKB%s", val / ONE_KB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""KB%s", val / ONE_KB, end); } } else { - HDfprintf(output, "%Hd%s", val, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""%s", val, end); } } @@ -1150,12 +1150,12 @@ report_parameters(struct options *opts) HDfprintf(output, "rank %d: IO API=", rank); print_io_api(opts->io_types); - HDfprintf(output, "rank %d: Number of files=%Hd\n", rank, - (long long)opts->num_files); - HDfprintf(output, "rank %d: Number of datasets=%Hd\n", rank, - (long long)opts->num_dsets); - HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank, - (long long)opts->num_iters); + HDfprintf(output, "rank %d: Number of files=%ld\n", rank, + opts->num_files); + HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank, + opts->num_dsets); + HDfprintf(output, "rank %d: Number of iterations=%d\n", rank, + opts->num_iters); HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs); diff --git a/perform/sio_engine.c b/perform/sio_engine.c index 4d6afd8..8539f75 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -196,15 +196,15 @@ do_sio(parameters param) /* Validate transfer buffer size */ if (param.buf_size[i]<=0) { HDfprintf(stderr, - "Transfer buffer size[%d] (%Hd) must be > 0\n", i,(long long)buf_size[i]); + "Transfer buffer size[%d] (%zu) must be > 0\n", i,buf_size[i]); GOTOERROR(FAIL); } if ((param.dset_size[i]%param.buf_size[i])!=0) { HDfprintf(stderr, - "Dataset size[%d] (%Hd) must be a multiple of the " - "trasfer buffer size[%d] (%Hd)\n",param.rank, - (long long)param.dset_size[i], param.rank, (long long)param.buf_size[i]); + "Dataset size[%d] (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size[%d] (%zu)\n",param.rank, + (long long)param.dset_size[i], param.rank, param.buf_size[i]); GOTOERROR(FAIL); } @@ -212,7 +212,7 @@ do_sio(parameters param) /* Allocate transfer buffer */ if ((buffer = malloc(linear_buf_size)) == NULL){ - HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", (long long)(linear_buf_size)); + HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size); GOTOERROR(FAIL); } @@ -1149,25 +1149,25 @@ done: hid_t set_vfd(parameters *param) { - hid_t fapl = -1; + hid_t my_fapl = -1; vfdtype vfd; vfd = param->vfd; - if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1; + if ((my_fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1; if (vfd == sec2) { /* Unix read() and write() system calls */ - if (H5Pset_fapl_sec2(fapl)<0) return -1; + if (H5Pset_fapl_sec2(my_fapl)<0) return -1; } else if (vfd == stdio) { /* Standard C fread() and fwrite() system calls */ - if (H5Pset_fapl_stdio(fapl)<0) return -1; + if (H5Pset_fapl_stdio(my_fapl)<0) return -1; } else if (vfd == core) { /* In-core temporary file with 1MB increment */ - if (H5Pset_fapl_core(fapl, (size_t)1024*1024, TRUE)<0) return -1; + if (H5Pset_fapl_core(my_fapl, (size_t)1024*1024, TRUE)<0) return -1; } else if (vfd == split) { /* Split meta data and raw data each using default driver */ - if (H5Pset_fapl_split(fapl, + if (H5Pset_fapl_split(my_fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT)<0) return -1; @@ -1193,7 +1193,7 @@ set_vfd(parameters *param) memb_addr[mt] = MAX(mt-1,0)*(HADDR_MAX/10); } - if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, + if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE)<0) { return -1; } @@ -1203,20 +1203,20 @@ set_vfd(parameters *param) /* Family of files, each 1MB and using the default driver */ /* if ((val=HDstrtok(NULL, " \t\n\r"))) fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024); */ - if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0) + if (H5Pset_fapl_family(my_fapl, fam_size, H5P_DEFAULT)<0) return -1; } else if (vfd == direct) { #ifdef H5_HAVE_DIRECT /* Linux direct read() and write() system calls. Set memory boundary, file block size, * and copy buffer size to the default values. */ - if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1; + if (H5Pset_fapl_direct(my_fapl, 1024, 4096, 8*4096)<0) return -1; #endif } else { /* Unknown driver */ return -1; } - return fapl; + return my_fapl; } /* diff --git a/perform/sio_perf.c b/perform/sio_perf.c index 985f3c4..7df9337 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -832,14 +832,14 @@ recover_size_and_print(long long val, const char *end) if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { if (val >= ONE_GB && (val % ONE_GB) == 0) - HDfprintf(output, "%HdGB%s", val / ONE_GB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""GB%s", val / ONE_GB, end); else - HDfprintf(output, "%HdMB%s", val / ONE_MB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""MB%s", val / ONE_MB, end); } else { - HDfprintf(output, "%HdKB%s", val / ONE_KB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""KB%s", val / ONE_KB, end); } } else { - HDfprintf(output, "%Hd%s", val, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""%s", val, end); } } @@ -865,8 +865,8 @@ report_parameters(struct options *opts) HDfprintf(output, "IO API="); print_io_api(opts->io_types); - HDfprintf(output, "Number of iterations=%Hd\n", - (long long)opts->num_iters); + HDfprintf(output, "Number of iterations=%d\n", + opts->num_iters); HDfprintf(output, "Dataset size="); diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h index 677a8ae..b407ecb 100644 --- a/perform/sio_standalone.h +++ b/perform/sio_standalone.h @@ -62,7 +62,15 @@ */ #define HDabort() abort() #define HDabs(X) abs(X) +#ifdef H5_HAVE_WIN32_API +#define HDaccess(F,M) _access(F, M) +#define R_OK 4 /* Test for read permission. */ +#define W_OK 2 /* Test for write permission. */ +#define X_OK 1 /* Test for execute permission. */ +#define F_OK 0 /* Test for existence. */ +#else /* H5_HAVE_WIN32_API */ #define HDaccess(F,M) access(F, M) +#endif /* H5_HAVE_WIN32_API */ #define HDacos(X) acos(X) #ifdef H5_HAVE_ALARM #define HDalarm(N) alarm(N) @@ -214,7 +222,12 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #define HDgetpwuid(U) getpwuid(U) #define HDgetrusage(X,S) getrusage(X,S) #define HDgets(S) gets(S) +#ifdef H5_HAVE_VISUAL_STUDIO + H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); +#define HDgettimeofday(V,Z) Wgettimeofday(V,Z) +#else /* H5_HAVE_VISUAL_STUDIO */ #define HDgettimeofday(S,P) gettimeofday(S,P) +#endif /* H5_HAVE_VISUAL_STUDIO */ #define HDgetuid() getuid() #define HDgmtime(T) gmtime(T) #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ @@ -355,7 +368,8 @@ int HDremove_all(const char * fname); #define HDsinh(X) sinh(X) #define HDsleep(N) sleep(N) #ifdef H5_HAVE_WIN32_API -#define HDsnprintf _snprintf /*varargs*/ +H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); +#define HDsnprintf c99_snprintf /*varargs*/ #else #define HDsnprintf snprintf /*varargs*/ #endif @@ -373,7 +387,11 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* sscanf() variable arguments */ +#ifdef H5_HAVE_WIN32_API +#define HDstrcasecmp(A,B) _stricmp(A,B) +#else #define HDstrcasecmp(X,Y) strcasecmp(X,Y) +#endif #define HDstrcat(X,Y) strcat(X,Y) #define HDstrchr(S,C) strchr(S,C) #define HDstrcmp(X,Y) strcmp(X,Y) @@ -433,7 +451,8 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDvprintf(FMT,A) vprintf(FMT,A) #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A) #ifdef H5_HAVE_WIN32_API -# define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) +H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); +#define HDvsnprintf c99_vsnprintf #else # define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A) #endif diff --git a/perform/zip_perf.c b/perform/zip_perf.c index 585dc13..f76e10b 100644 --- a/perform/zip_perf.c +++ b/perform/zip_perf.c @@ -157,11 +157,11 @@ error(const char *fmt, ...) va_list ap; va_start(ap, fmt); - fprintf(stderr, "%s: error: ", prog); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + HDfprintf(stderr, "%s: error: ", prog); + HDvfprintf(stderr, fmt, ap); + HDfprintf(stderr, "\n"); va_end(ap); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* @@ -174,9 +174,9 @@ error(const char *fmt, ...) static void cleanup(void) { - if (!getenv("HDF5_NOCLEANUP")) - unlink(filename); - free(filename); + if (!HDgetenv("HDF5_NOCLEANUP")) + HDunlink(filename); + HDfree(filename); } static void @@ -189,7 +189,7 @@ write_file(Bytef *source, uLongf sourceLen) /* destination buffer needs to be at least 0.1% larger than sourceLen * plus 12 bytes */ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12; - dest = (Bytef *)malloc(destLen); + dest = (Bytef *)HDmalloc(destLen); if (!dest) error("out of memory"); @@ -204,7 +204,7 @@ write_file(Bytef *source, uLongf sourceLen) ((double)timer_start.tv_usec) / MICROSECOND); if (report_once_flag) { - printf("\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); + HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); report_once_flag = 0; } @@ -213,10 +213,10 @@ write_file(Bytef *source, uLongf sourceLen) /* loop to make sure we write everything out that we want to write */ for (;;) { - int rc = (int)write(output, d_ptr, (size_t)d_len); + int rc = (int)HDwrite(output, d_ptr, (size_t)d_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (int)d_len) break; @@ -225,7 +225,7 @@ write_file(Bytef *source, uLongf sourceLen) d_ptr += rc; } - free(dest); + HDfree(dest); } /* @@ -299,7 +299,7 @@ static void get_unique_name(void) { const char *prefix = NULL; - const char *env = getenv("HDF5_PREFIX"); + const char *env = HDgetenv("HDF5_PREFIX"); if (env) prefix = env; @@ -309,19 +309,19 @@ get_unique_name(void) if (prefix) /* 2 = 1 for '/' + 1 for null terminator */ - filename = (char *) HDmalloc(strlen(prefix) + strlen(ZIP_PERF_FILE) + 2); + filename = (char *) HDmalloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2); else - filename = (char *) HDmalloc(strlen(ZIP_PERF_FILE) + 1); + filename = (char *) HDmalloc(HDstrlen(ZIP_PERF_FILE) + 1); if (!filename) error("out of memory"); filename[0] = 0; if (prefix){ - strcpy(filename, prefix); - strcat(filename, "/"); + HDstrcpy(filename, prefix); + HDstrcat(filename, "/"); } - strcat(filename, ZIP_PERF_FILE); + HDstrcat(filename, ZIP_PERF_FILE); } /* @@ -334,30 +334,30 @@ get_unique_name(void) static void usage(void) { - printf("usage: %s [OPTIONS]\n", prog); - printf(" OPTIONS\n"); - printf(" -h, --help Print this usage message and exit\n"); - printf(" -1...-9 Level of compression, from 1 to 9\n"); - printf(" -c P, --compressability=P Percentage of compressability of the random\n"); - printf(" data you want [default: 0]"); - printf(" -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); - printf(" -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); - printf(" -b S, --min-buffer_size=S Minumum size of buffer [default: 128K]\n"); - printf(" -p D, --prefix=D The directory prefix to place the file\n"); - printf(" -r, --random-test Use random data to write to the file\n"); - printf(" [default: no]\n"); - printf("\n"); - printf(" D - a directory which exists\n"); - printf(" P - a number between 0 and 100\n"); - printf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n"); - printf("\n"); - printf(" K - Kilobyte (%d)\n", ONE_KB); - printf(" M - Megabyte (%d)\n", ONE_MB); - printf(" G - Gigabyte (%d)\n", ONE_GB); - printf("\n"); - printf(" Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); - printf("\n"); - fflush(stdout); + HDfprintf(stdout, "usage: %s [OPTIONS]\n", prog); + HDfprintf(stdout, " OPTIONS\n"); + HDfprintf(stdout, " -h, --help Print this usage message and exit\n"); + HDfprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n"); + HDfprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n"); + HDfprintf(stdout, " data you want [default: 0]"); + HDfprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); + HDfprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); + HDfprintf(stdout, " -b S, --min-buffer_size=S Minumum size of buffer [default: 128K]\n"); + HDfprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n"); + HDfprintf(stdout, " -r, --random-test Use random data to write to the file\n"); + HDfprintf(stdout, " [default: no]\n"); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " D - a directory which exists\n"); + HDfprintf(stdout, " P - a number between 0 and 100\n"); + HDfprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n"); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB); + HDfprintf(stdout, " M - Megabyte (%d)\n", ONE_MB); + HDfprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); + HDfprintf(stdout, "\n"); + HDfflush(stdout); } /* @@ -380,7 +380,7 @@ parse_size_directive(const char *size) unsigned long s; char *endptr; - s = strtoul(size, &endptr, 10); + s = HDstrtoul(size, &endptr, 10); if (endptr && *endptr) { while (*endptr != '\0' && (*endptr == ' ' || *endptr == '\t')) @@ -419,16 +419,16 @@ fill_with_random_data(Bytef *src, uLongf src_len) Bytef *buf = src; int fd = HDopen("/dev/urandom", O_RDONLY, 0); - printf("Using /dev/urandom for random data\n"); + HDfprintf(stdout, "Using /dev/urandom for random data\n"); if (fd < 0) - error(strerror(errno)); + error(HDstrerror(errno)); for (;;) { - ssize_t rc = read(fd, buf, src_len); + ssize_t rc = HDread(fd, buf, src_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (ssize_t)len) break; @@ -437,7 +437,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) len -= rc; } } else { - printf("Using random() for random data\n"); + HDfprintf(stdout, "Using random() for random data\n"); for (u = 0; u < src_len; ++u) src[u] = (Bytef)(0xff & HDrandom()); @@ -446,7 +446,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) if (compress_percent) { unsigned long s = src_len * compress_percent / 100; - memset(src, '\0', s); + HDmemset(src, '\0', s); } } @@ -463,7 +463,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, register unsigned long i, iters; iters = file_size / src_len; - src = (Bytef *)calloc(1, sizeof(Bytef) * src_len); + src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len); if (!src) { cleanup(); @@ -475,26 +475,26 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, if (random_test) fill_with_random_data(src, src_len); - printf("Buffer size == "); + HDfprintf(stdout, "Buffer size == "); if (src_len >= ONE_KB && (src_len % ONE_KB) == 0) { if (src_len >= ONE_MB && (src_len % ONE_MB) == 0) { - printf("%ldMB", src_len / ONE_MB); + HDfprintf(stdout, "%ldMB", src_len / ONE_MB); } else { - printf("%ldKB", src_len / ONE_KB); + HDfprintf(stdout, "%ldKB", src_len / ONE_KB); } } else { - printf("%ld", src_len); + HDfprintf(stdout, "%ld", src_len); } - printf("\n"); + HDfprintf(stdout, "\n"); /* do uncompressed data write */ HDgettimeofday(&timer_start, NULL); output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(strerror(errno)); + error(HDstrerror(errno)); for (i = 0; i <= iters; ++i) { Bytef *s_ptr = src; @@ -502,10 +502,10 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, /* loop to make sure we write everything out that we want to write */ for (;;) { - ssize_t rc = write(output, s_ptr, s_len); + ssize_t rc = HDwrite(output, s_ptr, s_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (ssize_t)s_len) break; @@ -515,7 +515,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, } } - close(output); + HDclose(output); HDgettimeofday(&timer_stop, NULL); total_time = ((double)timer_stop.tv_sec + @@ -523,17 +523,17 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); - printf("\tUncompressed Write Time: %.2fs\n", total_time); - printf("\tUncompressed Write Throughput: %.2fMB/s\n", + HDfprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time); + HDfprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); - unlink(filename); + HDunlink(filename); /* do compressed data write */ output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(strerror(errno)); + error(HDstrerror(errno)); report_once_flag = 1; HDgettimeofday(&timer_start, NULL); @@ -541,7 +541,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, for (total_len = 0; total_len < file_size; total_len += src_len) write_file(src, src_len); - close(output); + HDclose(output); HDgettimeofday(&timer_stop, NULL); total_time = ((double)timer_stop.tv_sec + @@ -549,13 +549,13 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); - printf("\tCompressed Write Time: %.2fs\n", total_time); - printf("\tCompressed Write Throughput: %.2fMB/s\n", + HDfprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time); + HDfprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); - printf("\tCompression Time: %gs\n", compression_time); + HDfprintf(stdout, "\tCompression Time: %gs\n", compression_time); - unlink(filename); - free(src); + HDunlink(filename); + HDfree(src); } } @@ -593,7 +593,7 @@ main(int argc, char **argv) min_buf_size = parse_size_directive(opt_arg); break; case 'c': - compress_percent = (int)strtol(opt_arg, NULL, 10); + compress_percent = (int)HDstrtol(opt_arg, NULL, 10); if (compress_percent < 0) compress_percent = 0; @@ -626,12 +626,12 @@ main(int argc, char **argv) error("minmum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size); - printf("Filesize: %ld\n", file_size); + HDfprintf(stdout, "Filesize: %ld\n", file_size); if (compress_level == Z_DEFAULT_COMPRESSION) - printf("Compression Level: 6\n"); + HDfprintf(stdout, "Compression Level: 6\n"); else - printf("Compression Level: %d\n", compress_level); + HDfprintf(stdout, "Compression Level: %d\n", compress_level); get_unique_name(); do_write_test(file_size, min_buf_size, max_buf_size); @@ -652,7 +652,7 @@ main(int argc, char **argv) int main(void) { - printf("No compression IO performance because zlib was not configured\n"); + HDfprintf(stdout, "No compression IO performance because zlib was not configured\n"); return EXIT_SUCCESS; } diff --git a/release_docs/INSTALL b/release_docs/INSTALL index c1c7df6..96f4f6e 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -289,10 +289,10 @@ CONTENTS To configure AIX 64-bit support including the Fortran and C++ APIs, (Note: need to set $AR to 'ar -X 64'.) Serial: - $ CFLAGS=-q64 FFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran Parallel: (C++ not supported with parallel) - $ CFLAGS=-q64 FFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran 4.3.4. Additional compilation flags diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index 03b3ecf..6f60165 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -86,12 +86,12 @@ Then do the following steps: # Read the Details section about parallel tests. $ make install -We also suggest that you add "-qxlf90=autodealloc" to FFLAGS when building +We also suggest that you add "-qxlf90=autodealloc" to FCFLAGS when building parallel with fortran enabled. This can be done by invoking: - setenv FFLAGS -qxlf90=autodealloc # 32 bit build + setenv FCFLAGS -qxlf90=autodealloc # 32 bit build or - setenv FFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build + setenv FCFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build prior to running configure. Recall that the "-q64" is necessary for 64 bit builds. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ed3ec6b..1d84f71 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.156 currently under development +HDF5 version 1.9.162 currently under development ================================================================================ @@ -279,7 +279,11 @@ New Features Tools: ------ - - h5dump: Fixed displaying comporession ratio for unknown or user-defined + - h5dump: Added option -N --any_path, which searches the file for paths that + match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added optional arg 0 to -A, which excludes attributes from display. + HDFFV-8134 (ADB - 2013/08/01). + - h5dump: Fixed displaying compression ratio for unknown or user-defined filters. HDFFV-8344 (XCAO 2013/03/19) - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter. HDFFV-8346 (XCAO 2013/03/19) @@ -418,6 +422,8 @@ Bug Fixes since HDF5-1.8.0 release Library ------- + - Added const qualifier to source buffer parameters in H5Dgather and + H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/02) - Fixed an error involving failure to write fill values to the user's buffer when reading unallocated chunks from datasets that have a fill value set to H5D_FILL_VALUE_DEFAULT. A consequence of this @@ -1063,44 +1069,47 @@ Bug Fixes since HDF5-1.8.0 release C++ APIs -------- - - The constructor PropList::PropList(id) was fixed to act properly - according to the nature of 'id'. When 'id' is a property class id, - a new property list will be created. When 'id' id a property list id, - a copy of the property list will be made. (BMR - 2010/5/9) - - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and - CommonFG::getComment, respectively, now have default values for - user's convenience. (BMR - 2009/10/23) - - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05) - - read/write methods of DataSet and Attribute classes were fixed - to handle string correctly. (BMR - 2009/07/26) - - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20) - - Fixed bug in PropList::getClassName to use portable HDfree instead - of free. (BMR - 2008/04/20) - - Fixed a design bug which allowed an Attribute object to create/modify - attributes (bugzilla #1068). The API class hierarchy was revised - to address the problem. Classes AbstractDS and Attribute are moved - out of H5Object. Class Attribute now multiply inherits from - IdComponent and AbstractDs and class DataSet from H5Object and - AbstractDs. In addition, the data member IdComponent::id was - moved into subclasses: Attribute, DataSet, DataSpace, DataType, - H5File, Group, and PropList. (BMR - 2008/08/10) - - IdComponent::dereference was incorrect and replaced as described - in "New Features" section. - (BMR - 2008/08/10) + - The constructor PropList::PropList(id) was fixed to act properly + according to the nature of 'id'. When 'id' is a property class id, + a new property list will be created. When 'id' id a property list id, + a copy of the property list will be made. (BMR - 2010/5/9) + - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and + CommonFG::getComment, respectively, now have default values for + user's convenience. (BMR - 2009/10/23) + - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05) + - read/write methods of DataSet and Attribute classes were fixed + to handle string correctly. (BMR - 2009/07/26) + - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20) + - Fixed bug in PropList::getClassName to use portable HDfree instead + of free. (BMR - 2008/04/20) + - Fixed a design bug which allowed an Attribute object to create/modify + attributes (bugzilla #1068). The API class hierarchy was revised + to address the problem. Classes AbstractDS and Attribute are moved + out of H5Object. Class Attribute now multiply inherits from + IdComponent and AbstractDs and class DataSet from H5Object and + AbstractDs. In addition, the data member IdComponent::id was + moved into subclasses: Attribute, DataSet, DataSpace, DataType, + H5File, Group, and PropList. (BMR - 2008/08/10) + - IdComponent::dereference was incorrect and replaced as described + in "New Features" section. + (BMR - 2008/08/10) Testing ------- - - In some Mac system, testlibinfo.sh failed with this error: - Check file ../src/.libs/libhdf5.7.dylib - strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ - (unknown load command 15) - The strings command of Mac inspects library files and older - versions of strings may not know newer library format, resulting - in errors. Fixed by sending the library file as stdin to the strings - coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) - - - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation - faulted when used before. (AKC - 2013/02/12 HDFFV-8267) + - tools/h5diff/testh5diff.sh is run in every "make check", even after it + has passed in the previous run. It should not run again if there is no + code changes. Fixed. (AKC - 2013/07/19 HDFFV-8392) + - In some Mac system, testlibinfo.sh failed with this error: + Check file ../src/.libs/libhdf5.7.dylib + strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ + (unknown load command 15) + The strings command of Mac inspects library files and older + versions of strings may not know newer library format, resulting + in errors. Fixed by sending the library file as stdin to the strings + coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) + + - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation + faulted when used before. (AKC - 2013/02/12 HDFFV-8267) Supported Platforms @@ -1154,19 +1163,20 @@ Supported Platforms (emu) Sun Fortran 95 8.6 SunOS_sparc Sun C++ 5.12 SunOS_sparc - Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) - - Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) - - Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake) Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) (cmake and autotools) - Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake) Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) (cmake and autotools) + Windows 8 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + + Windows 8 x64 Visual Studio 2012 w/ Intel Fortran 13 (cmake) Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 @@ -1202,8 +1212,12 @@ Platform C F90/ F90 C++ zlib SZIP parallel F2003 parallel Solaris2.11 32-bit n y/y n y y y Solaris2.11 64-bit n y/n n y y y -Windows 7 y y/n n y y y -Windows 7 x64 y y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Windows 8 y y/y n y y y +Windows 8 x64 y y/y n y y y Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y Mac OS X Lion 10.7.3 32-bit n y/y n y y n Mac OS X Lion 10.7.3 64-bit n y/y n y y y @@ -1224,6 +1238,10 @@ Solaris2.11 32-bit y y y y Solaris2.11 64-bit y y y y Windows 7 y y y y Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Windows 8 y y y y +Windows 8 x64 y y y y Mac OS X Snow Leopard 10.6.8 64-bit y n y n Mac OS X Lion 10.7.3 32-bit y n y y Mac OS X Lion 10.7.3 64-bit y n y y @@ -1255,46 +1273,45 @@ The following platforms are not supported but have been tested for this release. g++ 4.6.1 20110422 gfortran 4.6.1 20110422 - Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux - gcc (Debian 4.4.5-8) 4.4.5 - GNU Fortran (Debian 4.4.5-8) 4.4.5 + Debian7.1.0 3.2.0-4-686 #1 SMP Debian 3.2.46-1 i686 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux - gcc (Debian 4.4.5-8) 4.4.5 - GNU Fortran (Debian 4.4.5-8) 4.4.5 + Debian7.1.0 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Fedora17 3.5.2-1.fc17.i6866 #1 SMP i686 i686 i386 GNU/Linux - gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) - GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + Fedora19 3.9.9-301.fc19.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) (cmake and autotools) - Fedora17 3.5.2-1.fc17.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux - gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) - GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + Fedora19 3.9.9-301.fc19.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) (cmake and autotools) - SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + SUSE 12.3 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux gcc (SUSE Linux) 4.7.1 GNU Fortran (SUSE Linux) 4.7.1 (cmake and autotools) - SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + SUSE 12.3 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux gcc (SUSE Linux) 4.7.1 GNU Fortran (SUSE Linux) 4.7.1 (cmake and autotools) - Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux - gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 - GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + Ubuntu 13.04 3.8.0-26-generic #38-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu1) 4.7.3 (cmake and autotools) - Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP x86_64 GNU/Linux - gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 - GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + Ubuntu 13.04 3.8.0-26-generic #38-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + GNU Fortran (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 (cmake and autotools) - (Use optimization level -O1) Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt new file mode 100644 index 0000000..33c43a3 --- /dev/null +++ b/release_docs/USING_CMake_Examples.txt @@ -0,0 +1,12 @@ +The compressed examples file, located in the HDF5 install folder, +can be built and tested with CMake and the supplied +HDF518_Examples.cmake file. It is recommended that you copy those +two files to your development location before continuing. + +The command line to be used is shown at the top of the file. Also, +the location of the HDF5 installation should be verified and +changed if necessary. + +When executed, the ctest script will save the results to the log file +indicated by the ctest command. If you wish the to see more build +and test information, add "-VV" to the ctest command. diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index bbfc501..b817f7e 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -7,7 +7,7 @@ These suggestions are for Visual Studio users. Instructions for building and testing HDF5 applications using CMake can -be found in the USING_CMake.txt file found in this folder. +be found in the USING_HDF5_CMake.txt file found in this folder. The following two sections are helpful if you do not use CMake to build your applications. diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 60eff61..2148f1e 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -601,6 +601,6 @@ done: if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header") - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5B2_hdr_delete() */ @@ -3339,7 +3339,9 @@ H5C_move_entry(H5C_t * cache_ptr, haddr_t old_addr, haddr_t new_addr) { +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS hbool_t was_dirty; +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ H5C_cache_entry_t * entry_ptr = NULL; H5C_cache_entry_t * test_entry_ptr = NULL; #if H5C_DO_SANITY_CHECKS @@ -3436,7 +3438,9 @@ H5C_move_entry(H5C_t * cache_ptr, if ( ! ( entry_ptr->destroy_in_progress ) ) { +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS was_dirty = entry_ptr->is_dirty; +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ if ( ! ( entry_ptr->flush_in_progress ) ) { diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 484b176..4309d64 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -108,7 +108,7 @@ typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *operator_data); /* Define the operator function pointer for H5Dscatter() */ -typedef herr_t (*H5D_scatter_func_t)(void **src_buf/*out*/, +typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *op_data); @@ -142,7 +142,7 @@ H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf); -H5_DLL herr_t H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, +H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data); H5_DLL herr_t H5Ddebug(hid_t dset_id); diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 60a8800..4b0846f 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -925,7 +925,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, H5S_t *dst_space; /* Dataspace */ H5S_sel_iter_t iter; /* Selection iteration info*/ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */ - void *src_buf = NULL; /* Source (contiguous) data buffer */ + const void *src_buf = NULL; /* Source (contiguous) data buffer */ size_t src_buf_nbytes = 0; /* Size of src_buf */ size_t type_size; /* Datatype element size */ hssize_t nelmts; /* Number of remaining elements in selection */ @@ -1018,8 +1018,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, size_t dst_buf_size, - void *dst_buf, H5D_gather_func_t op, void *op_data) +H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, + size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data) { H5T_t *type; /* Datatype */ H5S_t *src_space; /* Dataspace */ diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index b2ca5eb..0e6def6 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -39,8 +39,9 @@ typedef struct H5E_t H5E_t; * (Shouldn't need to be used outside this header file) */ #define HCOMMON_ERROR(maj, min, ...) \ - HERROR(maj, min, __VA_ARGS__); \ - err_occurred = TRUE; + HERROR(maj, min, __VA_ARGS__); \ + err_occurred = TRUE; \ + err_occurred = err_occurred; /* Shut GCC warnings up! */ /* * HDONE_ERROR macro, used to facilitate error reporting between a diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 8f4f7f0..64919ed 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -414,7 +414,11 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id, } /* Get the file descriptor (needed for truncate and some Windows information) */ +#ifdef H5_HAVE_WIN32_API + file->fd = _fileno(file->fp); +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); +#endif /* H5_HAVE_WIN32_API */ if(file->fd < 0) { free(file); fclose(f); diff --git a/src/H5Opline.c b/src/H5Opline.c index 1a2baa0..0a0f12a 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -183,7 +183,7 @@ H5O_pline_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, else filter->name = filter->_name; - HDstrcpy(filter->name, (const char *)p); + HDstrncpy(filter->name, (const char *)p, actual_name_length); p += name_length; } /* end if */ @@ -375,12 +375,9 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/) /* Allocate space for the filter name, or use the internal buffer */ if(namelen > H5Z_COMMON_NAME_LEN) { - dst->filter[i].name = (char *)H5MM_malloc(namelen); + dst->filter[i].name = (char *)H5MM_strdup(src->filter[i].name); if(NULL == dst->filter[i].name) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name") - - /* Copy name */ - HDstrcpy(dst->filter[i].name, src->filter[i].name); } /* end if */ else dst->filter[i].name = dst->filter[i]._name; @@ -464,7 +461,7 @@ H5O_pline_size(const H5F_t UNUSED *f, const void *mesg) } /* end else */ ret_value += 2 + /*filter identification number */ - ((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ + (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ 2 + /*flags */ 2 + /*number of client data values */ (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */ @@ -633,7 +630,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s for(i = 0; i < pline->nused; i++) { char name[32]; - sprintf(name, "Filter at position %u", (unsigned)i); + HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i); HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), "Filter identification:", @@ -656,7 +653,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s for(j = 0; j < pline->filter[i].cd_nelmts; j++) { char field_name[32]; - sprintf(field_name, "CD value %lu", (unsigned long)j); + HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j); HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name, pline->filter[i].cd_values[j]); diff --git a/src/H5public.h b/src/H5public.h index ad13851..f203bd1 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 156 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 162 /* 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.156" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.162" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/H5system.c b/src/H5system.c index e46964f..4280066 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -114,6 +114,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) char modifier[8]; int conv; char *rest, format_templ[128]; + int len; const char *s; va_list ap; @@ -138,7 +139,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) s = fmt + 1; /* Flags */ - while(HDstrchr ("-+ #", *s)) { + while(HDstrchr("-+ #", *s)) { switch(*s) { case '-': leftjust = 1; @@ -155,8 +156,9 @@ HDfprintf(FILE *stream, const char *fmt, ...) case '#': prefix = 1; break; + default: - HDassert(0 && "This Should never be executed!"); + HDassert(0 && "Unknown format flag"); } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */ s++; } /* end while */ @@ -191,7 +193,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) } /* Extra type modifiers */ - if(HDstrchr("ZHhlqLI", *s)) { + if(HDstrchr("zZHhlqLI", *s)) { switch(*s) { /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ @@ -205,6 +207,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) break; case 'Z': + case 'z': if(sizeof(size_t) < sizeof(long)) modifier[0] = '\0'; else if(sizeof(size_t) == sizeof(long)) @@ -244,16 +247,17 @@ HDfprintf(FILE *stream, const char *fmt, ...) conv = *s++; /* Create the format template */ - sprintf(format_templ, "%%%s%s%s%s%s", (leftjust ? "-" : ""), + len = 0; + len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", (leftjust ? "-" : ""), (plussign ? "+" : ""), (ldspace ? " " : ""), (prefix ? "#" : ""), (zerofill ? "0" : "")); if(fwidth > 0) - sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); if(prec > 0) - sprintf(format_templ+HDstrlen(format_templ), ".%d", prec); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), ".%d", prec); if(*modifier) - sprintf(format_templ+HDstrlen(format_templ), "%s", modifier); - sprintf (format_templ+HDstrlen(format_templ), "%c", conv); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%s", modifier); + HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%c", conv); /* Conversion */ @@ -325,31 +329,42 @@ HDfprintf(FILE *stream, const char *fmt, ...) haddr_t x = va_arg (ap, haddr_t); /*lint !e732 Loss of sign not really occuring */ if(H5F_addr_defined(x)) { - sprintf(format_templ, "%%%s%s%s%s%s", + len = 0; + len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", (leftjust ? "-" : ""), (plussign ? "+" : ""), (ldspace ? " " : ""), (prefix ? "#" : ""), (zerofill ? "0" : "")); if(fwidth > 0) - sprintf(format_templ + HDstrlen(format_templ), "%d", fwidth); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ - if(sizeof(x) == H5_SIZEOF_INT) - HDstrcat(format_templ, "u"); - else if(sizeof(x) == H5_SIZEOF_LONG) - HDstrcat(format_templ, "lu"); + if(sizeof(x) == H5_SIZEOF_INT) { + HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ + else if(sizeof(x) == H5_SIZEOF_LONG) { + HDstrncat(format_templ, "lu", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ else if(sizeof(x) == H5_SIZEOF_LONG_LONG) { - HDstrcat(format_templ, H5_PRINTF_LL_WIDTH); - HDstrcat(format_templ, "u"); + HDstrncat(format_templ, H5_PRINTF_LL_WIDTH, (sizeof(format_templ) - (size_t)(len + 1))); + len += (int)sizeof(H5_PRINTF_LL_WIDTH); + HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); + len++; } n = fprintf(stream, format_templ, x); } else { - HDstrcpy(format_templ, "%"); - if(leftjust) - HDstrcat(format_templ, "-"); + len = 0; + HDstrncpy(format_templ, "%", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + if(leftjust) { + HDstrncat(format_templ, "-", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ if(fwidth) - sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth); - HDstrcat(format_templ, "s"); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); + HDstrncat(format_templ, "s", (sizeof(format_templ) - (size_t)(len + 1))); fprintf(stream, format_templ, "UNDEF"); } } @@ -458,8 +473,9 @@ HDstrtoll(const char *s, const char **rest, int base) errno = 0; if (!s || (base && (base<2 || base>36))) { - if (rest) *rest = s; - return 0; + if (rest) + *rest = s; + return 0; } /* Skip white space */ @@ -467,21 +483,21 @@ HDstrtoll(const char *s, const char **rest, int base) /* Optional minus or plus sign */ if ('+'==*s) { - s++; + s++; } else if ('-'==*s) { - sign = -1; - s++; + sign = -1; + s++; } /* Zero base prefix */ if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) { - base = 16; - s += 2; + base = 16; + s += 2; } else if (0==base && '0'==*s) { - base = 8; - s++; + base = 8; + s++; } else if (0==base) { - base = 10; + base = 10; } /* Digits */ @@ -489,34 +505,39 @@ HDstrtoll(const char *s, const char **rest, int base) (base>10 && ((*s>='0' && *s<='9') || (*s>='a' && *s<'a'+base-10) || (*s>='A' && *s<'A'+base-10)))) { - if (!overflow) { - int64_t digit = 0; - if (*s>='0' && *s<='9') digit = *s - '0'; - else if (*s>='a' && *s<='z') digit = (*s-'a')+10; - else digit = (*s-'A')+10; - - if (acc*base+digit < acc) { - overflow = TRUE; - } else { - acc = acc*base + digit; - } - } - s++; + if (!overflow) { + int64_t digit = 0; + + if (*s>='0' && *s<='9') + digit = *s - '0'; + else if (*s>='a' && *s<='z') + digit = (*s-'a')+10; + else + digit = (*s-'A')+10; + + if (acc*base+digit < acc) { + overflow = TRUE; + } else { + acc = acc*base + digit; + } + } + s++; } /* Overflow */ if (overflow) { - if (sign>0) { - acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1; - } else { - acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1)); - } - errno = ERANGE; + if (sign>0) { + acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1; + } else { + acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1)); + } + errno = ERANGE; } /* Return values */ acc *= sign; - if (rest) *rest = s; + if (rest) + *rest = s; return acc; } /* end HDstrtoll() */ @@ -577,12 +598,13 @@ int HDremove_all(const char *fname) { int ret_value = -1; + size_t fname_len; char *_fname; - _fname = (char *)H5MM_malloc(HDstrlen(fname) + 3); /* to accomodate ;* and null */ + fname_len = HDstrlen(fname) + 3; /* to accomodate ";*" and null terminator */ + _fname = (char *)H5MM_malloc(fname_len); if(_fname) { - HDstrcpy(_fname, fname); - HDstrcat(_fname,";*"); + HDsnprintf(_fname, fname_len, "%s;*", fname); /* Do not use HDremove; function becomes recursive (see H5private.h file)*/ remove(_fname); H5MM_xfree(_fname); @@ -668,6 +690,30 @@ Wgetlogin() return NULL; } +int c99_snprintf(char* str, size_t size, const char* format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = c99_vsnprintf(str, size, format, ap); + va_end(ap); + + return count; +} + +int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) +{ + int count = -1; + + if (size != 0) + count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + #endif @@ -700,6 +746,10 @@ H5_build_extpath(const char *name, char **extpath/*out*/) FUNC_ENTER_NOAPI_NOINIT + /* Sanity check */ + HDassert(name); + HDassert(extpath); + /* Clear external path pointer to begin with */ *extpath = NULL; @@ -715,11 +765,13 @@ H5_build_extpath(const char *name, char **extpath/*out*/) } /* end if */ else { /* relative pathname */ char *retcwd; + size_t name_len; int drive; if(NULL == (cwdpath = (char *)H5MM_malloc(MAX_PATH_LEN))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") - if(NULL == (new_name = (char *)H5MM_strdup(name))) + name_len = HDstrlen(name) + 1; + if(NULL == (new_name = (char *)H5MM_malloc(name_len))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") /* @@ -731,7 +783,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) if(H5_CHECK_ABS_DRIVE(name)) { drive = name[0] - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); - HDstrcpy(new_name, &name[2]); + HDstrncpy(new_name, &name[2], name_len); } /* end if */ /* * Windows: name[0] is a '/' or '\' @@ -740,20 +792,24 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * OpenVMS: does not apply */ else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) { - sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]); + HDsnprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]); retcwd = cwdpath; - HDstrcpy(new_name, &name[1]); + HDstrncpy(new_name, &name[1], name_len); } /* totally relative for Unix, Windows, and OpenVMS: get current working directory */ - else + else { retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN); + HDstrncpy(new_name, name, name_len); + } /* end if */ if(retcwd != NULL) { size_t cwdlen; size_t path_len; + HDassert(cwdpath); cwdlen = HDstrlen(cwdpath); HDassert(cwdlen); + HDassert(new_name); path_len = cwdlen + HDstrlen(new_name) + 2; if(NULL == (full_path = (char *)H5MM_malloc(path_len))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") @@ -770,7 +826,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) char *tmp = new_name; full_path[cwdlen - 1] = '\0'; - HDstrcat(full_path, ++tmp); + HDstrncat(full_path, ++tmp, HDstrlen(tmp)); } /* end if */ else HDstrncat(full_path, new_name, HDstrlen(new_name)); @@ -795,9 +851,9 @@ H5_build_extpath(const char *name, char **extpath/*out*/) done: /* Release resources */ if(cwdpath) - H5MM_xfree(cwdpath); + H5MM_xfree(cwdpath); if(new_name) - H5MM_xfree(new_name); + H5MM_xfree(new_name); FUNC_LEAVE_NOAPI(ret_value) } /* H5_build_extpath() */ diff --git a/src/H5win32defs.h b/src/H5win32defs.h index e9b87625..d452925 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -29,6 +29,7 @@ typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; #define HDaccess(F,M) _access(F,M) +#define HDchdir(S) _chdir(S) #define HDclose(F) _close(F) #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) @@ -47,16 +48,15 @@ typedef __int64 h5_stat_size_t; */ #define HDopen(S,F,M) _open(S,F|_O_BINARY,M) #define HDread(F,M,Z) _read(F,M,Z) +#define HDrmdir(S) _rmdir(S) #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) #define HDsleep(S) Sleep(S*1000) #define HDstat(S,B) _stati64(S,B) #define HDstrcasecmp(A,B) _stricmp(A,B) #define HDstrtoull(S,R,N) _strtoui64(S,R,N) #define HDstrdup(S) _strdup(S) -#define HDsnprintf _snprintf /*varargs*/ #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) -#define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) #define HDwrite(F,M,Z) _write(F,M,Z) #ifdef H5_HAVE_VISUAL_STUDIO @@ -75,11 +75,15 @@ struct timezone { #endif /* __cplusplus */ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); H5_DLL char* Wgetlogin(); + H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); + H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); #ifdef __cplusplus } #endif /* __cplusplus */ #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) -#define HDgetlogin() Wgetlogin() +#define HDgetlogin() Wgetlogin() +#define HDsnprintf c99_snprintf /*varargs*/ +#define HDvsnprintf c99_vsnprintf #endif /* H5_HAVE_VISUAL_STUDIO */ diff --git a/src/Makefile.in b/src/Makefile.in index ae0d0ff..05e0476 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,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 = 146 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/test/cache.c b/test/cache.c index ba51a38..5ad1314 100644 --- a/test/cache.c +++ b/test/cache.c @@ -994,7 +994,7 @@ smoke_check_5(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1004,24 +1004,24 @@ smoke_check_5(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1029,7 +1029,7 @@ smoke_check_5(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.5 + /* double empty_reserve = */ 0.5f }; TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1"); @@ -1230,7 +1230,7 @@ smoke_check_6(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1240,24 +1240,24 @@ smoke_check_6(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1265,7 +1265,7 @@ smoke_check_6(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1"); @@ -1463,7 +1463,7 @@ smoke_check_7(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1473,25 +1473,25 @@ smoke_check_7(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (8 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1499,7 +1499,7 @@ smoke_check_7(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1 + /* double empty_reserve = */ 0.1f }; TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2"); @@ -1697,7 +1697,7 @@ smoke_check_8(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1707,25 +1707,25 @@ smoke_check_8(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1733,7 +1733,7 @@ smoke_check_8(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1 + /* double empty_reserve = */ 0.1f }; TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2"); @@ -13944,7 +13944,9 @@ check_multiple_read_protect(void) { const char * fcn_name = "check_multiple_read_protect()"; H5F_t * file_ptr = NULL; +#if H5C_COLLECT_CACHE_STATS H5C_t * cache_ptr = NULL; +#endif /* H5C_COLLECT_CACHE_STATS */ test_entry_t * entry_ptr; TESTING("multiple read only protects on a single entry"); @@ -13978,7 +13980,9 @@ check_multiple_read_protect(void) file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); +#if H5C_COLLECT_CACHE_STATS cache_ptr = file_ptr->shared->cache; +#endif /* H5C_COLLECT_CACHE_STATS */ entry_ptr = &((entries[0])[0]); @@ -18037,7 +18041,7 @@ check_auto_cache_resize(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -18047,24 +18051,24 @@ check_auto_cache_resize(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -18072,7 +18076,7 @@ check_auto_cache_resize(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resizing"); @@ -18423,7 +18427,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1000 * 1000 + 10; - auto_size_ctl.min_clean_fraction = 0.1; + auto_size_ctl.min_clean_fraction = 0.1f; auto_size_ctl.max_size = 8 * 1000 * 1000; auto_size_ctl.min_size = 500 * 1000; @@ -18433,22 +18437,22 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1000 * 1000); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1000); @@ -18456,7 +18460,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -18766,7 +18770,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -18776,22 +18780,22 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 4.0; + auto_size_ctl.increment = 4.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.25; + auto_size_ctl.decrement = 0.25f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -18799,7 +18803,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -18953,7 +18957,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -18963,23 +18967,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -18987,7 +18991,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -19368,7 +19372,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -19378,23 +19382,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -19402,7 +19406,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -19896,7 +19900,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -19906,23 +19910,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -19930,7 +19934,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -20312,7 +20316,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -20322,23 +20326,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -20346,7 +20350,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -20575,7 +20579,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1000 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1000 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -20585,23 +20589,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1024); @@ -20609,7 +20613,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -21157,7 +21161,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 64 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 1024 * 1024; auto_size_ctl.min_size = 5 * 1024; @@ -21167,23 +21171,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (32 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - auto_size_ctl.flash_multiple = 1.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 1.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1024); @@ -21191,7 +21195,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -21962,7 +21966,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 20 * 1024; auto_size_ctl.min_size = 4 * 1024; @@ -21972,23 +21976,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.4; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.4f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (2 * 1024); @@ -21996,7 +22000,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22242,7 +22246,7 @@ check_auto_cache_resize_disable(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -22252,24 +22256,24 @@ check_auto_cache_resize_disable(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.0, - /* double flash_threshold = */ 0.25, + /* double flash_multiple = */ 1.0f, + /* double flash_threshold = */ 0.25f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -22277,7 +22281,7 @@ check_auto_cache_resize_disable(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resize disable"); @@ -22349,7 +22353,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22359,23 +22363,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increases */ + auto_size_ctl.increment = 1.0f; /* disable size increases */ auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22383,7 +22387,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22507,7 +22511,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22517,22 +22521,22 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increases */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.upper_hr_threshold = 0.995f; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22540,7 +22544,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22664,7 +22668,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22674,23 +22678,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22698,7 +22702,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22821,7 +22825,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22831,23 +22835,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decreases */ + auto_size_ctl.decrement = 1.0f; /* disable size decreases */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22855,7 +22859,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22978,7 +22982,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22988,23 +22992,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decreases */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23012,7 +23016,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23134,7 +23138,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23144,23 +23148,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23168,7 +23172,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23292,7 +23296,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23302,23 +23306,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = 0; /* disable decrement */ @@ -23326,7 +23330,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23518,7 +23522,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23528,23 +23532,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23552,7 +23556,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 1.0; /* disable decrement */ + auto_size_ctl.empty_reserve = 1.0f; /* disable decrement */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23751,7 +23755,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23761,23 +23765,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 1.0; + auto_size_ctl.upper_hr_threshold = 1.0f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23785,7 +23789,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23988,7 +23992,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 2 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23998,23 +24002,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increases */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decreases */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24022,7 +24026,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24115,7 +24119,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.25; + auto_size_ctl.min_clean_fraction = 0.25f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24125,23 +24129,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increment */ + auto_size_ctl.increment = 1.0f; /* disable size increment */ auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decrement */ + auto_size_ctl.decrement = 1.0f; /* disable size decrement */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24149,7 +24153,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24242,7 +24246,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = FALSE; auto_size_ctl.initial_size = 2 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 6 * 1024 * 1024; /* no resize */ auto_size_ctl.min_size = 6 * 1024 * 1024; /* no resize */ @@ -24252,23 +24256,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24276,7 +24280,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24369,7 +24373,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.25; + auto_size_ctl.min_clean_fraction = 0.25f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24379,23 +24383,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increment */ + auto_size_ctl.increment = 1.0f; /* disable size increment */ auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decrement */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decrement */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24403,7 +24407,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24496,7 +24500,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24506,23 +24510,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increment */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increment */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decrement */ + auto_size_ctl.decrement = 1.0f; /* disable size decrement */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24530,7 +24534,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24624,7 +24628,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24634,23 +24638,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24658,7 +24662,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24780,7 +24784,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 64 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 256 * 1024; auto_size_ctl.min_size = 32 * 1024; @@ -24790,23 +24794,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 1.0; - auto_size_ctl.flash_threshold = 0.25; + auto_size_ctl.flash_multiple = 1.0f; + auto_size_ctl.flash_threshold = 0.25f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024); @@ -24814,7 +24818,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24966,7 +24970,7 @@ check_auto_cache_resize_epoch_markers(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -24976,24 +24980,24 @@ check_auto_cache_resize_epoch_markers(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -25001,7 +25005,7 @@ check_auto_cache_resize_epoch_markers(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resize epoch marker management"); @@ -25054,7 +25058,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25064,23 +25068,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25088,7 +25092,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25228,7 +25232,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25238,23 +25242,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25262,7 +25266,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25349,7 +25353,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25359,23 +25363,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25383,7 +25387,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25428,7 +25432,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25438,23 +25442,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25462,7 +25466,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25541,7 +25545,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25551,23 +25555,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25575,7 +25579,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25672,7 +25676,7 @@ check_auto_cache_resize_input_errs(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -25682,24 +25686,24 @@ check_auto_cache_resize_input_errs(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -25707,7 +25711,7 @@ check_auto_cache_resize_input_errs(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; H5C_auto_size_ctl_t invalid_auto_size_ctl; @@ -25779,7 +25783,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25789,23 +25793,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25813,7 +25817,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl); @@ -25854,7 +25858,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25864,23 +25868,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25888,7 +25892,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -25930,7 +25934,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.initial_size = 16 * 1024 * 1024 + 1; /* INVALID */ - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25940,23 +25944,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25964,7 +25968,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26003,7 +26007,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.initial_size = 1 * 1024 * 1024 - 1; /* INVALID */ - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26013,23 +26017,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26037,7 +26041,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26078,7 +26082,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 1.00001; /* INVALID */ + invalid_auto_size_ctl.min_clean_fraction = 1.00001f; /* INVALID */ invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26088,23 +26092,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26112,7 +26116,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26150,7 +26154,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = -0.00001; /* INVALID */ + invalid_auto_size_ctl.min_clean_fraction = -0.00001f; /* INVALID */ invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26160,23 +26164,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26184,7 +26188,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26225,7 +26229,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = H5C__MAX_MAX_CACHE_SIZE + 1; /* INVALID */ @@ -26236,23 +26240,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26260,7 +26264,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26298,7 +26302,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 1 * 1024 * 1024;/* INVALID */ invalid_auto_size_ctl.min_size = 1 * 1024 * 1024 + 1;/*PAIR */ @@ -26308,23 +26312,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26332,7 +26336,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26370,7 +26374,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = H5C__MIN_MAX_CACHE_SIZE - 1; @@ -26380,23 +26384,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26404,7 +26408,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26445,7 +26449,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26455,23 +26459,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26479,7 +26483,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26517,7 +26521,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26527,23 +26531,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26551,7 +26555,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26592,7 +26596,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26603,23 +26607,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = (enum H5C_cache_incr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26627,7 +26631,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26665,7 +26669,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26676,23 +26680,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = (enum H5C_cache_incr_mode) 2; /* INVALID */ - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26700,7 +26704,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26741,7 +26745,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26751,23 +26755,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 1.01; /* INVALID */ + invalid_auto_size_ctl.upper_hr_threshold = 1.01f; /* INVALID */ - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26775,7 +26779,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26813,7 +26817,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26823,23 +26827,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.8; /* INVALID */ + invalid_auto_size_ctl.lower_hr_threshold = 0.8f; /* INVALID */ - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.7; /* INVALID */ + invalid_auto_size_ctl.upper_hr_threshold = 0.7f; /* INVALID */ - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26847,7 +26851,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26885,7 +26889,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26895,23 +26899,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = -0.0001; /* INVALID */ + invalid_auto_size_ctl.lower_hr_threshold = -0.0001f; /* INVALID */ - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26919,7 +26923,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26960,7 +26964,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26970,23 +26974,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 0.99999; /* INVALID */ + invalid_auto_size_ctl.increment = 0.99999f; /* INVALID */ invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26994,7 +26998,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27035,7 +27039,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27045,24 +27049,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = (enum H5C_cache_flash_incr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27070,7 +27074,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27110,7 +27114,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27120,24 +27124,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 0.09; /* INVALID */ - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 0.09f; /* INVALID */ + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27145,7 +27149,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27183,7 +27187,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27193,24 +27197,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 10.01; /* INVALID */ - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 10.01f; /* INVALID */ + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27218,7 +27222,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27258,7 +27262,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27268,24 +27272,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 1.0; - invalid_auto_size_ctl.flash_threshold = 0.09; /* INVALID */ + invalid_auto_size_ctl.flash_multiple = 1.0f; + invalid_auto_size_ctl.flash_threshold = 0.09f; /* INVALID */ invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27293,7 +27297,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27331,7 +27335,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27341,24 +27345,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 1.0; - invalid_auto_size_ctl.flash_threshold = 1.001; /* INVALID */ + invalid_auto_size_ctl.flash_multiple = 1.0f; + invalid_auto_size_ctl.flash_threshold = 1.001f; /* INVALID */ invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27366,7 +27370,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27407,7 +27411,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27417,24 +27421,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = (enum H5C_cache_decr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27442,7 +27446,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27480,7 +27484,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27490,24 +27494,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = (enum H5C_cache_decr_mode) 4; /* INVALID */ - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27515,7 +27519,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27556,7 +27560,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27566,23 +27570,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 1.000001; /* INVALID */ + invalid_auto_size_ctl.decrement = 1.000001f; /* INVALID */ invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27590,7 +27594,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27628,7 +27632,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27638,23 +27642,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = -0.000001; /* INVALID */ + invalid_auto_size_ctl.decrement = -0.000001f; /* INVALID */ invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27662,7 +27666,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27703,7 +27707,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27713,23 +27717,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27737,7 +27741,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 0; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27774,7 +27778,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27784,23 +27788,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27809,7 +27813,7 @@ check_auto_cache_resize_input_errs(void) H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27849,7 +27853,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27859,23 +27863,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27883,7 +27887,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */ + invalid_auto_size_ctl.empty_reserve = -0.0000001f; /* INVALID */ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27920,7 +27924,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27930,23 +27934,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27955,7 +27959,7 @@ check_auto_cache_resize_input_errs(void) H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -28089,7 +28093,7 @@ check_auto_cache_resize_aux_fcns(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (16 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -28099,24 +28103,24 @@ check_auto_cache_resize_aux_fcns(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -28124,7 +28128,7 @@ check_auto_cache_resize_aux_fcns(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.5 + /* double empty_reserve = */ 0.5f }; @@ -28266,7 +28270,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5f, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = diff --git a/test/cache_common.h b/test/cache_common.h index d7e7f1a..1165de4 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -482,7 +482,7 @@ if ( ( (cache_ptr) == NULL ) || \ } /* Epsilon for floating-point comparisons */ -#define FP_EPSILON 0.000001 +#define FP_EPSILON 0.000001f /* misc type definitions */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 9879887..9f003a6 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -3455,6 +3455,8 @@ done: HDexit(MIN((int)fails_all_tests, 254)); else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL) HDexit(0); + HDassert(0 && "Should not reach this point!"); + return 1; #else reset_hdf5(); @@ -3476,6 +3478,8 @@ error: HDexit(MIN(MAX((int)fails_all_tests, 1), 254)); else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL) HDexit(1); + HDassert(0 && "Should not reach this point!"); + return 1; #else reset_hdf5(); if(run_test==TEST_NOOP || run_test==TEST_NORMAL) @@ -7375,7 +7375,7 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl) char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ H5FD_mem_t type, stype; - haddr_t addr1, addr2, addr3, saddr1, saddr2; + haddr_t addr1, addr3, saddr1, saddr2; hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("Allocation from raw or metadata free-space manager"); @@ -7399,7 +7399,7 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl) addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30); /* Allocate the second block of type H5FD_MEM_SUPER */ - addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50); + H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50); /* Allocate the first block of type H5FD_MEM_DRAW */ stype = H5FD_MEM_DRAW; diff --git a/test/objcopy.c b/test/objcopy.c index d7da8f3..1377b96 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -9588,9 +9588,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds hid_t sid = -1; /* Dataspace ID */ hid_t aid = -1; /* Attribute ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - int i; /* Local index variable */ hsize_t dim1d[1]; /* dimension sizes */ - int buf[DIM_SIZE_1]; /* Buffer for data */ H5O_info_t oinfo; /* Object info */ haddr_t exp_addr; /* Expected object addresses */ char src_filename[NAME_BUF_SIZE]; /* Source file name */ @@ -9601,10 +9599,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds else TESTING("H5Ocopy(): merging various committed datatypes") - /* set initial data values */ - for (i=0; i<DIM_SIZE_1; i++) - buf[i] = i; - /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); @@ -9821,8 +9815,6 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - unsigned int i; /* Local index variables */ - int buf[DIM_SIZE_1]; /* Buffer for writing data */ H5O_info_t oinfo; /* Object info */ haddr_t exp_addr; /* Expected object address */ char src_filename[NAME_BUF_SIZE]; @@ -9833,10 +9825,6 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, else TESTING("H5Ocopy(): merging committed datatypes with suggestions") - /* set initial data values */ - for(i = 0; i < DIM_SIZE_1; i++) - buf[i] = (int)i; - /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); @@ -10345,9 +10333,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t tid_short = -1; /* Datatype ID */ hid_t exp_tid = -1; /* Expected datatype ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - unsigned int i; /* Local index variables */ hsize_t dim1d[1]; /* Dataset dimensions */ - int buf[DIM_SIZE_1]; /* Buffer for writing data */ char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; @@ -10356,10 +10342,6 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, else TESTING("H5Ocopy(): merging different committed datatypes with suggestions") - /* set initial data values */ - for(i = 0; i < DIM_SIZE_1; i++) - buf[i] = (int)i; - /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); diff --git a/test/tarray.c b/test/tarray.c index f191c95..299c74e 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1792,17 +1792,6 @@ test_array_bkg(void) static void test_compat(void) { - typedef struct { /* Typedef for compound datatype */ - short i; - float f; - long l; - } s2_t; - typedef struct { /* Typedef for compound datatype */ - short i; - float f[ARRAY1_DIM1]; - long l[ARRAY1_DIM1]; - double d; - } s3_t; const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ diff --git a/test/trefer.c b/test/trefer.c index 53f7b92..9031fdb 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -514,7 +514,7 @@ test_reference_region(void) hsize_t high[SPACE2_RANK]; /* Selection bounds */ hdset_reg_ref_t *wbuf, /* buffer to write to disk */ *rbuf; /* buffer read from disk */ - hdset_reg_ref_t nvrbuf[3]={0,101,1000000000}; /* buffer with non-valid refs */ + hdset_reg_ref_t nvrbuf[3]={{0},{101},{1000000000}}; /* buffer with non-valid refs */ uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ *drbuf; /* Buffer for reading numeric data from disk */ uint8_t *tu8; /* Temporary pointer to uint8 data */ diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index f55afdc..20f4f90 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -201,8 +201,6 @@ void *tts_error_thread(void UNUSED *arg) static herr_t error_callback(hid_t estack_id, void *client_data) { - int ret; - H5TS_mutex_lock_simple(&error_mutex); error_count++; H5TS_mutex_unlock_simple(&error_mutex); diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index 3fb5701..b5965ba 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/h5copy/h5copy.c @@ -157,35 +157,35 @@ usage: h5copy [OPTIONS] [OBJECTS...]\n\ */ -static int parse_flag(const char* str_flag, unsigned *flag) +static int parse_flag(const char* s_flag, unsigned *flag) { unsigned fla=0; - if (HDstrcmp(str_flag,"shallow")==0) + if (HDstrcmp(s_flag,"shallow")==0) { fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG; } - else if (HDstrcmp(str_flag,"soft")==0) + else if (HDstrcmp(s_flag,"soft")==0) { fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG; } - else if (HDstrcmp(str_flag,"ext")==0) + else if (HDstrcmp(s_flag,"ext")==0) { fla = H5O_COPY_EXPAND_EXT_LINK_FLAG; } - else if (HDstrcmp(str_flag,"ref")==0) + else if (HDstrcmp(s_flag,"ref")==0) { fla = H5O_COPY_EXPAND_REFERENCE_FLAG; } - else if (HDstrcmp(str_flag,"noattr")==0) + else if (HDstrcmp(s_flag,"noattr")==0) { fla = H5O_COPY_WITHOUT_ATTR_FLAG; } - else if (HDstrcmp(str_flag,"allflags")==0) + else if (HDstrcmp(s_flag,"allflags")==0) { fla = H5O_COPY_ALL; } - else if (HDstrcmp(str_flag,"nullmsg")==0) + else if (HDstrcmp(s_flag,"nullmsg")==0) { fla = H5O_COPY_PRESERVE_NULL_FLAG; } diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am index 190c083..05417f5 100644 --- a/tools/h5diff/Makefile.am +++ b/tools/h5diff/Makefile.am @@ -43,7 +43,7 @@ TEST_SCRIPT=testh5diff.sh check_PROGRAMS=$(TEST_PROG) check_SCRIPTS=$(TEST_SCRIPT) $(TEST_SCRIPT_PARA) # The parallel test script testph5diff.sh actually depends on testh5diff.sh. -SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh +SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh # Source files for the program h5diff_SOURCES=h5diff_main.c h5diff_common.c diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 5567ceb..9b46f4e 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -456,7 +456,7 @@ TEST_PROG = h5diffgentest TEST_SCRIPT = testh5diff.sh check_SCRIPTS = $(TEST_SCRIPT) $(TEST_SCRIPT_PARA) # The parallel test script testph5diff.sh actually depends on testh5diff.sh. -SCRIPT_DEPEND = h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh +SCRIPT_DEPEND = h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh # Source files for the program h5diff_SOURCES = h5diff_main.c h5diff_common.c diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 7c69154..d8b3b34 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -560,8 +560,8 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) int data4[3][2] = {{0,0},{0,0},{0,0}}; int data5[2][2] = {{0,0},{0,0}}; unsigned int data6[3][2] = {{0,0},{0,0},{0,0}}; - cmp1_t data7[1] = {1,2}; - cmp2_t data8[1] = {1,2}; + cmp1_t data7[1] = {{1,2}}; + cmp2_t data8[1] = {{1,2}}; hsize_t dims3[2] = { 2,2 }; hsize_t dims4[1] = { 1 }; size_t type_size; @@ -3664,9 +3664,6 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int }; hsize_t dims_fixlen_str_array[] = {FIXLEN_STR_ARRY_DIM}; - /* objref */ - hsize_t objref_dims[1]={1}; - /*------------------------------------------ * compound dataset *------------------------------------------*/ @@ -4261,15 +4258,39 @@ test_enums(const char *fname) tid = H5Tenum_create(H5T_NATIVE_INT); enum_val = 0; status = H5Tenum_insert(tid, "YIN", &enum_val); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + status = FAIL; + goto out; + } enum_val = 1; status = H5Tenum_insert(tid, "YANG", &enum_val); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + status = FAIL; + goto out; + } /*----------------------------------------------------------------------- * Create datasets containing enum data. *---------------------------------------------------------------------*/ status = write_dset(fid, 1, &dims, "dset1", tid, data1); + if (status < 0) + { + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); + status = FAIL; + goto out; + } status = write_dset(fid, 1, &dims, "dset2", tid, data2); + if (status < 0) + { + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); + status = FAIL; + goto out; + } out: /*----------------------------------------------------------------------- @@ -4849,7 +4870,7 @@ static void test_data_nocomparables (const char * fname, int make_diffs) int data1[DIM_ARRY] = {0,0,0}; int data2[DIM_ARRY] = {1,1,1}; int data3[DIM_ARRY+1] = {1,1,1,1}; - int data1_dim2[DIM_ARRY][1] = {0,0,0}; + int data1_dim2[DIM_ARRY][1] = {{0,0,0}}; int rank_attr; char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"}; herr_t status = SUCCEED; diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 8d15e2b..df9cc5f 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -58,6 +58,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl @@ -752,6 +754,39 @@ IF (BUILD_TESTING) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_TEST file) + MACRO (ADD_H5_TEST_N resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-N-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-N-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}-N.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_N file) + MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) @@ -1087,6 +1122,10 @@ IF (BUILD_TESTING) tall-6.txt tall-6.out tall-6.out.err + tall-7.out + tall-7.out.err + tall-7N.out + tall-7N.out.err tallfilters.out tallfilters.out.err tarray1.out @@ -1415,6 +1454,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) # test for displaying the selected attributes of string type and scalar space ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) + ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5) # test for header and error messages ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) # test for displaying attributes in shared datatype (also in group and dataset) @@ -1427,6 +1467,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5) # test for displaying the selected link ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5) + ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5) ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5) # test for displaying dangling soft links ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) @@ -1436,12 +1477,15 @@ IF (BUILD_TESTING) ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5) ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5) ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5) + ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5) ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5) + ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5) # tests for compound data types ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5) # test for named data types ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) + ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5) # test for unamed type ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") # test complicated compound datatype @@ -1455,6 +1499,9 @@ IF (BUILD_TESTING) ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5) ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5) + ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5) # test for loop detection ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 9b304bd..ea38c61 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -71,7 +71,7 @@ struct handler_t { */ /* The following initialization makes use of C language cancatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*"; +static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*N:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "hel", no_arg, 'h' }, @@ -188,6 +188,7 @@ static struct long_options l_opts[] = { { "packed-bits", require_arg, 'M' }, { "no-compact-subset", no_arg, 'C' }, { "ddl", optional_arg, 'O' }, + { "any_path", require_arg, 'N' }, { NULL, 0, '\0' } }; @@ -230,57 +231,63 @@ usage(const char *prog) PRINTSTREAM(rawoutstream, "usage: %s [OPTIONS] files\n", prog); PRINTVALSTREAM(rawoutstream, " OPTIONS\n"); PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n"); + PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); + PRINTVALSTREAM(rawoutstream, "--------------- File Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -n, --contents Print a list of the file contents and exit\n"); PRINTVALSTREAM(rawoutstream, " Optional value 1 also prints attributes.\n"); PRINTVALSTREAM(rawoutstream, " -B, --superblock Print the content of the super block\n"); PRINTVALSTREAM(rawoutstream, " -H, --header Print the header only; no data is displayed\n"); - PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); - PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n"); - PRINTVALSTREAM(rawoutstream, " -i, --object-ids Print the object ids\n"); - PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); - PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); - PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); + PRINTVALSTREAM(rawoutstream, " -f D, --filedriver=D Specify which driver to open the file with\n"); + PRINTVALSTREAM(rawoutstream, " -o F, --output=F Output raw data into file F\n"); + PRINTVALSTREAM(rawoutstream, " -b B, --binary=B Binary file output, of form B\n"); + PRINTVALSTREAM(rawoutstream, " -O F, --ddl=F Output ddl text into file F\n"); + PRINTVALSTREAM(rawoutstream, " Do not use filename F to suppress ddl display\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Object Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -a P, --attribute=P Print the specified attribute\n"); PRINTVALSTREAM(rawoutstream, " If an attribute name contains a slash (/), escape the\n"); PRINTVALSTREAM(rawoutstream, " slash with a preceding backslash (\\).\n"); PRINTVALSTREAM(rawoutstream, " (See example section below.)\n"); PRINTVALSTREAM(rawoutstream, " -d P, --dataset=P Print the specified dataset\n"); - PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); - PRINTVALSTREAM(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n"); - PRINTVALSTREAM(rawoutstream, " -f D, --filedriver=D Specify which driver to open the file with\n"); PRINTVALSTREAM(rawoutstream, " -g P, --group=P Print the specified group and all members\n"); PRINTVALSTREAM(rawoutstream, " -l P, --soft-link=P Print the value(s) of the specified soft link\n"); - PRINTVALSTREAM(rawoutstream, " -o F, --output=F Output raw data into file F\n"); - PRINTVALSTREAM(rawoutstream, " -b B, --binary=B Binary file output, of form B\n"); PRINTVALSTREAM(rawoutstream, " -t P, --datatype=P Print the specified named datatype\n"); - PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); - PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); - PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); + PRINTVALSTREAM(rawoutstream, " -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P\n"); + PRINTVALSTREAM(rawoutstream, " P can be the absolute path or just a relative path.\n"); + PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); + PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Object Property Options ---------------\n"); + PRINTVALSTREAM(rawoutstream, " -i, --object-ids Print the object ids\n"); + PRINTVALSTREAM(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n"); + PRINTVALSTREAM(rawoutstream, " -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n"); + PRINTVALSTREAM(rawoutstream, " format L for an integer dataset specified with\n"); + PRINTVALSTREAM(rawoutstream, " option -d. L is a list of offset,length values,\n"); + PRINTVALSTREAM(rawoutstream, " separated by commas. Offset is the beginning bit in\n"); + PRINTVALSTREAM(rawoutstream, " the data value and length is the number of bits of\n"); + PRINTVALSTREAM(rawoutstream, " the mask.\n"); + PRINTVALSTREAM(rawoutstream, " -R, --region Print dataset pointed by region references\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Formatting Options ---------------\n"); + PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); + PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); + PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); - PRINTVALSTREAM(rawoutstream, - " -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n" - " format L for an integer dataset specified with\n" - " option -d. L is a list of offset,length values,\n" - " separated by commas. Offset is the beginning bit in\n" - " the data value and length is the number of bits of\n" - " the mask.\n" - ); - PRINTVALSTREAM(rawoutstream, " -R, --region Print dataset pointed by region references\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); + PRINTVALSTREAM(rawoutstream, " occur.\n"); + PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); + PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); + PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); + PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); + PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); + PRINTVALSTREAM(rawoutstream, "--------------- XML Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -x, --xml Output in XML using Schema\n"); PRINTVALSTREAM(rawoutstream, " -u, --use-dtd Output in XML using DTD\n"); PRINTVALSTREAM(rawoutstream, " -D U, --xml-dtd=U Use the DTD or schema at U\n"); PRINTVALSTREAM(rawoutstream, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n"); PRINTVALSTREAM(rawoutstream, " \":\": no namespace, default: \"hdf5:\"\n"); PRINTVALSTREAM(rawoutstream, " E.g., to dump a file called `-f', use h5dump -- -f\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); - PRINTVALSTREAM(rawoutstream, " occur.\n"); - PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); - PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); - PRINTVALSTREAM(rawoutstream, " -O F, --ddl=F Output ddl text into file F\n"); - PRINTVALSTREAM(rawoutstream, " Do not use filename F to suppress ddl display\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Subsetting Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the following options with a dataset\n"); PRINTVALSTREAM(rawoutstream, " attribute. Subsetting is done by selecting a hyperslab from the data.\n"); PRINTVALSTREAM(rawoutstream, " Thus, the options mirror those for performing a hyperslab selection.\n"); @@ -296,20 +303,13 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " number of dimensions in the dataspace being queried\n"); PRINTVALSTREAM(rawoutstream, " (Alternate compact form of subsetting is described in the Reference Manual)\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Option Argument Conventions ---------------\n"); PRINTVALSTREAM(rawoutstream, " D - is the file driver to use in opening the file. Acceptable values\n"); PRINTVALSTREAM(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n"); PRINTVALSTREAM(rawoutstream, " the file driver flag, the file will be opened with each driver in\n"); PRINTVALSTREAM(rawoutstream, " turn and in the order specified above until one driver succeeds\n"); PRINTVALSTREAM(rawoutstream, " in opening the file.\n"); - PRINTVALSTREAM(rawoutstream, " These are the letters that are appended to the file name(without .h5) when opening\n"); - PRINTVALSTREAM(rawoutstream, " names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are:\n"); - PRINTVALSTREAM(rawoutstream, " m: All meta data when using the split driver.\n"); - PRINTVALSTREAM(rawoutstream, " s: The userblock, superblock, and driver info block\n"); - PRINTVALSTREAM(rawoutstream, " b: B-tree nodes\n"); - PRINTVALSTREAM(rawoutstream, " r: Dataset raw data\n"); - PRINTVALSTREAM(rawoutstream, " g: Global heap\n"); - PRINTVALSTREAM(rawoutstream, " l: local heap (object names)\n"); - PRINTVALSTREAM(rawoutstream, " o: object headers\n"); + PRINTVALSTREAM(rawoutstream, " See examples below for family, split, and multi driver special file name usage.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " F - is a filename.\n"); PRINTVALSTREAM(rawoutstream, " P - is the full path from the root group to the object.\n"); @@ -324,7 +324,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " Q - is the sort index type. It can be \"creation_order\" or \"name\" (default)\n"); PRINTVALSTREAM(rawoutstream, " Z - is the sort order type. It can be \"descending\" or \"ascending\" (default)\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " Examples:\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Examples ---------------\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " 1) Attribute foo of the group /bar_none in file quux.h5\n"); PRINTVALSTREAM(rawoutstream, "\n"); @@ -355,6 +355,14 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f split splitfile\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f multi mf\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f family fam%%05d.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); } @@ -481,172 +489,6 @@ table_list_free(void) } /* end table_list_free() */ /*------------------------------------------------------------------------- - * Function: set_data_output_file - * - * Purpose: Open fname as the output file for dataset raw data. - * Set rawdatastream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - * Programmer: Albert Cheng, 2000/09/30 - * - * Modifications: - * pvn June, 1, 2006. Add a switch for binary output - * - *------------------------------------------------------------------------- - */ -static int -set_data_output_file(const char *fname, int is_bin) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawdatastream is changed only when succeeded */ - - if (rawdatastream && rawdatastream != stdout) { - if (HDfclose(rawdatastream)) - HDperror("closing rawdatastream"); - else - rawdatastream = NULL; - } - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - /* binary output */ - if (is_bin) { - if ((f = HDfopen(fname, "wb")) != NULL) { - rawdatastream = f; - retvalue = SUCCEED; - } - } - else { - if ((f = HDfopen(fname, "w")) != NULL) { - rawdatastream = f; - retvalue = SUCCEED; - } - } - } - else { - rawdatastream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_attr_output_file - * - * Purpose: Open fname as the output file for attribute raw data. - * Set rawattrstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_attr_output_file(const char *fname, int is_bin) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawattrstream is changed only when succeeded */ - - if (rawattrstream && rawattrstream != stdout) { - if (HDfclose(rawattrstream)) - HDperror("closing rawattrstream"); - else - rawattrstream = NULL; - } - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawattrstream = f; - retvalue = SUCCEED; - } - } - else { - rawattrstream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_output_file - * - * Purpose: Open fname as the output file for raw output. - * Set rawoutstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_output_file(const char *fname) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawoutstream is changed only when succeeded */ - - if (rawoutstream && rawoutstream != stdout) { - if (HDfclose(rawoutstream)) - HDperror("closing rawoutstream"); - else - rawoutstream = NULL; - } - /* First check if filename is string "NULL" */ - if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawoutstream = f; - retvalue = SUCCEED; - } - } - else { - rawoutstream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_error_file - * - * Purpose: Open fname as the error output file for dataset raw error. - * Set rawerrorstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_error_file(const char *fname) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawerrorstream is changed only when succeeded */ - - if (rawerrorstream && rawerrorstream != stderr) { - if (HDfclose(rawerrorstream)) - HDperror("closing rawerrorstream"); - else - rawerrorstream = NULL; - } - - if ((f = HDfopen(fname, "w")) != NULL) { - rawerrorstream = f; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- * Function: set_binary_form * * Purpose: set the binary form of output by translating from a string input @@ -1119,6 +961,18 @@ parse_start: } last_was_dset = FALSE; break; + case 'N': + display_all = 0; + + for (i = 0; i < argc; i++) + if (!hand[i].func) { + hand[i].func = handle_paths; + hand[i].obj = HDstrdup(opt_arg); + break; + } + + last_was_dset = FALSE; + break; case 'a': display_all = 0; @@ -1186,7 +1040,7 @@ parse_start: break; case 'O': - if (set_output_file(opt_arg) < 0) { + if (h5tools_set_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } @@ -1194,20 +1048,20 @@ parse_start: case 'o': if ( bin_output ) { - if (set_data_output_file(opt_arg, 1) < 0) { + if (h5tools_set_data_output_file(opt_arg, 1) < 0) { usage(h5tools_getprogname()); goto error; } } else { if(display_attr_data && !display_data) { - if (set_attr_output_file(opt_arg, 0) < 0) { + if (h5tools_set_attr_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } } if(display_data || display_all) { - if (set_data_output_file(opt_arg, 0) < 0) { + if (h5tools_set_data_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } @@ -1229,7 +1083,7 @@ parse_start: } bin_output = TRUE; if (outfname!=NULL) { - if (set_data_output_file(outfname, 1) < 0) { + if (h5tools_set_data_output_file(outfname, 1) < 0) { /* failed to set output file */ usage(h5tools_getprogname()); goto error; diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index a9a23a5..ec93778 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -24,6 +24,20 @@ #include "h5dump_extern.h" #include "h5dump_ddl.h" +typedef struct { + hid_t fid; /* File ID being traversed */ + char *op_name; /* Object name wanted */ +} trav_handle_udata_t; + +typedef struct { + char *path; /* Path of object being searched */ + char *op_name; /* Object name wanted */ +} trav_attr_udata_t; + +/* callback function used by H5Literate() */ +static herr_t dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void *op_data); +static int dump_extlink(hid_t group, const char *linkname, const char *objname); + /*------------------------------------------------------------------------- * Function: dump_datatype * @@ -145,6 +159,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo return ret; } + /*------------------------------------------------------------------------- * Function: dump_all_cb * @@ -166,7 +181,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo * *------------------------------------------------------------------------- */ -herr_t +static herr_t dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED *op_data) { hid_t obj; @@ -1179,9 +1194,9 @@ dump_fcpl(hid_t fid) indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s %u\n","OBJECTHEADER_VERSION", finfo.sohm.version); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream,"%s %Hd\n","OFFSET_SIZE", (long long)off_size); + PRINTSTREAM(rawoutstream,"%s %zu\n","OFFSET_SIZE", off_size); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream,"%s %Hd\n","LENGTH_SIZE", (long long)len_size); + PRINTSTREAM(rawoutstream,"%s %zu\n","LENGTH_SIZE", len_size); indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s %u\n","BTREE_RANK", sym_ik); indentation(dump_indent + COL); @@ -1288,6 +1303,200 @@ dump_fcontents(hid_t fid) PRINTSTREAM(rawoutstream, " %s\n",END); } +static herr_t +attr_search(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *_op_data) +{ + herr_t ret = SUCCEED; + int i; + int j; + int k; + char *obj_op_name; + char *obj_name; + trav_attr_udata_t *attr_data = (trav_attr_udata_t*)_op_data; + char *buf = attr_data->path; + char *op_name = attr_data->op_name; + + j = (int)HDstrlen(op_name) - 1; + /* find the last / */ + while(j >= 0) { + if (op_name[j] == '/' && (j==0 || (j>0 && op_name[j-1]!='\\'))) + break; + j--; + } + + obj_op_name = h5tools_str_replace(op_name + j + 1, "\\/", "/"); + + if(obj_op_name == NULL) { + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + if(HDstrcmp(attr_name, obj_op_name)==0) { + /* object name */ + i = (int)HDstrlen(buf); + j = (int)HDstrlen(op_name); + k = (size_t)i + 1 + (size_t)j + 1 + 2; + obj_name = (char *)HDmalloc((size_t)k); + if(obj_name == NULL) { + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + HDmemset(obj_name, '\0', (size_t)k); + if(op_name[0] != '/') { + HDstrncat(obj_name, buf, (size_t)i + 1); + if(buf[i-1] != '/') + HDstrncat(obj_name, "/", 2); + } + HDstrncat(obj_name, op_name, (size_t)j + 1); + + handle_attributes(oid, obj_name, NULL, 0, NULL); + HDfree(obj_name); + } + } + HDfree(obj_op_name); + } + return ret; +} /* end attr_search() */ + +static herr_t +obj_search(const char *path, const H5O_info_t *oi, const char *already_visited, void *_op_data) +{ + trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data; + char *op_name = (char*)handle_data->op_name; + + trav_attr_udata_t attr_data; + attr_data.path = (char*)path; + attr_data.op_name = op_name; + H5Aiterate_by_name(handle_data->fid, path, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_search, (void*)&attr_data, H5P_DEFAULT); + + if(HDstrcmp(path, op_name)==0) { + switch(oi->type) { + case H5O_TYPE_GROUP: + handle_groups(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_DATASET: + handle_datasets(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_NAMED_DATATYPE: + handle_datatypes(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + default: + error_msg("unknown object type value\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end switch */ + } + + return 0; +} /* end obj_search() */ + +static herr_t +lnk_search(const char *path, const H5L_info_t *li, void *_op_data) +{ + int search_len; + int k; + char *search_name; + trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data; + char *op_name = (char*)handle_data->op_name; + + search_len = HDstrlen(op_name); + if(search_len > 0 && op_name[0] != '/') { + k = 2; + } + else + k = 1; + search_name = (char *)HDmalloc(search_len + k); + if(search_name == NULL) { + error_msg("creating temporary link\n"); + h5tools_setstatus(EXIT_FAILURE); + } + else { + if (k == 2) { + HDstrcpy(search_name, "/"); + HDstrncat(search_name, op_name, (size_t)search_len + 1); + } + else + HDstrncpy(search_name, op_name, (size_t)search_len + 1); + search_name[search_len + k - 1] = '\0'; + + if(HDstrcmp(path, search_name) == 0) { + switch(li->type) { + case H5L_TYPE_SOFT: + case H5L_TYPE_EXTERNAL: + handle_links(handle_data->fid, op_name, NULL, 0, NULL); + break; + + case H5L_TYPE_HARD: + case H5L_TYPE_MAX: + case H5L_TYPE_ERROR: + default: + error_msg("unknown link type value\n"); + h5tools_setstatus(EXIT_FAILURE); + break; + } /* end switch() */ + } + HDfree(search_name); + } + return 0; +} /* end lnk_search() */ + +/*------------------------------------------------------------------------- + * Function: handle_paths + * + * Purpose: Handle objects from the command. + * + * Return: void + * + *------------------------------------------------------------------------- + */ +void +handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *display_name) +{ + hid_t gid = -1; + + if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) { + error_msg("unable to open root group\n"); + h5tools_setstatus(EXIT_FAILURE); + } + else { + hid_t gcpl_id; + unsigned crt_order_flags; + unsigned attr_crt_order_flags; + trav_handle_udata_t handle_udata; /* User data for traversal */ + + if ((gcpl_id = H5Gget_create_plist(gid)) < 0) { + error_msg("error in getting group creation property list ID\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + /* query the group creation properties for attributes */ + if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0) { + error_msg("error in getting group creation properties\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + /* query the group creation properties */ + if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0) { + error_msg("error in getting group creation properties\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + if(H5Pclose(gcpl_id) < 0) { + error_msg("error in closing group creation property list ID\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + handle_udata.fid = fid; + handle_udata.op_name = (char*)path_name; + if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) { + error_msg("error traversing information\n"); + h5tools_setstatus(EXIT_FAILURE); + } + } +} + /*------------------------------------------------------------------------- * Function: handle_attributes * @@ -1363,7 +1572,6 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe attr_name = h5tools_str_replace(attr + j + 1, "\\/", "/"); - /* handle error case: cannot open the object with the attribute */ if((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) { /* setup */ @@ -1840,9 +2048,8 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe, const * *------------------------------------------------------------------------- */ - - -static int dump_extlink(hid_t group, const char *linkname, const char *objname) +static int +dump_extlink(hid_t group, const char *linkname, const char *objname) { hid_t oid; H5O_info_t oi; diff --git a/tools/h5dump/h5dump_ddl.h b/tools/h5dump/h5dump_ddl.h index c769194..c4f4638 100644 --- a/tools/h5dump/h5dump_ddl.h +++ b/tools/h5dump/h5dump_ddl.h @@ -12,13 +12,10 @@ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + #ifndef H5DUMP_DDL_H__ #define H5DUMP_DDL_H__ -/* callback function used by H5Literate() */ -static herr_t dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void *op_data); -static int dump_extlink(hid_t group, const char *linkname, const char *objname); - #ifdef __cplusplus extern "C" { #endif @@ -37,6 +34,7 @@ void dump_fcontents(hid_t fid); /* callback function used by H5Aiterate2() */ herr_t dump_attr_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, void *_op_data); +void handle_paths(hid_t fid, const char *path_name, void *data, int pe, const char *display_name); void handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *display_name); void handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe, const char UNUSED *display_name); void handle_groups(hid_t fid, const char *group, void UNUSED *data, int pe, const char *display_name); diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 28264e7..53ad894 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -38,7 +38,7 @@ static char *xml_escape_the_string(const char *, int); static char *xml_escape_the_name(const char *); /*------------------------------------------------------------------------- - * Function: dump_all_cb + * Function: xml_dump_all_cb * * Purpose: function callback called by H5Literate, * displays everything in the specified object @@ -1782,7 +1782,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU int ndims; int i; int status = -1; - int stdindent = COL; /* should be 3 */ void *buf = NULL; hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index ac74637..71b1e65 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -3421,14 +3421,19 @@ static void gent_array8(void) H5P_DEFAULT); if(dset>=0) status = H5Dwrite (dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + HDassert(status >= 0); } /* * Close and release resources. */ status = H5Dclose (dset); + HDassert(status >= 0); status = H5Sclose (space); + HDassert(status >= 0); status = H5Tclose (filetype); + HDassert(status >= 0); status = H5Fclose (file); + HDassert(status >= 0); } static void gent_empty(void) @@ -7397,14 +7402,17 @@ gent_charsets(void) sid = H5Screate_simple( 1, dim, NULL ); fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII ); + HDassert(status >= 0); H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid ); status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 ); + HDassert(status >= 0); H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid ); did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT ); status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData ); + HDassert(status >= 0); H5Tclose( charset_dtid ); H5Tclose( ascii_dtid ); @@ -7415,7 +7423,7 @@ gent_charsets(void) } static void gent_compound_intsizes(void) { - hid_t fid, dataset, space, root; + hid_t fid, dataset, space; hsize_t dims[2]; hsize_t array_dim8[]={F70_XDIM,F70_YDIM8}; /* Array dimensions */ hsize_t array_dim16[]={F70_XDIM,F70_YDIM16}; /* Array dimensions */ @@ -7992,7 +8000,6 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset3_t dset3[10]; enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE}; - dset1_t dset5[10]; int i, j, k; unsigned ndims; diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 0e3cfda..77a0113 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -182,6 +182,8 @@ $SRC_H5DUMP_TESTFILES/tall-4s.ddl $SRC_H5DUMP_TESTFILES/tall-5s.ddl $SRC_H5DUMP_TESTFILES/tall-6.ddl $SRC_H5DUMP_TESTFILES/tall-6.exp +$SRC_H5DUMP_TESTFILES/tall-7.ddl +$SRC_H5DUMP_TESTFILES/tall-7N.ddl $SRC_H5DUMP_TESTFILES/tallfilters.ddl $SRC_H5DUMP_TESTFILES/tarray1.ddl $SRC_H5DUMP_TESTFILES/tarray1_big.ddl @@ -912,6 +914,7 @@ TOOLTEST4 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5 # test for displaying the selected attributes of string type and scalar space TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5 +TOOLTEST tattr-2.ddl --enable-error-stack -N "/\/attr1" --any_path /attr4 --any_path=/attr5 tattr.h5 # test for header and error messages TOOLTEST4 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 # test for displaying at least 9 attributes on root from a BE machine @@ -924,6 +927,7 @@ TOOLTEST tslink-1.ddl --enable-error-stack tslink.h5 TOOLTEST tudlink-1.ddl --enable-error-stack tudlink.h5 # test for displaying the selected link TOOLTEST tslink-2.ddl --enable-error-stack -l slink2 tslink.h5 +TOOLTEST tslink-2.ddl --enable-error-stack -N slink2 tslink.h5 TOOLTEST tudlink-2.ddl --enable-error-stack -l udlink2 tudlink.h5 # test for displaying dangling soft links TOOLTEST4 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5 @@ -933,12 +937,15 @@ TOOLTEST thlink-1.ddl --enable-error-stack thlink.h5 TOOLTEST thlink-2.ddl --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5 TOOLTEST thlink-3.ddl --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5 TOOLTEST thlink-4.ddl --enable-error-stack -g /g1 thlink.h5 +TOOLTEST thlink-4.ddl --enable-error-stack -N /g1 thlink.h5 TOOLTEST thlink-5.ddl --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5 +TOOLTEST thlink-5.ddl --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5 # tests for compound data types TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5 # test for named data types TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5 +TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5 # test for unamed type TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype @@ -952,6 +959,9 @@ TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5 TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5 TOOLTEST tall-2.ddl --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5 TOOLTEST tall-3.ddl --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5 +TOOLTEST tall-3.ddl --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5 +TOOLTEST tall-7.ddl --enable-error-stack -a attr1 tall.h5 +TOOLTEST tall-7N.ddl --enable-error-stack -N attr1 tall.h5 # test for loop detection TOOLTEST tloop-1.ddl --enable-error-stack tloop.h5 diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 9497e58..7038a95 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -1009,10 +1009,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) char *str2 = NULL; char *str3 = NULL; char str[1024] = ""; - char c; - int results; int j; - int nlines = 0; int line; /*------------------------------------------------------------------------- diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 691e2f2..40358c6 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -27,7 +27,7 @@ hsize_t write_pad( int , hsize_t ); hsize_t compute_pad( hsize_t ); -herr_t copy_to_file( int , int , ssize_t, ssize_t ); +herr_t copy_to_file( FILE *, FILE * , ssize_t, ssize_t ); int do_delete = FALSE; char *output_file = NULL; @@ -137,20 +137,28 @@ static int parse_command_line(int argc, const char *argv[]) { int opt = FALSE; - - /* parse command line options */ + + /* parse command line options */ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch((char)opt) { case 'o': output_file = HDstrdup(opt_arg); - break; + if (output_file) + h5tools_set_data_output_file(output_file, 1); + break; case 'i': input_file = HDstrdup(opt_arg); - break; + if (input_file) + h5tools_set_input_file(input_file, 1); + break;; case 'u': ub_file = HDstrdup(opt_arg); + if (ub_file) + h5tools_set_output_file(ub_file, 1); + else + rawoutstream = stdout; break; case 'd': @@ -205,9 +213,6 @@ done: int main(int argc, const char *argv[]) { - int ifid = -1; - int ufid = -1; - int h5fid = -1; void *edata; H5E_auto2_t func; hid_t ifile = -1; @@ -222,24 +227,24 @@ main(int argc, const char *argv[]) h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); - /* Disable error reporting */ + /* Disable error reporting */ H5Eget_auto2(H5E_DEFAULT, &func, &edata); H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - /* Initialize h5tools lib */ + /* Initialize h5tools lib */ h5tools_init(); if(EXIT_FAILURE == parse_command_line(argc, argv)) goto done; if (input_file == NULL) { - /* no user block */ + /* no user block */ error_msg("missing arguemnt for HDF5 file input.\n"); help_ref_msg(stderr); h5tools_setstatus(EXIT_FAILURE); goto done; } - + testval = H5Fis_hdf5(input_file); if (testval <= 0) { @@ -283,14 +288,7 @@ main(int argc, const char *argv[]) goto done; } - ifid = HDopen(input_file,O_RDONLY,0); - if(ifid < 0) { - error_msg("unable to open input HDF5 file \"%s\"\n", input_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - - res = HDfstat(ifid, &sbuf); + res = HDfstat(HDfileno(rawinstream), &sbuf); if(res < 0) { error_msg("Can't stat file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); @@ -305,43 +303,15 @@ main(int argc, const char *argv[]) goto done; } - if (ub_file == NULL) { - /* write to sdtout */ - ufid = HDdup(1); - } - else { - ufid = HDopen(ub_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); - - if (ufid < 0) { - error_msg("unable to open user block file for output\"%s\"\n", ub_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } - if (output_file == NULL) { - h5fid = HDopen(input_file,O_WRONLY, 0); - - if (h5fid < 0) { error_msg("unable to open output HDF5 file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); goto done; - } } - else { - h5fid = HDopen(output_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); - - if (h5fid < 0) { - error_msg("unable to open output HDF5 file \"%s\"\n", output_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } - - /* copy from 0 to 'usize - 1' into ufid */ + /* copy from 0 to 'usize - 1' into ufid */ if (!do_delete) { - if(copy_to_file(ifid, ufid, 0, (ssize_t) usize) < 0) { + if(copy_to_file(rawinstream, rawoutstream, 0, (ssize_t) usize) < 0) { error_msg("unable to copy user block to output file \"%s\"\n", ub_file); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -349,34 +319,25 @@ main(int argc, const char *argv[]) } /* copy from usize to end of file into h5fid, - * starting at end of user block if present - */ - if(copy_to_file(ifid, h5fid, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { + * starting at end of user block if present */ + if(copy_to_file(rawinstream, rawdatastream, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { error_msg("unable to copy hdf5 data to output file \"%s\"\n", output_file); h5tools_setstatus(EXIT_FAILURE); goto done; } - + done: if(input_file) HDfree(input_file); + if(output_file) HDfree(output_file); + if(ub_file) { HDfree(ub_file); - if(ufid >= 0) - status = HDclose(ufid); - HDassert(status >= 0); - } - - if(h5fid >= 0) { - status = HDclose(h5fid); - HDassert(status >= 0); - } - if(ifid >= 0) { - status = HDclose(ifid); - HDassert(status >= 0); } + + h5tools_close(); return h5tools_getstatus(); } @@ -388,54 +349,60 @@ done: * Returns 0 on success, -1 on failure. */ herr_t -copy_to_file( int infid, int ofid, ssize_t where, ssize_t how_much ) +copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t how_much ) { static char buf[COPY_BUF_SIZE]; + off_t where = (off_t)_where; off_t to; off_t from; - ssize_t nchars = -1; - ssize_t wnchars = -1; herr_t ret_value = 0; /* nothing to copy */ if(how_much <= 0) goto done; + /* rewind */ + HDfseek(infid, 0L, 0); + from = where; to = 0; - while(how_much > 0) { - /* Seek to correct position in input file */ - HDlseek(infid,from,SEEK_SET); + size_t bytes_in = 0; /* # of bytes to read */ + size_t bytes_read = 0; /* # of bytes actually read */ + size_t bytes_wrote = 0; /* # of bytes written */ - /* Read data to buffer */ if (how_much > COPY_BUF_SIZE) - nchars = HDread(infid,buf,(unsigned)COPY_BUF_SIZE); + bytes_in = COPY_BUF_SIZE; else - nchars = HDread(infid,buf,(unsigned)how_much); - if(nchars < 0) { + bytes_in = how_much; + + /* Seek to correct position in input file */ + HDfseek(infid, from, SEEK_SET); + + /* Read data to buffer */ + bytes_read = HDfread(buf, (size_t)1, bytes_in, infid); + if(0 == bytes_read && HDferror(infid)) { ret_value = -1; goto done; } /* end if */ + if(0 == bytes_read && HDfeof(infid)) { + goto done; + } /* end if */ /* Seek to correct position in output file */ - HDlseek(ofid,to,SEEK_SET); + HDfseek(ofid, to, SEEK_SET); /* Update positions/size */ - how_much -= nchars; - from += nchars; - to += nchars; - - /* Write nchars bytes to output file */ - wnchars = nchars; - while(nchars > 0) { - wnchars = HDwrite(ofid,buf,(unsigned)nchars); - if(wnchars < 0) { - ret_value = -1; - goto done; - } /* end if */ - nchars -= wnchars; - } /* end while */ + how_much -= bytes_read; + from += bytes_read; + to += bytes_read; + + /* Write nchars bytes to output file */ + bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid); + if(bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */ + ret_value = -1; + goto done; + } /* end if */ } /* end while */ done: diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index f61c961..921b390 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -241,7 +241,7 @@ static void usage(const char *prog) printf(" <layout type> can be:\n"); printf(" CHUNK, to apply chunking layout\n"); printf(" COMPA, to apply compact layout\n"); - printf(" CONTI, to apply continuous layout\n"); + printf(" CONTI, to apply contiguous layout\n"); printf(" <layout parameters> is optional layout information\n"); printf(" CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension\n"); printf(" COMPA (no parameter)\n"); diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c index 00e4bea..bcddbb9 100644 --- a/tools/h5repack/h5repack_opttable.c +++ b/tools/h5repack/h5repack_opttable.c @@ -388,7 +388,7 @@ pack_info_t* options_get_object( const char *path, pack_opttbl_t *table ) { unsigned int i; - const char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */ + char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */ for ( i = 0; i < table->nelems; i++) diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 70eadd2..9f798e9 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -460,7 +460,7 @@ obj_list_t* parse_filter(const char *str, * chunked. NULL, on error * the layout type can be: * CHUNK, to apply chunking layout - * CONTI, to apply continuous layout + * CONTI, to apply contiguous layout * COMPA, to apply compact layout * * Example: diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 78f39dd..4a775ee 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -44,6 +44,7 @@ IF (BUILD_TESTING) h5stat_help1.ddl h5stat_help2.ddl h5stat_notexist.ddl + h5stat_nofile.ddl h5stat_filters.ddl h5stat_filters-file.ddl h5stat_filters-F.ddl @@ -56,11 +57,27 @@ IF (BUILD_TESTING) h5stat_newgrat.ddl h5stat_newgrat-UG.ddl h5stat_newgrat-UA.ddl + h5stat_err1_links.ddl + h5stat_links1.ddl + h5stat_links2.ddl + h5stat_links3.ddl + h5stat_links4.ddl + h5stat_links5.ddl + h5stat_err1_dims.ddl + h5stat_dims1.ddl + h5stat_dims2.ddl + h5stat_err1_numattrs.ddl + h5stat_err2_numattrs.ddl + h5stat_numattrs1.ddl + h5stat_numattrs2.ddl + h5stat_numattrs3.ddl + h5stat_numattrs4.ddl ) SET (HDF5_REFERENCE_TEST_FILES h5stat_filters.h5 h5stat_tsohm.h5 h5stat_newgrat.h5 + h5stat_threshold.h5 ) FOREACH (ddl_file ${HDF5_REFERENCE_FILES}) @@ -140,6 +157,8 @@ IF (BUILD_TESTING) h5stat_help2.out.err h5stat_notexist.out h5stat_notexist.out.err + h5stat_nofile.out + h5stat_nofile.out.err h5stat_filters.out h5stat_filters.out.err h5stat_filters-file.out @@ -164,6 +183,36 @@ IF (BUILD_TESTING) h5stat_newgrat-UG.out.err h5stat_newgrat-UA.out h5stat_newgrat-UA.out.err + h5stat_err1_links.out + h5stat_err1_links.out.err + h5stat_links1.out + h5stat_links1.out.err + h5stat_links2.out + h5stat_links2.out.err + h5stat_links3.out + h5stat_links3.out.err + h5stat_links4.out + h5stat_links4.out.err + h5stat_links5.out + h5stat_links5.out.err + h5stat_err1_dims.out + h5stat_err1_dims.out.err + h5stat_dims1.out + h5stat_dims1.out.err + h5stat_dims2.out + h5stat_dims2.out.err + h5stat_err1_numattrs.out + h5stat_err1_numattrs.out.err + h5stat_err2_numattrs.out + h5stat_err2_numattrs.out.err + h5stat_numattrs1.out + h5stat_numattrs1.out.err + h5stat_numattrs2.out + h5stat_numattrs2.out.err + h5stat_numattrs3.out + h5stat_numattrs3.out.err + h5stat_numattrs4.out + h5stat_numattrs4.out.err ) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) @@ -177,6 +226,7 @@ IF (BUILD_TESTING) # Test when h5stat a file that does not exist ADD_H5_TEST (h5stat_notexist 1 notexist.h5) + ADD_H5_TEST (h5stat_nofile 1 '') # Test file with groups, compressed datasets, user-applied fileters, etc. # h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 @@ -195,6 +245,47 @@ IF (BUILD_TESTING) ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5) +# +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g + ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5) +# +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 + ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5) + ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5) +# +# Tests for -m (--dims) option on h5stat_threshold.h5 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 + ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_threshold.h5 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 + ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_newgrat.h5 +# -A -a 100 + ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5) +# ENDIF (BUILD_TESTING) ############################################################################## diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index dcc2c08..a5d7eef 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -26,10 +26,13 @@ #define PROGRAMNAME "h5stat" /* Parameters to control statistics gathered */ -#define SIZE_SMALL_GROUPS 10 -#define SIZE_SMALL_ATTRS 10 -#define SIZE_SMALL_DSETS 10 -#define SIZE_SMALL_SECTS 10 + +/* Default threshold for small groups/datasets/attributes */ +#define DEF_SIZE_SMALL_GROUPS 10 +#define DEF_SIZE_SMALL_DSETS 10 +#define DEF_SIZE_SMALL_ATTRS 10 + +#define SIZE_SMALL_SECTS 10 #define H5_NFILTERS_IMPL 8 /* Number of currently implemented filters + one to accommodate for user-define filters + one @@ -69,22 +72,22 @@ typedef struct iter_t { unsigned long max_links; /* Maximum # of links to an object */ hsize_t max_fanout; /* Maximum fanout from a group */ - unsigned long num_small_groups[SIZE_SMALL_GROUPS]; /* Size of small groups tracked */ + unsigned long *num_small_groups; /* Size of small groups tracked */ unsigned group_nbins; /* Number of bins for group counts */ unsigned long *group_bins; /* Pointer to array of bins for group counts */ ohdr_info_t group_ohdr_info; /* Object header information for groups */ - hsize_t max_attrs; /* Maximum attributes from a group */ - unsigned long num_small_attrs[SIZE_SMALL_ATTRS]; /* Size of small attributes tracked */ + hsize_t max_attrs; /* Maximum attributes from a group */ + unsigned long *num_small_attrs; /* Size of small attributes tracked */ unsigned attr_nbins; /* Number of bins for attribute counts */ unsigned long *attr_bins; /* Pointer to array of bins for attribute counts */ unsigned max_dset_rank; /* Maximum rank of dataset */ unsigned long dset_rank_count[H5S_MAX_RANK]; /* Number of datasets of each rank */ hsize_t max_dset_dims; /* Maximum dimension size of dataset */ - unsigned long small_dset_dims[SIZE_SMALL_DSETS]; /* Size of dimensions of small datasets tracked */ + unsigned long *small_dset_dims; /* Size of dimensions of small datasets tracked */ unsigned long dset_layouts[H5D_NLAYOUTS]; /* Type of storage for each dataset */ - unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ + unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ unsigned long dset_ntypes; /* Number of diff. dataset datatypes found */ dtype_info_t *dset_type_info; /* Pointer to dataset datatype information found */ unsigned dset_dim_nbins; /* Number of bins for dataset dimensions */ @@ -134,15 +137,19 @@ static int display_dset_metadata = FALSE; /* display file space info f static int display_object = FALSE; /* not implemented yet */ +/* Initialize threshold for small groups/datasets/attributes */ +static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS; +static int sdsets_threshold = DEF_SIZE_SMALL_DSETS; +static int sattrs_threshold = DEF_SIZE_SMALL_ATTRS; + /* a structure for handling the order command-line parameters come in */ struct handler_t { size_t obj_count; char **obj; }; - -static const char *s_opts ="ADdFfhGgsSTO:V"; -/* e.g. "filemetadata" has to precedue "file"; "groupmetadata" has to precede "group" etc. */ +static const char *s_opts ="Aa:Ddm:FfhGgl:sSTO:V"; +/* e.g. "filemetadata" has to precede "file"; "groupmetadata" has to precede "group" etc. */ static struct long_options l_opts[] = { {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, @@ -170,6 +177,10 @@ static struct long_options l_opts[] = { {"grou", no_arg, 'g'}, {"gro", no_arg, 'g'}, {"gr", no_arg, 'g'}, + { "links", require_arg, 'l' }, + { "link", require_arg, 'l' }, + { "lin", require_arg, 'l' }, + { "li", require_arg, 'l' }, {"dsetmetadata", no_arg, 'D'}, {"dsetmetadat", no_arg, 'D'}, {"dsetmetada", no_arg, 'D'}, @@ -181,6 +192,9 @@ static struct long_options l_opts[] = { {"dset", no_arg, 'd'}, {"dse", no_arg, 'd'}, {"ds", no_arg, 'd'}, + {"dims", require_arg, 'm'}, + {"dim", require_arg, 'm'}, + {"di", require_arg, 'm'}, {"dtypemetadata", no_arg, 'T'}, {"dtypemetadat", no_arg, 'T'}, {"dtypemetada", no_arg, 'T'}, @@ -212,6 +226,13 @@ static struct long_options l_opts[] = { { "attr", no_arg, 'A' }, { "att", no_arg, 'A' }, { "at", no_arg, 'A' }, + { "numattrs", require_arg, 'a' }, + { "numattr", require_arg, 'a' }, + { "numatt", require_arg, 'a' }, + { "numat", require_arg, 'a' }, + { "numa", require_arg, 'a' }, + { "num", require_arg, 'a' }, + { "nu", require_arg, 'a' }, { "freespace", no_arg, 's' }, { "freespac", no_arg, 's' }, { "freespa", no_arg, 's' }, @@ -237,6 +258,16 @@ leave(int ret) } + +/*------------------------------------------------------------------------- + * Function: usage + * + * Purpose: Compute the ceiling of log_10(x) + * + * Return: >0 on success, 0 on failure + * + *------------------------------------------------------------------------- + */ static void usage(const char *prog) { HDfflush(stdout); @@ -248,11 +279,20 @@ static void usage(const char *prog) HDfprintf(stdout, " -f, --file Print file information\n"); HDfprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n"); HDfprintf(stdout, " -g, --group Print group information\n"); + HDfprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n"); + HDfprintf(stdout, " information for small groups. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n"); HDfprintf(stdout, " -d, --dset Print dataset information\n"); + HDfprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n"); + HDfprintf(stdout, " information for small datasets. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n"); HDfprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n"); HDfprintf(stdout, " -A, --attribute Print attribute information\n"); + HDfprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n"); + HDfprintf(stdout, " information for small # of attributes. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -s, --freespace Print free space information\n"); HDfprintf(stdout, " -S, --summary Print summary of file space information\n"); } @@ -268,8 +308,6 @@ static void usage(const char *prog) * Programmer: Quincey Koziol * Monday, August 22, 2005 * - * Modifications: - * *------------------------------------------------------------------------- */ static unsigned @@ -311,7 +349,7 @@ attribute_stats(iter_t *iter, const H5O_info_t *oi) iter->attrs_heap_storage_size += oi->meta_size.attr.heap_size; /* Update small # of attribute count & limits */ - if(oi->num_attrs < SIZE_SMALL_ATTRS) + if(oi->num_attrs <= (hsize_t)sattrs_threshold) (iter->num_small_attrs[(size_t)oi->num_attrs])++; if(oi->num_attrs > iter->max_attrs) iter->max_attrs = oi->num_attrs; @@ -382,8 +420,10 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi) HDassert(ret >= 0); /* Update link stats */ - if(ginfo.nlinks < SIZE_SMALL_GROUPS) + /* Collect statistics for small groups */ + if(ginfo.nlinks < (hsize_t)sgroups_threshold) (iter->num_small_groups[(size_t)ginfo.nlinks])++; + /* Determine maximum link count */ if(ginfo.nlinks > iter->max_fanout) iter->max_fanout = ginfo.nlinks; @@ -514,8 +554,11 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi) /* Only gather dim size statistics on 1-D datasets */ if(ndims == 1) { - iter->max_dset_dims = dims[0]; - if(dims[0] < SIZE_SMALL_DSETS) + /* Determine maximum dimension size */ + if(dims[0] > iter->max_dset_dims) + iter->max_dset_dims = dims[0]; + /* Collect statistics for small datasets */ + if(dims[0] < (hsize_t)sdsets_threshold) (iter->small_dset_dims[(size_t)dims[0]])++; /* Add dim count to proper bin */ @@ -871,6 +914,18 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_group = TRUE; break; + case 'l': + if(opt_arg) { + sgroups_threshold = HDatoi(opt_arg); + if(sgroups_threshold < 1) { + error_msg("Invalid threshold for small groups\n"); + goto error; + } + } else + error_msg("Missing threshold for small groups\n"); + + break; + case 'D': display_all = FALSE; display_dset_metadata = TRUE; @@ -881,6 +936,18 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_dset = TRUE; break; + case 'm': + if(opt_arg) { + sdsets_threshold = HDatoi(opt_arg); + if(sdsets_threshold < 1) { + error_msg("Invalid threshold for small datasets\n"); + goto error; + } + } else + error_msg("Missing threshold for small datasets\n"); + + break; + case 'T': display_all = FALSE; display_dset_dtype_meta = TRUE; @@ -891,6 +958,18 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_attr = TRUE; break; + case 'a': + if(opt_arg) { + sattrs_threshold = HDatoi(opt_arg); + if(sattrs_threshold < 1) { + error_msg("Invalid threshold for small # of attributes\n"); + goto error; + } + } else + error_msg("Missing threshold for small # of attributes\n"); + + break; + case 's': display_all = FALSE; display_free_sections = TRUE; @@ -967,18 +1046,31 @@ error: static void iter_free(iter_t *iter) { + /* Clear array of bins for group counts */ if(iter->group_bins) { HDfree(iter->group_bins); iter->group_bins = NULL; } /* end if */ + /* Clear array for tracking small groups */ + if(iter->num_small_groups) { + HDfree(iter->num_small_groups); + iter->num_small_groups = NULL; + } /* end if */ + /* Clear array of bins for attribute counts */ if(iter->attr_bins) { HDfree(iter->attr_bins); iter->attr_bins = NULL; } /* end if */ + /* Clear array for tracking small attributes */ + if(iter->num_small_attrs) { + HDfree(iter->num_small_attrs); + iter->num_small_attrs= NULL; + } /* end if */ + /* Clear dataset datatype information found */ if(iter->dset_type_info) { HDfree(iter->dset_type_info); @@ -991,6 +1083,12 @@ iter_free(iter_t *iter) iter->dset_dim_bins = NULL; } /* end if */ + /* Clear array of tracking 1-D small datasets */ + if(iter->small_dset_dims) { + HDfree(iter->small_dset_dims); + iter->small_dset_dims = NULL; + } /* end if */ + /* Clear array of bins for free-space section sizes */ if(iter->sect_bins) { HDfree(iter->sect_bins); @@ -1117,11 +1215,11 @@ print_group_info(const iter_t *iter) unsigned long total; /* Total count for various statistics */ unsigned u; /* Local index variable */ - printf("Small groups:\n"); + printf("Small groups (with 0 to %u links):\n", sgroups_threshold-1); total = 0; - for(u = 0; u < SIZE_SMALL_GROUPS; u++) { + for(u = 0; u < (unsigned)sgroups_threshold; u++) { if(iter->num_small_groups[u] > 0) { - printf("\t# of groups of size %u: %lu\n", u, iter->num_small_groups[u]); + printf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]); total += iter->num_small_groups[u]; } /* end if */ } /* end for */ @@ -1130,13 +1228,13 @@ print_group_info(const iter_t *iter) printf("Group bins:\n"); total = 0; if((iter->group_nbins > 0) && (iter->group_bins[0] > 0)) { - printf("\t# of groups of size 0: %lu\n", iter->group_bins[0]); + printf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]); total = iter->group_bins[0]; } /* end if */ power = 1; for(u = 1; u < iter->group_nbins; u++) { if(iter->group_bins[u] > 0) { - printf("\t# of groups of size %lu - %lu: %lu\n", power, (power * 10) - 1, + printf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1, iter->group_bins[u]); total += iter->group_bins[u]; } /* end if */ @@ -1207,29 +1305,29 @@ print_dataset_info(const iter_t *iter) printf("1-D Dataset information:\n"); HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %Hu\n", iter->max_dset_dims); - printf("\tSmall 1-D datasets:\n"); + printf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1); total = 0; - for(u = 0; u < SIZE_SMALL_DSETS; u++) { + for(u = 0; u < (unsigned)sdsets_threshold; u++) { if(iter->small_dset_dims[u] > 0) { - printf("\t\t# of dataset dimensions of size %u: %lu\n", u, + printf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]); total += iter->small_dset_dims[u]; } /* end if */ } /* end for */ - printf("\t\tTotal small datasets: %lu\n", total); + printf("\t\tTotal # of small datasets: %lu\n", total); /* Protect against no datasets in file */ if(iter->dset_dim_nbins > 0) { printf("\t1-D Dataset dimension bins:\n"); total = 0; if(iter->dset_dim_bins[0] > 0) { - printf("\t\t# of datasets of size 0: %lu\n", iter->dset_dim_bins[0]); + printf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]); total = iter->dset_dim_bins[0]; } /* end if */ power = 1; for(u = 1; u < iter->dset_dim_nbins; u++) { if(iter->dset_dim_bins[u] > 0) { - printf("\t\t# of datasets of size %lu - %lu: %lu\n", power, (power * 10) - 1, + printf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->dset_dim_bins[u]); total += iter->dset_dim_bins[u]; } /* end if */ @@ -1346,8 +1444,6 @@ print_dset_dtype_meta(const iter_t *iter) * Programmer: Vailin Choi * July 12, 2007 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1357,9 +1453,9 @@ print_attr_info(const iter_t *iter) unsigned long total; /* Total count for various statistics */ unsigned u; /* Local index variable */ - printf("Small # of attributes:\n"); + printf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold); total = 0; - for(u = 1; u < SIZE_SMALL_ATTRS; u++) { + for(u = 1; u <= (unsigned)sattrs_threshold; u++) { if(iter->num_small_attrs[u] > 0) { printf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]); total += iter->num_small_attrs[u]; @@ -1660,6 +1756,16 @@ main(int argc, const char *argv[]) iter.free_hdr = finfo.free.meta_size; } /* end else */ + iter.num_small_groups = (unsigned long *)calloc((size_t)sgroups_threshold, sizeof(unsigned long)); + iter.num_small_attrs = (unsigned long *)calloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); + iter.small_dset_dims = (unsigned long *)calloc((size_t)sdsets_threshold, sizeof(unsigned long)); + + if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) { + error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n"); + h5tools_setstatus(EXIT_FAILURE); + goto done; + } + if((fcpl = H5Fget_create_plist(fid)) < 0) warn_msg("Unable to retrieve file creation property\n"); diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c index a7bb4b0..5ad73f7 100644 --- a/tools/h5stat/h5stat_gentest.c +++ b/tools/h5stat/h5stat_gentest.c @@ -16,88 +16,325 @@ /* * Generate the binary hdf5 files for the h5stat tests. * Usage: just execute the program without any arguments will - * generate all the binary hdf5 files in the ./testfiles directory. + * generate all the binary hdf5 files * * If you regenerate the test files (e.g., changing some code, * trying it on a new platform, ...), you need to verify the correctness * of the expected output and update the corresponding *.ddl files. */ - -#include <assert.h> #include "hdf5.h" -#define FILE "h5stat_newgrat.h5" +/* For gen_newgrat_file() */ +#define NEWGRAT_FILE "h5stat_newgrat.h5" #define DATASET_NAME "DATASET_NAME" #define GROUP_NAME "GROUP" #define ATTR_NAME "ATTR" #define NUM_GRPS 35000 #define NUM_ATTRS 100 +/* For gen_threshold_file() */ +#define THRESHOLD_FILE "h5stat_threshold.h5" +#define THRES_ATTR_NAME "attr" +#define THRES_ATTR_GRP_NAME "grp_attr" +#define THRES_DSET_NAME "dset" +#define THRES_NUM 10 +#define THRES_NUM_25 25 + /* - * Generate 1.8 HDF5 file - * with NUM_GRPS groups - * with NUM_ATTRS attributes on the dataset + * Generate HDF5 file with latest format with + * NUM_GRPS groups and NUM_ATTRS attributes for the dataset + * */ -static void gen_file(void) +static void +gen_newgrat_file(const char *fname) { - hid_t fcpl; /* File creation property */ - hid_t fapl; /* File access property */ - hid_t file; /* File id */ - hid_t gid; /* Group id */ - hid_t type_id; /* Datatype id */ - hid_t space_id; /* Dataspace id */ - hid_t attr_id; /* Attribute id */ - hid_t dset_id; /* Dataset id */ - char name[30]; /* Group name */ - char attrname[30]; /* Attribute name */ - int ret; /* Return value */ - int i; /* Local index variable */ - - fapl = H5Pcreate(H5P_FILE_ACCESS); - ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); - assert(ret >= 0); + hid_t fcpl; /* File creation property */ + hid_t fapl; /* File access property */ + hid_t fid; /* File id */ + hid_t gid; /* Group id */ + hid_t tid; /* Datatype id */ + hid_t sid; /* Dataspace id */ + hid_t attr_id; /* Attribute id */ + hid_t did; /* Dataset id */ + char name[30]; /* Group name */ + char attrname[30]; /* Attribute name */ + int i; /* Local index variable */ + + /* Get a copy file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + goto error; + + /* Set to use latest library format */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + goto error; + + /* Get a copy of file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + goto error; /* Set file space handling strategy */ - fcpl = H5Pcreate(H5P_FILE_CREATE); - ret = H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0); - assert(ret >= 0); + if(H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0) < 0) + goto error; + + /* Create file */ + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + goto error; - /* Create dataset */ - file = H5Fcreate(FILE, H5F_ACC_TRUNC, fcpl, fapl); + /* Create NUM_GRPS groups in the root group */ for(i = 1; i <= NUM_GRPS; i++) { sprintf(name, "%s%d", GROUP_NAME,i); - gid = H5Gcreate2(file, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Gclose(gid); + if((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Gclose(gid) < 0) + goto error; } /* end for */ /* Create a datatype to commit and use */ - type_id = H5Tcopy(H5T_NATIVE_INT); + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) + goto error; /* Create dataspace for dataset */ - space_id = H5Screate(H5S_SCALAR); + if((sid = H5Screate(H5S_SCALAR)) < 0) + goto error; + + /* Create dataset */ + if((did = H5Dcreate2(fid, DATASET_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; - /* Create dataset */ - dset_id = H5Dcreate2(file, DATASET_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + /* Create NUM_ATTRS for the dataset */ for(i = 1; i <= NUM_ATTRS; i++) { sprintf(attrname, "%s%d", ATTR_NAME,i); - attr_id = H5Acreate2(dset_id, attrname, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); - ret = H5Aclose(attr_id); - assert(ret >= 0); + if((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; } /* end for */ - ret = H5Dclose(dset_id); - assert(ret >= 0); - ret = H5Sclose(space_id); - assert(ret >= 0); - ret = H5Tclose(type_id); - assert(ret >= 0); - ret = H5Fclose(file); - assert(ret >= 0); -} + /* Close dataset, dataspace, datatype, file */ + if(H5Dclose(did) < 0) + goto error; + if(H5Sclose(sid) < 0) + goto error; + if(H5Tclose(tid) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + +error: + H5E_BEGIN_TRY { + H5Aclose(attr_id); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Gclose(gid); + H5Fclose(fid); + } H5E_END_TRY; + +} /* gen_newgrat_file() */ + +/* + * Generate an HDF5 file with groups, datasets, attributes for testing the options: + * -l N (--links=N): Set the threshold for # of links when printing information for small groups. + * -m N (--dims=N): Set the threshold for the # of dimension sizes when printing information for small datasets. + * -a N (--numattrs=N): Set the threshold for the # of attributes when printing information for small # of attributes. + */ +static void +gen_threshold_file(const char *fname) +{ + hid_t fid; /* File ID */ + hid_t sid0, sid1, sid2, sid3, sid4; /* Dataspace IDs */ + hid_t did; /* Dataset ID */ + hid_t attr_id; /* Attribute ID */ + hid_t gid; /* Group ID */ + hsize_t two_dims[] = {2, 5}; /* Dimension array */ + hsize_t one_dims[] = {6}; /* Dimension array */ + hsize_t zero_dims[] = {0}; /* Dimension array */ + char name[30]; /* Name */ + unsigned i; /* Local index variable */ + + /* Create file */ + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 1-D dataspace with zero dimension size */ + if((sid0 = H5Screate_simple(1, zero_dims, NULL)) < 0) + goto error; + + /* Create 1-D dataspace with non-zero dimension size*/ + if((sid1 = H5Screate_simple(1, one_dims, NULL)) < 0) + goto error; + + /* Create 2-D dataspace */ + if((sid2 = H5Screate_simple(2, two_dims, NULL)) < 0) + goto error; + + /* Create scalar dataspace */ + if((sid3 = H5Screate(H5S_SCALAR)) < 0) + goto error; + + /* Create null dataspace */ + if((sid4 = H5Screate(H5S_NULL)) < 0) + goto error; + + /* Create an attribute for the root group */ + if((attr_id = H5Acreate2(fid, "attr", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + + /* Create 1-D dataset with zero dimension size for the root group */ + if((did = H5Dcreate2(fid, "zero_dset", H5T_NATIVE_UCHAR, sid0, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 11 attributes for the dataset */ + for(i = 1; i <= (THRES_NUM+1); i++) { + sprintf(name, "%s%d", THRES_ATTR_NAME,i); + if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + } + if(H5Dclose(did) < 0) + goto error; + + /* Create dataset with scalar dataspace for the root group */ + if((did = H5Dcreate2(fid, "scalar_dset", H5T_NATIVE_UCHAR, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + + /* Create dataset with null dataspace for the root group */ + if((did = H5Dcreate2(fid, "null_dset", H5T_NATIVE_UCHAR, sid4, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + + /* Create 2-D dataset for the root group */ + if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_UCHAR, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 10 attributes for the 2-D dataset */ + for(i = 1; i <= THRES_NUM; i++) { + sprintf(name, "%s%d", THRES_ATTR_NAME,i); + if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + } + if(H5Dclose(did) < 0) + goto error; + + /* Create first group */ + if((gid = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create an attribute for the group */ + if((attr_id = H5Acreate2(gid, "ATTR", H5T_NATIVE_INT, sid3, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close attribute */ + if(H5Aclose(attr_id) < 0) + goto error; + + /* Create 10 1-D datasets with non-zero dimension size for the group */ + for(i = 1; i <= THRES_NUM; i++) { + /* set up dataset name */ + sprintf(name, "%s%d", THRES_DSET_NAME,i); + + /* Create the dataset */ + if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the dataset */ + if(H5Dclose(did) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + + /* Create second group */ + if((gid = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 25 attributes for the group */ + for(i = 1; i <= THRES_NUM_25; i++) { + /* Set up attribute name */ + sprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i); + + /* Create the attribute */ + if((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the attribute */ + if(H5Aclose(attr_id) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + /* Create third group */ + if((gid = H5Gcreate2(fid, "group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 9 1-D datasets with non-zero dimension size for the group */ + for(i = 1; i < THRES_NUM; i++) { + /* set up dataset name */ + sprintf(name, "%s%d", THRES_DSET_NAME,i); + + /* Create the dataset */ + if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the dataset */ + if(H5Dclose(did) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + + /* Close dataspaces */ + if(H5Sclose(sid0) < 0) + goto error; + if(H5Sclose(sid1) < 0) + goto error; + if(H5Sclose(sid2) < 0) + goto error; + if(H5Sclose(sid3) < 0) + goto error; + if(H5Sclose(sid4) < 0) + goto error; + + /* Close file */ + if(H5Fclose(fid) < 0) + goto error; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid); + H5Aclose(attr_id); + H5Dclose(did); + H5Sclose(sid0); + H5Sclose(sid1); + H5Sclose(sid2); + H5Sclose(sid3); + H5Sclose(sid4); + H5Fclose(fid); + } H5E_END_TRY; + +} /* gen_threshold_file() */ int main(void) { - gen_file(); + gen_newgrat_file(NEWGRAT_FILE); + gen_threshold_file(THRESHOLD_FILE); return 0; } diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl new file mode 100644 index 0000000..182d31a --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_dims1.ddl @@ -0,0 +1,47 @@ +############################# +Expected output for 'h5stat -gd -m 5 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + Total # of small groups: 3 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 4): + # of datasets with dimension sizes 0: 1 + Total # of small datasets: 1 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl new file mode 100644 index 0000000..abf3f61 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_dims2.ddl @@ -0,0 +1,38 @@ +############################# +Expected output for 'h5stat -d --di=15 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 14): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 diff --git a/tools/h5stat/testfiles/h5stat_err1_dims.ddl b/tools/h5stat/testfiles/h5stat_err1_dims.ddl new file mode 100644 index 0000000..8f0686f --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_dims.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -d --dims=-1 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small datasets diff --git a/tools/h5stat/testfiles/h5stat_err1_links.ddl b/tools/h5stat/testfiles/h5stat_err1_links.ddl new file mode 100644 index 0000000..07987a2 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_links.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -l 0 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small groups diff --git a/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl new file mode 100644 index 0000000..8eea546 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -a -2 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl new file mode 100644 index 0000000..a1ecb31 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat --numattrs h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl index 3cc9071..dae1f06 100644 --- a/tools/h5stat/testfiles/h5stat_filters-d.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl @@ -9,10 +9,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl index ae9121d..5c7a4ab 100644 --- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -9,10 +9,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 diff --git a/tools/h5stat/testfiles/h5stat_filters-g.ddl b/tools/h5stat/testfiles/h5stat_filters-g.ddl index d488b8f..6cb791c 100644 --- a/tools/h5stat/testfiles/h5stat_filters-g.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-g.ddl @@ -2,8 +2,8 @@ Expected output for 'h5stat -g h5stat_filters.h5' ############################# Filename: h5stat_filters.h5 -Small groups: +Small groups (with 0 to 9 links): Total # of small groups: 0 Group bins: - # of groups of size 10 - 99: 1 + # of groups with 10 - 99 links: 1 Total # of groups: 1 diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl index ddafd81..0a6733d 100644 --- a/tools/h5stat/testfiles/h5stat_filters.ddl +++ b/tools/h5stat/testfiles/h5stat_filters.ddl @@ -35,10 +35,10 @@ File space information for file metadata (in bytes): Free-space managers: Header: 0 Amount of free space: 0 -Small groups: +Small groups (with 0 to 9 links): Total # of small groups: 0 Group bins: - # of groups of size 10 - 99: 1 + # of groups with 10 - 99 links: 1 Total # of groups: 1 Dataset dimension information: Max. rank of datasets: 2 @@ -47,10 +47,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 @@ -79,7 +79,7 @@ Dataset datatype information: Count (total/named) = (1/0) Size (desc./elmt) = (14/4) Total dataset datatype count: 15 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: Total # of objects with attributes: 0 diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl index 5665b35..d79c99f 100644 --- a/tools/h5stat/testfiles/h5stat_help1.ddl +++ b/tools/h5stat/testfiles/h5stat_help1.ddl @@ -9,10 +9,19 @@ Usage: h5stat [OPTIONS] file -f, --file Print file information -F, --filemetadata Print file space information for file's metadata -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. -D, --dsetmetadata Print file space information for datasets' metadata -T, --dtypemetadata Print datasets' datatype information -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl index 3fb303a..af48e3a 100644 --- a/tools/h5stat/testfiles/h5stat_help2.ddl +++ b/tools/h5stat/testfiles/h5stat_help2.ddl @@ -9,10 +9,19 @@ Usage: h5stat [OPTIONS] file -f, --file Print file information -F, --filemetadata Print file space information for file's metadata -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. -D, --dsetmetadata Print file space information for datasets' metadata -T, --dtypemetadata Print datasets' datatype information -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_links1.ddl b/tools/h5stat/testfiles/h5stat_links1.ddl new file mode 100644 index 0000000..e77a788 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links1.ddl @@ -0,0 +1,13 @@ +############################# +Expected output for 'h5stat -g -l 8 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 7 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + Total # of small groups: 2 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl new file mode 100644 index 0000000..5207343 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links2.ddl @@ -0,0 +1,107 @@ +############################# +Expected output for 'h5stat --links=8 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +File information + # of unique groups: 4 + # of unique datasets: 23 + # of unique named datatypes: 0 + # of unique links: 0 + # of unique other: 0 + Max. # of links to object: 1 + Max. # of objects in group: 10 +File space information for file metadata (in bytes): + Superblock: 96 + Superblock extension: 0 + User block: 0 + Object headers: (total/unused) + Groups: 3576/0 + Datasets(exclude compact data): 7896/2912 + Datatypes: 0/0 + Groups: + B-tree/List: 3816 + Heap: 744 + Attributes: + B-tree/List: 0 + Heap: 0 + Chunked datasets: + Index: 0 + Datasets: + Heap: 0 + Shared Messages: + Header: 0 + B-tree/List: 0 + Heap: 0 + Free-space managers: + Header: 0 + Amount of free space: 0 +Small groups (with 0 to 7 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + Total # of small groups: 2 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 9): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 +Dataset datatype information: + # of unique datatypes used by datasets: 1 + Dataset datatype #0: + Count (total/named) = (23/0) + Size (desc./elmt) = (14/1) + Total dataset datatype count: 23 +Small # of attributes (objects with 1 to 10 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + Total # of objects with small # of attributes: 3 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_links3.ddl b/tools/h5stat/testfiles/h5stat_links3.ddl new file mode 100644 index 0000000..d0071d7 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links3.ddl @@ -0,0 +1,15 @@ +############################# +Expected output for 'h5stat --links=20 -g h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 19 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + # of groups with 10 link(s): 1 + Total # of small groups: 4 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_links4.ddl b/tools/h5stat/testfiles/h5stat_links4.ddl new file mode 100644 index 0000000..ca3911c --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links4.ddl @@ -0,0 +1,11 @@ +############################# +Expected output for 'h5stat -g h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 35000 + Total # of small groups: 35000 +Group bins: + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 + Total # of groups: 35001 diff --git a/tools/h5stat/testfiles/h5stat_links5.ddl b/tools/h5stat/testfiles/h5stat_links5.ddl new file mode 100644 index 0000000..44ec161 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links5.ddl @@ -0,0 +1,12 @@ +############################# +Expected output for 'h5stat -g -l 40000 h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small groups (with 0 to 39999 links): + # of groups with 0 link(s): 35000 + # of groups with 35001 link(s): 1 + Total # of small groups: 35001 +Group bins: + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 + Total # of groups: 35001 diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl index 70f9a82..18f91f3 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl @@ -2,7 +2,7 @@ Expected output for 'h5stat -A h5stat_newgrat.h5' ############################# Filename: h5stat_newgrat.h5 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: # of objects with 100 - 999 attributes: 1 diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl index b93fa17..7d4ef91 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl @@ -33,14 +33,14 @@ File space information for file metadata (in bytes): B-tree/List: 0 Heap: 0 Free-space managers: - Header: 1584 - Amount of free space: 6042 -Small groups: - # of groups of size 0: 35000 + Header: 180 + Amount of free space: 132 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 35000 Total # of small groups: 35000 Group bins: - # of groups of size 0: 35000 - # of groups of size 10000 - 99999: 1 + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 Total # of groups: 35001 Dataset dimension information: Max. rank of datasets: 0 @@ -48,8 +48,8 @@ Dataset dimension information: # of dataset with rank 0: 1 1-D Dataset information: Max. dimension size of 1-D datasets: 0 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 Dataset storage information: Total raw data size: 0 Total external raw data size: 0 @@ -74,7 +74,7 @@ Dataset datatype information: Count (total/named) = (1/0) Size (desc./elmt) = (14/4) Total dataset datatype count: 1 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: # of objects with 100 - 999 attributes: 1 @@ -83,20 +83,15 @@ Attribute bins: Free-space section threshold: 1 bytes Small size free-space sections (< 10 bytes): # of sections of size 1: 1 - # of sections of size 2: 12 - # of sections of size 3: 1 - # of sections of size 7: 1 - # of sections of size 8: 2 - Total # of small size sections: 17 + Total # of small size sections: 1 Free-space section bins: - # of sections of size 1 - 9: 17 - # of sections of size 10 - 99: 49 - # of sections of size 100 - 999: 27 - Total # of sections: 93 + # of sections of size 1 - 9: 1 + # of sections of size 10 - 99: 4 + Total # of sections: 5 File space management strategy: H5F_FILE_SPACE_ALL_PERSIST Summary of file space information: - File metadata: 6363440 bytes + File metadata: 6362036 bytes Raw data: 0 bytes - Amount/Percent of tracked free space: 6042 bytes/0.1% + Amount/Percent of tracked free space: 132 bytes/0.0% Unaccounted space: 0 bytes -Total space: 6369482 bytes +Total space: 6362168 bytes diff --git a/tools/h5stat/testfiles/h5stat_newgrat.h5 b/tools/h5stat/testfiles/h5stat_newgrat.h5 Binary files differindex cb5f47f..c919b71 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat.h5 +++ b/tools/h5stat/testfiles/h5stat_newgrat.h5 diff --git a/tools/h5stat/testfiles/h5stat_nofile.ddl b/tools/h5stat/testfiles/h5stat_nofile.ddl new file mode 100644 index 0000000..cf20995 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_nofile.ddl @@ -0,0 +1,28 @@ +############################# +Expected output for 'h5stat ' +############################# +Usage: h5stat [OPTIONS] file + + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit + -f, --file Print file information + -F, --filemetadata Print file space information for file's metadata + -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. + -G, --groupmetadata Print file space information for groups' metadata + -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. + -D, --dsetmetadata Print file space information for datasets' metadata + -T, --dtypemetadata Print datasets' datatype information + -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. + -s, --freespace Print free space information + -S, --summary Print summary of file space information +h5stat error: missing file name diff --git a/tools/h5stat/testfiles/h5stat_numattrs1.ddl b/tools/h5stat/testfiles/h5stat_numattrs1.ddl new file mode 100644 index 0000000..86cfcb0 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs1.ddl @@ -0,0 +1,20 @@ +############################# +Expected output for 'h5stat -AS -a 10 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small # of attributes (objects with 1 to 10 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + Total # of objects with small # of attributes: 3 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl new file mode 100644 index 0000000..5ee3adf --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl @@ -0,0 +1,107 @@ +############################# +Expected output for 'h5stat -a 1 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +File information + # of unique groups: 4 + # of unique datasets: 23 + # of unique named datatypes: 0 + # of unique links: 0 + # of unique other: 0 + Max. # of links to object: 1 + Max. # of objects in group: 10 +File space information for file metadata (in bytes): + Superblock: 96 + Superblock extension: 0 + User block: 0 + Object headers: (total/unused) + Groups: 3576/0 + Datasets(exclude compact data): 7896/2912 + Datatypes: 0/0 + Groups: + B-tree/List: 3816 + Heap: 744 + Attributes: + B-tree/List: 0 + Heap: 0 + Chunked datasets: + Index: 0 + Datasets: + Heap: 0 + Shared Messages: + Header: 0 + B-tree/List: 0 + Heap: 0 + Free-space managers: + Header: 0 + Amount of free space: 0 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + Total # of small groups: 3 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 9): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 +Dataset datatype information: + # of unique datatypes used by datasets: 1 + Dataset datatype #0: + Count (total/named) = (23/0) + Size (desc./elmt) = (14/1) + Total dataset datatype count: 23 +Small # of attributes (objects with 1 to 1 attributes): + # of objects with 1 attributes: 2 + Total # of objects with small # of attributes: 2 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_numattrs3.ddl b/tools/h5stat/testfiles/h5stat_numattrs3.ddl new file mode 100644 index 0000000..515b76c --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs3.ddl @@ -0,0 +1,15 @@ +############################# +Expected output for 'h5stat -A --numattrs=25 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small # of attributes (objects with 1 to 25 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + # of objects with 11 attributes: 1 + # of objects with 25 attributes: 1 + Total # of objects with small # of attributes: 5 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 diff --git a/tools/h5stat/testfiles/h5stat_numattrs4.ddl b/tools/h5stat/testfiles/h5stat_numattrs4.ddl new file mode 100644 index 0000000..515a4a9 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs4.ddl @@ -0,0 +1,11 @@ +############################# +Expected output for 'h5stat -A -a 100 h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small # of attributes (objects with 1 to 100 attributes): + # of objects with 100 attributes: 1 + Total # of objects with small # of attributes: 1 +Attribute bins: + # of objects with 100 - 999 attributes: 1 + Total # of objects with attributes: 1 + Max. # of attributes to objects: 100 diff --git a/tools/h5stat/testfiles/h5stat_threshold.h5 b/tools/h5stat/testfiles/h5stat_threshold.h5 Binary files differnew file mode 100644 index 0000000..9f7c8c8 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_threshold.h5 diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl index 6ee8aa8..788421b 100644 --- a/tools/h5stat/testfiles/h5stat_tsohm.ddl +++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl @@ -35,11 +35,11 @@ File space information for file metadata (in bytes): Free-space managers: Header: 0 Amount of free space: 0 -Small groups: - # of groups of size 3: 1 +Small groups (with 0 to 9 links): + # of groups with 3 link(s): 1 Total # of small groups: 1 Group bins: - # of groups of size 1 - 9: 1 + # of groups with 1 - 9 links: 1 Total # of groups: 1 Dataset dimension information: Max. rank of datasets: 2 @@ -47,8 +47,8 @@ Dataset dimension information: # of dataset with rank 2: 3 1-D Dataset information: Max. dimension size of 1-D datasets: 0 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 Dataset storage information: Total raw data size: 0 Total external raw data size: 0 @@ -73,7 +73,7 @@ Dataset datatype information: Count (total/named) = (3/0) Size (desc./elmt) = (14/8) Total dataset datatype count: 3 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: Total # of objects with attributes: 0 diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index ab97698..f780c97 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -13,7 +13,12 @@ # http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have # access to either file, you may request a copy from help@hdfgroup.org. # -# Tests for the h5dump tool +# Tests for the h5stat tool +# +# Modifcations: +# Vailin Choi; July 2013 +# Add tests for -l, -m, -a options +# srcdir=@srcdir@ @@ -72,12 +77,14 @@ LIST_HDF5_TEST_FILES=" $SRC_H5STAT_TESTFILES/h5stat_filters.h5 $SRC_H5STAT_TESTFILES/h5stat_tsohm.h5 $SRC_H5STAT_TESTFILES/h5stat_newgrat.h5 +$SRC_H5STAT_TESTFILES/h5stat_threshold.h5 " LIST_OTHER_TEST_FILES=" $SRC_H5STAT_TESTFILES/h5stat_help1.ddl $SRC_H5STAT_TESTFILES/h5stat_help2.ddl $SRC_H5STAT_TESTFILES/h5stat_notexist.ddl +$SRC_H5STAT_TESTFILES/h5stat_nofile.ddl $SRC_H5STAT_TESTFILES/h5stat_filters.ddl $SRC_H5STAT_TESTFILES/h5stat_filters-file.ddl $SRC_H5STAT_TESTFILES/h5stat_filters-F.ddl @@ -90,6 +97,21 @@ $SRC_H5STAT_TESTFILES/h5stat_tsohm.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat-UG.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat-UA.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_links.ddl +$SRC_H5STAT_TESTFILES/h5stat_links1.ddl +$SRC_H5STAT_TESTFILES/h5stat_links2.ddl +$SRC_H5STAT_TESTFILES/h5stat_links3.ddl +$SRC_H5STAT_TESTFILES/h5stat_links4.ddl +$SRC_H5STAT_TESTFILES/h5stat_links5.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_dims.ddl +$SRC_H5STAT_TESTFILES/h5stat_dims1.ddl +$SRC_H5STAT_TESTFILES/h5stat_dims2.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_numattrs.ddl +$SRC_H5STAT_TESTFILES/h5stat_err2_numattrs.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs1.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs2.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs3.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs4.ddl " # @@ -210,6 +232,7 @@ TOOLTEST h5stat_help1.ddl -h TOOLTEST h5stat_help2.ddl --help # Test when h5stat a file that does not exist TOOLTEST h5stat_notexist.ddl notexist.h5 +TOOLTEST h5stat_nofile.ddl '' # Test file with groups, compressed datasets, user-applied fileters, etc. # h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 @@ -229,6 +252,47 @@ TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5 TOOLTEST h5stat_newgrat.ddl h5stat_newgrat.h5 TOOLTEST h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5 TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 +# +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g +TOOLTEST h5stat_err1_links.ddl -l 0 h5stat_threshold.h5 +TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5 +TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5 +TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5 +# +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 +TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5 +TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5 +# +# Tests for -m (--dims) option on h5stat_threshold.h5 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 +TOOLTEST h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5 +TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5 +TOOLTEST h5stat_dims2.ddl -d --di=15 h5stat_threshold.h5 +# +# Tests for -a option on h5stat_threshold.h5 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 +TOOLTEST h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5 +TOOLTEST h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5 +TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5 +TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5 +TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5 +# +# Tests for -a option on h5stat_newgrat.h5 +# -A -a 100 +TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5 +# if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 3e9c43e..7b43d2e 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -36,10 +36,11 @@ hid_t H5tools_ERR_CLS_g = -1; hid_t H5E_tools_g = -1; hid_t H5E_tools_min_id_g = -1; int compound_data; -FILE *rawattrstream; /* should initialize to stdout but gcc moans about it */ -FILE *rawdatastream; /* should initialize to stdout but gcc moans about it */ -FILE *rawoutstream; /* should initialize to stdout but gcc moans about it */ -FILE *rawerrorstream; /* should initialize to stderr but gcc moans about it */ +FILE *rawattrstream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawdatastream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawinstream = NULL; /* should initialize to stdin but gcc moans about it */ +FILE *rawoutstream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawerrorstream = NULL; /* should initialize to stderr but gcc moans about it */ int bin_output; /* binary output */ int bin_form; /* binary form */ int region_output; /* region output */ @@ -74,7 +75,7 @@ static const char *drivernames[]={ /* This enum should match the entries in the above drivers_list since they * are indexes into the drivers_list array. */ -enum { +typedef enum { SEC2_IDX = 0 ,FAMILY_IDX ,SPLIT_IDX @@ -120,6 +121,8 @@ h5tools_init(void) rawattrstream = stdout; if (!rawdatastream) rawdatastream = stdout; + if (!rawinstream) + rawinstream = stdin; if (!rawoutstream) rawoutstream = stdout; if (!rawerrorstream) @@ -172,6 +175,12 @@ h5tools_close(void) else rawdatastream = NULL; } + if (rawinstream && rawinstream != stdin) { + if (fclose(rawinstream)) + perror("closing rawinstream"); + else + rawinstream = NULL; + } if (rawoutstream && rawoutstream != stdout) { if (fclose(rawoutstream)) perror("closing rawoutstream"); @@ -198,6 +207,254 @@ h5tools_close(void) } /*------------------------------------------------------------------------- + * Function: h5tools_set_data_output_file + * + * Purpose: Open fname as the output file for dataset raw data. + * Set rawdatastream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + * Programmer: Albert Cheng, 2000/09/30 + * + * Modifications: + * pvn June, 1, 2006. Add a switch for binary output + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_data_output_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawdatastream is changed only when succeeded */ + + if (rawdatastream && rawdatastream != stdout) { + if (HDfclose(rawdatastream)) + HDperror("closing rawdatastream"); + else + rawdatastream = NULL; + } + + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawdatastream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawdatastream = f; + retvalue = SUCCEED; + } + } + } + else { + rawdatastream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_attr_output_file + * + * Purpose: Open fname as the output file for attribute raw data. + * Set rawattrstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_attr_output_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawattrstream is changed only when succeeded */ + + if (rawattrstream && rawattrstream != stdout) { + if (HDfclose(rawattrstream)) + HDperror("closing rawattrstream"); + else + rawattrstream = NULL; + } + + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } + } + } + else { + rawattrstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_input_file + * + * Purpose: Open fname as the input file for raw input. + * Set rawinstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_input_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawinstream is changed only when succeeded */ + + if (rawinstream && rawinstream != stdin) { + if (HDfclose(rawinstream)) + HDperror("closing rawinstream"); + else + rawinstream = NULL; + } + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "rb")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "r")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } + } + } + else { + rawinstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_output_file + * + * Purpose: Open fname as the output file for raw output. + * Set rawoutstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_output_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawoutstream is changed only when succeeded */ + + if (rawoutstream && rawoutstream != stdout) { + if (HDfclose(rawoutstream)) + HDperror("closing rawoutstream"); + else + rawoutstream = NULL; + } + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } + } + } + else { + rawoutstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_error_file + * + * Purpose: Open fname as the error output file for dataset raw error. + * Set rawerrorstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_error_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawerrorstream is changed only when succeeded */ + + if (rawerrorstream && rawerrorstream != stderr) { + if (HDfclose(rawerrorstream)) + HDperror("closing rawerrorstream"); + else + rawerrorstream = NULL; + } + + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + } + } + else { + rawerrorstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- * Audience: Private * Chapter: H5Tools Library * Purpose: Get a FAPL for a driver @@ -1468,7 +1725,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, * hssize_t npoints is the number of points in the region *------------------------------------------------------------------------- */ -static int +int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container, int ndims, hid_t type_id, hssize_t npoints) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index efadba4..ea6a44f 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -532,6 +532,7 @@ H5TOOLS_DLLVAR int packed_data_length; /* lengtht of packed bits to display H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */ H5TOOLS_DLLVAR FILE *rawattrstream; /* output stream for raw attribute data */ H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */ +H5TOOLS_DLLVAR FILE *rawinstream; /* input stream for raw input */ H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */ H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */ H5TOOLS_DLLVAR int bin_output; /* binary output */ @@ -549,6 +550,11 @@ H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ /* Definitions of useful routines */ H5TOOLS_DLL void h5tools_init(void); H5TOOLS_DLL void h5tools_close(void); +H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin); H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, char *drivername, size_t drivername_len); H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type); @@ -568,8 +574,6 @@ H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_form h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum); H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts); -H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, - hid_t container, int ndims, hid_t type_id, hssize_t nblocks, hsize_t *ptdata); H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container); H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c index b9fb588..8dee706 100644 --- a/tools/misc/h5mkgrp.c +++ b/tools/misc/h5mkgrp.c @@ -115,7 +115,7 @@ usage: h5mkgrp [OPTIONS] FILE GROUP...\n\ *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char *argv[], param_t *params) +parse_command_line(int argc, const char *argv[], param_t *parms) { int opt; /* Option from command line */ size_t curr_group; /* Current group name to copy */ @@ -136,17 +136,17 @@ parse_command_line(int argc, const char *argv[], param_t *params) /* Create objects with the latest version of the format */ case 'l': - params->latest = TRUE; + parms->latest = TRUE; break; /* Create parent groups */ case 'p': - params->parents = TRUE; + parms->parents = TRUE; break; /* Verbose output */ case 'v': - params->verbose = TRUE; + parms->verbose = TRUE; break; /* Display version */ @@ -169,7 +169,7 @@ parse_command_line(int argc, const char *argv[], param_t *params) } /* end if */ /* Retrieve file name */ - params->fname = HDstrdup(argv[opt_ind]); + parms->fname = HDstrdup(argv[opt_ind]); opt_ind++; /* Check for group(s) to be created */ @@ -180,24 +180,24 @@ parse_command_line(int argc, const char *argv[], param_t *params) } /* end if */ /* Allocate space for the group name pointers */ - params->ngroups = (argc - opt_ind); - params->groups = HDmalloc(params->ngroups * sizeof(char *)); + parms->ngroups = (argc - opt_ind); + parms->groups = HDmalloc(parms->ngroups * sizeof(char *)); /* Retrieve the group names */ curr_group = 0; while(opt_ind < argc) { - params->groups[curr_group] = HDstrdup(argv[opt_ind]); + parms->groups[curr_group] = HDstrdup(argv[opt_ind]); curr_group++; opt_ind++; } /* end while */ #ifdef QAK -HDfprintf(stderr, "params->parents = %t\n", params->parents); -HDfprintf(stderr, "params->verbose = %t\n", params->verbose); -HDfprintf(stderr, "params->fname = '%s'\n", params->fname); -HDfprintf(stderr, "params->ngroups = %Zu\n", params->ngroups); -for(curr_group = 0; curr_group < params->ngroups; curr_group++) - HDfprintf(stderr, "params->group[%Zu] = '%s'\n", curr_group, params->groups[curr_group]); +HDfprintf(stderr, "parms->parents = %t\n", parms->parents); +HDfprintf(stderr, "parms->verbose = %t\n", parms->verbose); +HDfprintf(stderr, "parms->fname = '%s'\n", parms->fname); +HDfprintf(stderr, "parms->ngroups = %Zu\n", parms->ngroups); +for(curr_group = 0; curr_group < parms->ngroups; curr_group++) + HDfprintf(stderr, "parms->group[%Zu] = '%s'\n", curr_group, parms->groups[curr_group]); #endif /* QAK */ return(0); diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index d41dfc9..07f6bfd 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -301,7 +301,7 @@ main (int argc, char *argv[]) n = blk_size; if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset); if (left_overs) { - n = (size_t)MIN (n, left_overs); + n = (size_t)MIN ((off_t)n, left_overs); left_overs -= n; need_write = FALSE; } else if (src_offset<src_act_size) { diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index b735b18..2a59a32 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,3 +125,11 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + diff --git a/tools/testfiles/tall-7.ddl b/tools/testfiles/tall-7.ddl new file mode 100644 index 0000000..f0ad5ea --- /dev/null +++ b/tools/testfiles/tall-7.ddl @@ -0,0 +1,9 @@ +HDF5 "tall.h5" { +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + DATA { + (0): 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + } +} +} diff --git a/tools/testfiles/tall-7N.ddl b/tools/testfiles/tall-7N.ddl new file mode 100644 index 0000000..cba5774 --- /dev/null +++ b/tools/testfiles/tall-7N.ddl @@ -0,0 +1,17 @@ +HDF5 "tall.h5" { +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + DATA { + (0): 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + } +} +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + (0): 49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32, 111, + (15): 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } +} +} diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index e8d6d84..1ad1249 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: missing file name diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index 06c5613..1468ad1 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index ffd9910..557f2a7 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index a54812b..342e4e8 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 1a8dd11..eb569d2 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 7527131..a00b561 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 21b573d..aa6e79b 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -1,35 +1,33 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +35,29 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,20 +73,13 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -93,7 +94,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 @@ -124,4 +125,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + h5dump error: Bad mask list(-1,1) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 7085a06..ada9370 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.156" +#define H5_PACKAGE_STRING "HDF5 1.9.162" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.156" +#define H5_PACKAGE_VERSION "1.9.162" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.156" +#define H5_VERSION "1.9.162" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ |