From d6ecc0d44841cc7248b5eb36c20c3a7e7b33b9e6 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sun, 3 Apr 2011 23:35:33 -0500 Subject: [svn-r20408] Description: Bring r20382:20407 from trunk to revise_chunks branch. Tested on: Linux/32 2.6 (chicago) w/C++ --- CMakeLists.txt | 84 ++++++++++++++------------- MANIFEST | 7 ++- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/freebsd | 6 +- config/lt_vers.am | 2 +- configure | 22 +++---- configure.in | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 5 +- src/H5F.c | 9 +-- src/H5G.c | 66 --------------------- src/H5Gloc.c | 52 +---------------- src/H5Gpkg.h | 6 +- src/H5Gprivate.h | 5 +- src/H5Groot.c | 100 ++++++++++++++++++++++++++++++++ src/H5Lexternal.c | 2 +- src/H5public.h | 4 +- src/Makefile.in | 2 +- tools/h5diff/CMakeLists.txt | 39 +++++++++++++ tools/h5diff/h5diff_common.c | 12 +--- tools/h5diff/h5diffgentest.c | 15 +++-- tools/h5diff/testfiles/h5diff_10.txt | 12 +--- tools/h5diff/testfiles/h5diff_101.txt | 11 ++-- tools/h5diff/testfiles/h5diff_101w.txt | 11 ++-- tools/h5diff/testfiles/h5diff_102.txt | 8 +-- tools/h5diff/testfiles/h5diff_102w.txt | 8 +-- tools/h5diff/testfiles/h5diff_103.txt | 8 +++ tools/h5diff/testfiles/h5diff_103w.txt | 8 +++ tools/h5diff/testfiles/h5diff_104.txt | 8 +++ tools/h5diff/testfiles/h5diff_104w.txt | 8 +++ tools/h5diff/testfiles/h5diff_600.txt | 12 +--- tools/h5diff/testfiles/h5diff_603.txt | 12 +--- tools/h5diff/testfiles/h5diff_606.txt | 12 +--- tools/h5diff/testfiles/h5diff_612.txt | 12 +--- tools/h5diff/testfiles/h5diff_615.txt | 12 +--- tools/h5diff/testfiles/h5diff_621.txt | 12 +--- tools/h5diff/testfiles/h5diff_622.txt | 12 +--- tools/h5diff/testfiles/h5diff_623.txt | 12 +--- tools/h5diff/testfiles/h5diff_624.txt | 12 +--- tools/h5diff/testfiles/h5diff_basic1.h5 | Bin 11432 -> 11432 bytes tools/h5diff/testh5diff.sh | 8 +++ tools/lib/h5diff_array.c | 6 +- vms/src/h5pubconf.h | 6 +- windows/src/H5pubconf.h | 6 +- windows/tools/h5diff/testh5diff.bat | 14 ++++- 49 files changed, 352 insertions(+), 330 deletions(-) create mode 100644 tools/h5diff/testfiles/h5diff_103.txt create mode 100644 tools/h5diff/testfiles/h5diff_103w.txt create mode 100644 tools/h5diff/testfiles/h5diff_104.txt create mode 100644 tools/h5diff/testfiles/h5diff_104w.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dfe687..5bfabef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,54 +546,56 @@ ENDIF (HDF5_ENABLE_SZIP_SUPPORT) # Option for external libraries on windows #----------------------------------------------------------------------------- OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF) -IF (HDF5_PACKAGE_EXTLIBS) - SET (EXTERNAL_HEADER_LIST "") - SET (EXTERNAL_LIBRARY_LIST "") - SET (EXTERNAL_LIBRARYDLL_LIST "") - FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) - - IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) - ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - - IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) - PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) - ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) -ENDIF (HDF5_PACKAGE_EXTLIBS) - -IF (WIN32 AND NOT CYGWIN) - IF (BUILD_SHARED_LIBS) +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + IF (HDF5_PACKAGE_EXTLIBS) + SET (EXTERNAL_HEADER_LIST "") + SET (EXTERNAL_LIBRARY_LIST "") + SET (EXTERNAL_LIBRARYDLL_LIST "") FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) + IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE) - # MESSAGE (STATUS "ZLIB_DLL_NAME: ${ZLIB_DLL_NAME}") - GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH) - # MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}") - ADD_CUSTOM_TARGET (ZLIB-Release-Copy ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ - COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" - ) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ADD_DEPENDENCIES (ZLIB-Release-Copy ZLIB) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) - GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE) - # MESSAGE (STATUS "SZIP_DLL_NAME: ${SZIP_DLL_NAME}") - GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH) - # MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}") - ADD_CUSTOM_TARGET (SZIP-Release-Copy ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ - COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" - ) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ADD_DEPENDENCIES (SZIP-Release-Copy SZIP) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + ENDIF (HDF5_PACKAGE_EXTLIBS) + + IF (WIN32 AND NOT CYGWIN) + IF (BUILD_SHARED_LIBS) + FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) + IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) + GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE) + # MESSAGE (STATUS "ZLIB_DLL_NAME: ${ZLIB_DLL_NAME}") + GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH) + # MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}") + ADD_CUSTOM_TARGET (ZLIB-Release-Copy ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ + COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" + ) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ADD_DEPENDENCIES (ZLIB-Release-Copy ZLIB) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - ENDIF (BUILD_SHARED_LIBS) -ENDIF (WIN32 AND NOT CYGWIN) + IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE) + # MESSAGE (STATUS "SZIP_DLL_NAME: ${SZIP_DLL_NAME}") + GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH) + # MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}") + ADD_CUSTOM_TARGET (SZIP-Release-Copy ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ + COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" + ) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ADD_DEPENDENCIES (SZIP-Release-Copy SZIP) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + + ENDIF (BUILD_SHARED_LIBS) + ENDIF (WIN32 AND NOT CYGWIN) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) #----------------------------------------------------------------------------- # Option to use threadsafe diff --git a/MANIFEST b/MANIFEST index 9d3fc50..660e50a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1615,9 +1615,14 @@ ./tools/h5diff/testfiles/h5diff_90.txt ./tools/h5diff/testfiles/h5diff_100.txt ./tools/h5diff/testfiles/h5diff_101.txt -./tools/h5diff/testfiles/h5diff_101w.txt ./tools/h5diff/testfiles/h5diff_102.txt +./tools/h5diff/testfiles/h5diff_103.txt +./tools/h5diff/testfiles/h5diff_104.txt +# w for Windows-specific +./tools/h5diff/testfiles/h5diff_101w.txt ./tools/h5diff/testfiles/h5diff_102w.txt +./tools/h5diff/testfiles/h5diff_103w.txt +./tools/h5diff/testfiles/h5diff_104w.txt ./tools/h5diff/testfiles/h5diff_200.txt ./tools/h5diff/testfiles/h5diff_201.txt ./tools/h5diff/testfiles/h5diff_202.txt diff --git a/README.txt b/README.txt index 862674a..2743eed 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.80-FA_a5 currently under development +HDF5 version 1.9.81-FA_a5 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 4e4f669..4089ad6 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -405,7 +405,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 # Include src directory diff --git a/config/freebsd b/config/freebsd index 7452ff0..acba521 100644 --- a/config/freebsd +++ b/config/freebsd @@ -29,9 +29,9 @@ fi # Add "_XOPEN_SOURCE" define to cpp flags, to quiet warnings # from /usr/include/sys/cdefs.h # (Unless we are using g++ as a C compiler) -if test "X-g++" != "X-$CC"; then - H5_CPPFLAGS="$H5_CPPFLAGS -D_XOPEN_SOURCE=600" -fi +#if test "X-g++" != "X-$CC"; then +# H5_CPPFLAGS="$H5_CPPFLAGS -D_XOPEN_SOURCE=600" +#fi # Figure out C compiler flags . $srcdir/config/gnu-flags diff --git a/config/lt_vers.am b/config/lt_vers.am index 7db6cff..0aea0b4 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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 8e851d0..8596df0 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Id: configure.in 20146 2011-02-22 20:37:06Z koziol . +# From configure.in Id: configure.in 20383 2011-03-31 20:39:18Z koziol . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for HDF5 1.9.80-FA_a5. +# Generated by GNU Autoconf 2.68 for HDF5 1.9.81-FA_a5. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.80-FA_a5' -PACKAGE_STRING='HDF5 1.9.80-FA_a5' +PACKAGE_VERSION='1.9.81-FA_a5' +PACKAGE_STRING='HDF5 1.9.81-FA_a5' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1450,7 +1450,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.80-FA_a5 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.81-FA_a5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1520,7 +1520,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.80-FA_a5:";; + short | recursive ) echo "Configuration of HDF5 1.9.81-FA_a5:";; esac cat <<\_ACEOF @@ -1709,7 +1709,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.80-FA_a5 +HDF5 configure 1.9.81-FA_a5 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2798,7 +2798,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.80-FA_a5, which was +It was created by HDF5 $as_me 1.9.81-FA_a5, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3619,7 +3619,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.80-FA_a5' + VERSION='1.9.81-FA_a5' cat >>confdefs.h <<_ACEOF @@ -30112,7 +30112,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.80-FA_a5, which was +This file was extended by HDF5 $as_me 1.9.81-FA_a5, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30178,7 +30178,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.80-FA_a5 +HDF5 config.status 1.9.81-FA_a5 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 6911f13..dd8e3ad 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.80-FA_a5], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.81-FA_a5], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index c5a16bc..b27920e 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -439,7 +439,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 5e31fcf..fb36b37 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -395,7 +395,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 7f8a35f..1c4a084 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -404,7 +404,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 1254154..e04985d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -395,7 +395,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 0d56d45..c907a4f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.80-FA_a5 currently under development +HDF5 version 1.9.81-FA_a5 currently under development ================================================================================ @@ -514,6 +514,9 @@ Bug Fixes since HDF5-1.8.0 release HDF5 error stack messages for HDF5 tools. h5ls and h5dump for now. For h5ls, this replaces "-e/--errors" option, which is deprecated. Bug#2182 (JKM 2011/3/30) + - Fix h5diff for --use-system-epsilon option: the calculation changed + from ( |a - b| / b ) to ( |a - b| ). This was decided for better + performance. Bug#2184 (JKM 2011/3/24) - Fixed output for H5T_REFERENCE in h5dump. According to the BNF document the output of a H5T_REFERENCE should be followed by the type; ::= H5T_REFERENCE { } diff --git a/src/H5F.c b/src/H5F.c index 13f469e..282e0d8 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1053,13 +1053,8 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) * the memory associated with it. */ if(f->shared->root_grp) { - /* Free the ID to name buffer */ - if(H5G_free_grp_name(f->shared->root_grp) < 0) - /* Push error, but keep going*/ - HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file") - - /* Free the memory for the root group */ - if(H5G_free(f->shared->root_grp) < 0) + /* Free the root group */ + if(H5G_root_free(f->shared->root_grp) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file") f->shared->root_grp = NULL; diff --git a/src/H5G.c b/src/H5G.c index c6210bc..f871d6a 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -1211,38 +1211,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G_free - * - * Purpose: Free memory used by an H5G_t struct (and its H5G_shared_t). - * Does not close the group or decrement the reference count. - * Used to free memory used by the root group. - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: James Laird - * Tuesday, September 7, 2004 - * - *------------------------------------------------------------------------- - */ -herr_t -H5G_free(H5G_t *grp) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5G_free, FAIL) - - HDassert(grp && grp->shared); - - grp->shared = H5FL_FREE(H5G_shared_t, grp->shared); - grp = H5FL_FREE(H5G_t, grp); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_free() */ - - -/*------------------------------------------------------------------------- * Function: H5G_oloc * * Purpose: Returns a pointer to the object location for a group. @@ -1315,40 +1283,6 @@ H5G_fileof(H5G_t *grp) /*------------------------------------------------------------------------- - * Function: H5G_free_grp_name - * - * Purpose: Free the 'ID to name' buffers. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: August 22, 2002 - * - * Comments: Used now only on the root group close, in H5F_close() - * - *------------------------------------------------------------------------- - */ -herr_t -H5G_free_grp_name(H5G_t *grp) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5G_free_grp_name, FAIL) - - /* Check args */ - HDassert(grp && grp->shared); - HDassert(grp->shared->fo_count > 0); - - /* Free the path */ - H5G_name_free(&(grp->path)); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_free_grp_name() */ - - -/*------------------------------------------------------------------------- * Function: H5G_get_shared_count * * Purpose: Queries the group object's "shared count" diff --git a/src/H5Gloc.c b/src/H5Gloc.c index cfa4f44..23db587 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -173,7 +173,7 @@ H5G_loc(hid_t loc_id, H5G_loc_t *loc) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file ID") /* Construct a group location for root group of the file */ - if(H5G_loc_root(f, loc) < 0) + if(H5G_root_loc(f, loc) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file") } /* end case */ break; @@ -259,56 +259,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G_loc_root - * - * Purpose: Construct a "group location" for the root group of a file - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 5 2007 - * - *------------------------------------------------------------------------- - */ -herr_t -H5G_loc_root(H5F_t *f, H5G_loc_t *loc) -{ - H5G_t *root_grp; /* Pointer to root group's info */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5G_loc_root, FAIL) - - HDassert(f); - HDassert(loc); - - /* Retrieve the root group for the file */ - root_grp = H5G_rootof(f); - HDassert(root_grp); - - /* Build the group location for the root group */ - if(NULL == (loc->oloc = H5G_oloc(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") - if(NULL == (loc->path = H5G_nameof(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") - - /* Patch up root group's object location to reflect this file */ - /* (Since the root group info is only stored once for files which - * share an underlying low-level file) - */ - /* (but only for non-mounted files) */ - if(!H5F_is_mount(f)) { - loc->oloc->file = f; - loc->oloc->holding_file = FALSE; - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_loc_root() */ - - -/*------------------------------------------------------------------------- * Function: H5G_loc_copy * * Purpose: Copy over information for a location diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index f9bc41e..78e66d0 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -590,11 +590,15 @@ H5_DLL H5RS_str_t *H5G_build_fullpath_refstr_str(H5RS_str_t *path_r, const char /* * These functions operate on group "locations" */ -H5_DLL herr_t H5G_loc_root(H5F_t *f, H5G_loc_t *loc); H5_DLL herr_t H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth); H5_DLL herr_t H5G_loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id); +/* + * These functions operate on the root group + */ +H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc); + /* Testing functions */ #ifdef H5G_TESTING H5_DLL htri_t H5G_is_empty_test(hid_t gid); diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 05de2ba..140e22f 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -149,15 +149,14 @@ typedef struct H5G_entry_t H5G_entry_t; * Library prototypes... These are the ones that other packages routinely * call. */ -H5_DLL herr_t H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root); H5_DLL struct H5O_loc_t *H5G_oloc(H5G_t *grp); +H5_DLL herr_t H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root); +H5_DLL herr_t H5G_root_free(H5G_t *grp); H5_DLL H5G_t *H5G_rootof(H5F_t *f); H5_DLL H5G_name_t * H5G_nameof(H5G_t *grp); H5_DLL H5F_t *H5G_fileof(H5G_t *grp); -H5_DLL herr_t H5G_free(H5G_t *grp); H5_DLL H5G_t *H5G_open(const H5G_loc_t *loc, hid_t dxpl_id); H5_DLL herr_t H5G_close(H5G_t *grp); -H5_DLL herr_t H5G_free_grp_name(H5G_t *grp); H5_DLL herr_t H5G_get_shared_count(H5G_t *grp); H5_DLL herr_t H5G_mount(H5G_t *grp); H5_DLL hbool_t H5G_mounted(H5G_t *grp); diff --git a/src/H5Groot.c b/src/H5Groot.c index ff4a8c4..a7d7e29 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -68,9 +68,25 @@ H5G_rootof(H5F_t *f) { FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_rootof) + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + + /* Walk to top of mounted files */ while(f->parent) f = f->parent; + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + HDassert(f->shared->root_grp); + + /* Check to see if the root group was opened through a different + * "top" file, and switch it to point at the current "top" file. + */ + if(f->shared->root_grp->oloc.file != f) + f->shared->root_grp->oloc.file = f; + FUNC_LEAVE_NOAPI(f->shared->root_grp) } /* end H5G_rootof() */ @@ -277,3 +293,87 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_mkroot() */ + +/*------------------------------------------------------------------------- +* Function: H5G_root_free +* +* Purpose: Free memory used by an H5G_t struct (and its H5G_shared_t). +* Does not close the group or decrement the reference count. +* Used to free memory used by the root group. +* +* Return: Success: Non-negative +* Failure: Negative +* +* Programmer: James Laird +* Tuesday, September 7, 2004 +* +*------------------------------------------------------------------------- +*/ +herr_t +H5G_root_free(H5G_t *grp) +{ + FUNC_ENTER_NOAPI_NOFUNC(H5G_root_free) + + /* Check args */ + HDassert(grp && grp->shared); + HDassert(grp->shared->fo_count > 0); + + /* Free the path */ + H5G_name_free(&(grp->path)); + + grp->shared = H5FL_FREE(H5G_shared_t, grp->shared); + grp = H5FL_FREE(H5G_t, grp); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5G_root_free() */ + + +/*------------------------------------------------------------------------- + * Function: H5G_root_loc + * + * Purpose: Construct a "group location" for the root group of a file + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 5 2007 + * + *------------------------------------------------------------------------- + */ +herr_t +H5G_root_loc(H5F_t *f, H5G_loc_t *loc) +{ + H5G_t *root_grp; /* Pointer to root group's info */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5G_root_loc, FAIL) + + HDassert(f); + HDassert(loc); + + /* Retrieve the root group for the file */ + root_grp = H5G_rootof(f); + HDassert(root_grp); + + /* Build the group location for the root group */ + if(NULL == (loc->oloc = H5G_oloc(root_grp))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + if(NULL == (loc->path = H5G_nameof(root_grp))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + + /* Patch up root group's object location to reflect this file */ + /* (Since the root group info is only stored once for files which + * share an underlying low-level file) + */ + /* (but only for non-mounted files) */ + if(!H5F_is_mount(f)) { + loc->oloc->file = f; + loc->oloc->holding_file = FALSE; + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5G_root_loc() */ + diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 9be21dd..29ae754 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -434,7 +434,7 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group, /* Retrieve the "group location" for the file's root group */ - if(H5G_loc_root(ext_file, &root_loc) < 0) + if(H5G_root_loc(ext_file, &root_loc) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file") /* Open the object referenced in the external file */ diff --git a/src/H5public.h b/src/H5public.h index 76ce8d5..29633d4 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 80 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 81 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "FA_a5" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.80-FA_a5" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.81-FA_a5" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 1e72c64..411f6e6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -461,7 +461,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 = 70 +LT_VERS_REVISION = 71 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 48ba8e6..97c3a3c 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -45,6 +45,8 @@ IF (BUILD_TESTING) h5diff_100.txt #h5diff_101.txt #h5diff_102.txt + #h5diff_103.txt + #h5diff_104.txt h5diff_11.txt h5diff_12.txt h5diff_13.txt @@ -260,6 +262,19 @@ IF (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt ) + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/h5diff_103.txt + ) + + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/h5diff_104.txt + ) ELSE (WIN32 AND NOT CYGWIN) ADD_CUSTOM_COMMAND ( TARGET h5diff @@ -274,6 +289,19 @@ IF (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt ) + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt ${PROJECT_BINARY_DIR}/h5diff_103.txt + ) + + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt ${PROJECT_BINARY_DIR}/h5diff_104.txt + ) ENDIF (WIN32 AND NOT CYGWIN) ############################################################################## @@ -371,6 +399,10 @@ IF (BUILD_TESTING) h5diff_101.out.err h5diff_102.out h5diff_102.out.err + h5diff_103.out + h5diff_103.out.err + h5diff_104.out + h5diff_104.out.err h5diff_11.out h5diff_11.out.err h5diff_12.out @@ -935,6 +967,13 @@ ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2) ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2) +# with --use-system-epsilon for double value. expect less differences +ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1 +g1/d2) + +# with --use-system-epsilon for float value. expect less differences +ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 +g1/fp2) # not comparable -c flag ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index da420b0..e0af7f6 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -485,17 +485,11 @@ void usage(void) printf(" number.\n"); printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive\n"); printf(" number.\n"); - printf(" --use-system-epsilon Print difference if (|a-b| > EPSILON),\n"); - printf(" where EPSILON (FLT_EPSILON or FLT_EPSILON) is the\n"); - printf(" system epsilon value. \n"); - printf(" If the system epsilon is not defined, use the value\n"); - printf(" below:\n"); + printf(" --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is\n"); + printf(" a system epsilon value.\n"); + printf(" The system epsilon values are defined as below:\n"); printf(" FLT_EPSILON = 1.19209E-07 for float\n"); printf(" DBL_EPSILON = 2.22045E-16 for double\n"); - printf(" -d, -p, and --use-system-epsilon options are used for\n"); - printf(" comparing floating point values.\n"); - printf(" By default, strict equality is used. Use -p or -d to\n"); - printf(" set specific tolerance.\n"); printf(" --exclude-path \"path\" Exclude the specified path to an object when\n"); printf(" comparing files or groups. If a group is excluded,\n"); printf(" all member objects will also be excluded.\n"); diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 8b9c879..da3c5f8 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -324,11 +324,16 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - /* epsilon = 0.00001 */ - float data11[3][2] ={{0.00000f,0.00001f},{0.00001f, 0.00000f},{0.00001f,0.00001f}}; - float data12[3][2] ={{0.00000f,0.00002f},{0.000009f,0.00001f},{0.00000f,0.00001f}}; - double data13[3][2] ={{0.000000000,0.000000001},{0.000000001, 0.000000000},{0.000000001,0.000000001}}; - double data14[3][2] ={{0.000000000,0.000000002},{0.0000000009,0.000000001},{0.000000000,0.000000001}}; + /* epsilon = 0.0000001 = 1e-7 + * system epsilon for float : FLT_EPSILON = 1.19209E-07 + */ + float data11[3][2] ={{0.000000f,0.0000001f},{0.0000001f, 0.00000022f},{0.0000001f,0.0000001f}}; + float data12[3][2] ={{0.000000f,0.0000002f},{0.0000003f,0.0000001f},{0.000000f,0.0000001f}}; + /* epsilon = 0.0000000000000001 = 1e-16 + * system epsilon for double : DBL_EPSILON = 2.22045E-16 + */ + double data13[3][2] ={{0.0000000000000000, 0.0000000000000001},{0.0000000000000001, 0.0000000000000000},{0.00000000000000033, 0.0000000000000001}}; + double data14[3][2] ={{0.0000000000000000, 0.0000000000000004},{0.0000000000000002, 0.0000000000000001},{0.0000000000000001, 0.00000000000000000}}; write_dset(gid1,2,dims2,"fp1",H5T_NATIVE_FLOAT,data11); write_dset(gid1,2,dims2,"fp2",H5T_NATIVE_FLOAT,data12); diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index 0b354df..8d6fc82 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -60,17 +60,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_101.txt b/tools/h5diff/testfiles/h5diff_101.txt index 1d0f38d..f915439 100644 --- a/tools/h5diff/testfiles/h5diff_101.txt +++ b/tools/h5diff/testfiles/h5diff_101.txt @@ -2,9 +2,10 @@ dataset: and size: [3x2] [3x2] position d1 d2 difference ------------------------------------------------------------ -[ 0 1 ] 1e-09 2e-09 1e-09 -[ 1 0 ] 1e-09 9e-10 1e-10 -[ 1 1 ] 0 1e-09 1e-09 -[ 2 0 ] 1e-09 0 1e-09 -4 differences found +[ 0 1 ] 1e-16 4e-16 3e-16 +[ 1 0 ] 1e-16 2e-16 1e-16 +[ 1 1 ] 0 1e-16 1e-16 +[ 2 0 ] 3.3e-16 1e-16 2.3e-16 +[ 2 1 ] 1e-16 0 1e-16 +5 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_101w.txt b/tools/h5diff/testfiles/h5diff_101w.txt index 59176a2..d1f49da 100755 --- a/tools/h5diff/testfiles/h5diff_101w.txt +++ b/tools/h5diff/testfiles/h5diff_101w.txt @@ -2,9 +2,10 @@ dataset: and size: [3x2] [3x2] position d1 d2 difference ------------------------------------------------------------ -[ 0 1 ] 1e-009 2e-009 1e-009 -[ 1 0 ] 1e-009 9e-010 1e-010 -[ 1 1 ] 0 1e-009 1e-009 -[ 2 0 ] 1e-009 0 1e-009 -4 differences found +[ 0 1 ] 1e-016 4e-016 3e-016 +[ 1 0 ] 1e-016 2e-016 1e-016 +[ 1 1 ] 0 1e-016 1e-016 +[ 2 0 ] 3.3e-016 1e-016 2.3e-016 +[ 2 1 ] 1e-016 0 1e-016 +5 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_102.txt b/tools/h5diff/testfiles/h5diff_102.txt index 30a2491..476067b 100644 --- a/tools/h5diff/testfiles/h5diff_102.txt +++ b/tools/h5diff/testfiles/h5diff_102.txt @@ -2,9 +2,9 @@ dataset: and size: [3x2] [3x2] position fp1 fp2 difference ------------------------------------------------------------ -[ 0 1 ] 1e-05 2e-05 1e-05 -[ 1 0 ] 1e-05 9e-06 9.99999e-07 -[ 1 1 ] 0 1e-05 1e-05 -[ 2 0 ] 1e-05 0 1e-05 +[ 0 1 ] 1e-07 2e-07 1e-07 +[ 1 0 ] 1e-07 3e-07 2e-07 +[ 1 1 ] 2.2e-07 1e-07 1.2e-07 +[ 2 0 ] 1e-07 0 1e-07 4 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_102w.txt b/tools/h5diff/testfiles/h5diff_102w.txt index 36a254e..dda3581 100755 --- a/tools/h5diff/testfiles/h5diff_102w.txt +++ b/tools/h5diff/testfiles/h5diff_102w.txt @@ -2,9 +2,9 @@ dataset: and size: [3x2] [3x2] position fp1 fp2 difference ------------------------------------------------------------ -[ 0 1 ] 1e-005 2e-005 1e-005 -[ 1 0 ] 1e-005 9e-006 9.99999e-007 -[ 1 1 ] 0 1e-005 1e-005 -[ 2 0 ] 1e-005 0 1e-005 +[ 0 1 ] 1e-007 2e-007 1e-007 +[ 1 0 ] 1e-007 3e-007 2e-007 +[ 1 1 ] 2.2e-007 1e-007 1.2e-007 +[ 2 0 ] 1e-007 0 1e-007 4 differences found EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_103.txt b/tools/h5diff/testfiles/h5diff_103.txt new file mode 100644 index 0000000..5700459 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_103.txt @@ -0,0 +1,8 @@ +dataset: and +size: [3x2] [3x2] +position d1 d2 difference +------------------------------------------------------------ +[ 0 1 ] 1e-16 4e-16 3e-16 +[ 2 0 ] 3.3e-16 1e-16 2.3e-16 +2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_103w.txt b/tools/h5diff/testfiles/h5diff_103w.txt new file mode 100644 index 0000000..b1abea2 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_103w.txt @@ -0,0 +1,8 @@ +dataset: and +size: [3x2] [3x2] +position d1 d2 difference +------------------------------------------------------------ +[ 0 1 ] 1e-016 4e-016 3e-016 +[ 2 0 ] 3.3e-016 1e-016 2.3e-016 +2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_104.txt b/tools/h5diff/testfiles/h5diff_104.txt new file mode 100644 index 0000000..2997f10 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_104.txt @@ -0,0 +1,8 @@ +dataset: and +size: [3x2] [3x2] +position fp1 fp2 difference +------------------------------------------------------------ +[ 1 0 ] 1e-07 3e-07 2e-07 +[ 1 1 ] 2.2e-07 1e-07 1.2e-07 +2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_104w.txt b/tools/h5diff/testfiles/h5diff_104w.txt new file mode 100644 index 0000000..28ef705 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_104w.txt @@ -0,0 +1,8 @@ +dataset: and +size: [3x2] [3x2] +position fp1 fp2 difference +------------------------------------------------------------ +[ 1 0 ] 1e-007 3e-007 2e-007 +[ 1 1 ] 2.2e-007 1e-007 1.2e-007 +2 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index efc05a8..e6e4607 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -60,17 +60,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index c66c650..7b917d4 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index 705ae3e..110986a 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index d38e9d4..782f5b4 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index 4b95ea1..f816510 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index 56ed724..8dc8824 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index 6e2db1b..f2f2089 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index 910f4f0..840b127 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index e301645..1d433a7 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -61,17 +61,11 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] number. -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive number. - --use-system-epsilon Print difference if (|a-b| > EPSILON), - where EPSILON (FLT_EPSILON or FLT_EPSILON) is the - system epsilon value. - If the system epsilon is not defined, use the value - below: + --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is + a system epsilon value. + The system epsilon values are defined as below: FLT_EPSILON = 1.19209E-07 for float DBL_EPSILON = 2.22045E-16 for double - -d, -p, and --use-system-epsilon options are used for - comparing floating point values. - By default, strict equality is used. Use -p or -d to - set specific tolerance. --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. diff --git a/tools/h5diff/testfiles/h5diff_basic1.h5 b/tools/h5diff/testfiles/h5diff_basic1.h5 index 4ed83c8..4f3cf9a 100644 Binary files a/tools/h5diff/testfiles/h5diff_basic1.h5 and b/tools/h5diff/testfiles/h5diff_basic1.h5 differ diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 2b193a1..62749c1 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -603,10 +603,18 @@ else fi # 11. floating point comparison +# double value TOOLTEST h5diff_101.txt -v $FILE1 $FILE1 g1/d1 g1/d2 +# float value TOOLTEST h5diff_102.txt -v $FILE1 $FILE1 g1/fp1 g1/fp2 +# with --use-system-epsilon for double value +TOOLTEST h5diff_103.txt -v --use-system-epsilon $FILE1 $FILE1 g1/d1 g1/d2 + +# with --use-system-epsilon for float value +TOOLTEST h5diff_104.txt -v --use-system-epsilon $FILE1 $FILE1 g1/fp1 g1/fp2 + # not comparable -c flag TOOLTEST h5diff_200.txt $FILE2 $FILE2 g2/dset1 g2/dset2 diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 9a609b5..c4c8dbf 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -5550,7 +5550,7 @@ error: /*------------------------------------------------------------------------- * Function: equal_double * - * Purpose: use a relative error formula to deal with floating point + * Purpose: use a absolute error formula to deal with floating point * uncertainty * * Modifications: @@ -5604,7 +5604,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options) /*------------------------------------------------------------------------- * Function: equal_ldouble * - * Purpose: use a relative error formula to deal with floating point + * Purpose: use a absolute error formula to deal with floating point * uncertainty * *------------------------------------------------------------------------- @@ -5660,7 +5660,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio /*------------------------------------------------------------------------- * Function: equal_float * - * Purpose: use a relative error formula to deal with floating point + * Purpose: use a absolute error formula to deal with floating point * uncertainty * * Modifications: diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 51897c8..57ed359 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -489,13 +489,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.80-FA_a5" +#define H5_PACKAGE_STRING "HDF5 1.9.81-FA_a5" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.80-FA_a5" +#define H5_PACKAGE_VERSION "1.9.81-FA_a5" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -651,7 +651,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.80-FA_a5" +#define H5_VERSION "1.9.81-FA_a5" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index d86e76f..eed67b4 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -483,13 +483,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.80-FA_a5" +#define H5_PACKAGE_STRING "HDF5 1.9.81-FA_a5" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.80-FA_a5" +#define H5_PACKAGE_VERSION "1.9.81-FA_a5" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -646,7 +646,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.80-FA_a5" +#define H5_VERSION "1.9.81-FA_a5" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat index e960dd7..9b73b60 100644 --- a/windows/tools/h5diff/testh5diff.bat +++ b/windows/tools/h5diff/testh5diff.bat @@ -602,8 +602,8 @@ rem ############################################################################ rem 11. floating point comparison rem Not tested on Windows due to difference in formatting of scientific - rem notation --SJW 8/23/07 - call :testing h5diff_101.txt -v %srcfile1% %srcfile1% g1/d1 g1/d2 + rem notation (101, 102) --SJW 8/23/07 + call :testing %h5diff% -v %srcfile1% %srcfile1% g1/d1 g1/d2 rem call :tooltest h5diff_101.txt -v %file1% %file1% g1/d1 g1/d2 call :results -SKIP- @@ -611,6 +611,16 @@ rem ############################################################################ rem call :tooltest h5diff_102.txt -v %file1% %file1% g1/fp1 g1/fp2 call :results -SKIP- + rem Not tested on Windows due to difference in formatting of scientific + rem notation with other OS. printf("%g") (103, 104) + call :testing %h5diff% -v --use-system-epsilon %srcfile1% %srcfile1% g1/d1 g1/d2 + rem call :tooltest h5diff_103.txt -v --use-system-epsilon %file1% %file1% g1/d1 g1/d2 + call :results -SKIP- + + call :testing %h5diff% -v --use-system-epsilon %srcfile1% %srcfile1% g1/fp1 g1/fp2 + rem call :tooltest h5diff_102.txt -v --use-system-epsilon %file1% %file1% g1/fp1 g1/fp2 + call :results -SKIP- + rem New option added #1368(E1) - ADB 2/5/2009 rem not compable -c flag call :testing %h5diff% %srcfile2% %srcfile2% g2/dset1 g2/dset2 -- cgit v0.12