summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-05-25 20:07:36 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-05-25 20:07:36 (GMT)
commit35aec6ab2ca6018a6f5babc943d29957d6595f67 (patch)
tree282a755d50dca6d329f02b62892bfbdebe36bb1c
parent2e6d95a1a1dd32a6809b4a584e07b4803b3e4c5d (diff)
parent53c5b41ec2068aa45982af071a1e3c707326851f (diff)
downloadhdf5-35aec6ab2ca6018a6f5babc943d29957d6595f67.zip
hdf5-35aec6ab2ca6018a6f5babc943d29957d6595f67.tar.gz
hdf5-35aec6ab2ca6018a6f5babc943d29957d6595f67.tar.bz2
Merge branch 'develop' into gcc_flag_cull
-rw-r--r--CMakeLists.txt5
-rw-r--r--MANIFEST4
-rw-r--r--configure.ac19
-rw-r--r--fortran/test/fortranlib_test.F906
-rw-r--r--fortran/test/fortranlib_test_1_8.F906
-rw-r--r--fortran/test/fortranlib_test_F03.F906
-rw-r--r--release_docs/RELEASE.txt20
-rw-r--r--src/H5FDmpi.c5
-rw-r--r--src/H5S.c2
-rw-r--r--src/H5Shyper.c12
-rw-r--r--src/H5Zszip.c4
-rw-r--r--tools/lib/h5diff_array.c114
-rw-r--r--tools/lib/h5diff_attr.c21
-rw-r--r--tools/lib/h5diff_dset.c428
-rw-r--r--tools/lib/h5tools.c4
-rw-r--r--tools/lib/h5tools.h4
-rw-r--r--tools/lib/h5tools_type.c32
-rw-r--r--tools/src/h5diff/h5diff_common.c45
-rw-r--r--tools/src/h5dump/h5dump.h4
-rw-r--r--tools/src/h5dump/h5dump_extern.h4
-rw-r--r--tools/src/h5repack/h5repack.c2
-rw-r--r--tools/src/h5repack/h5repack.h24
-rw-r--r--tools/src/h5repack/h5repack_copy.c39
-rw-r--r--tools/src/h5repack/h5repack_main.c87
-rw-r--r--tools/src/h5repack/h5repack_verify.c17
-rw-r--r--tools/test/h5copy/h5copygentest.c12
-rw-r--r--tools/test/h5diff/CMakeTests.cmake16
-rw-r--r--tools/test/h5diff/h5diffgentest.c45
-rw-r--r--tools/test/h5diff/testfiles/diff_strings1.h5bin4464 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testfiles/diff_strings2.h5bin4464 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58.txt2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt21
-rw-r--r--tools/test/h5diff/testfiles/h5diff_80.txt2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_800.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_801.txt13
-rw-r--r--tools/test/h5diff/testfiles/h5diff_dset1.h5bin23624 -> 23416 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_dset2.h5bin23624 -> 23416 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_dset3.h5bin0 -> 23416 bytes
-rw-r--r--tools/test/h5repack/CMakeTests.cmake9
-rw-r--r--tools/test/h5repack/h5repack.sh.in8
-rw-r--r--tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl36
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt4
51 files changed, 744 insertions, 539 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce91052..b84cc7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -851,6 +851,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
option (SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF)
if (HDF5_BUILD_FORTRAN)
if (BUILD_SHARED_LIBS AND APPLE)
+ # Tell cmake to do the right thing with COMMON symbols, this fixes
+ # corrupt values with COMMON and EQUIVALENCE when building shared
+ # Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772).
+ # *** NOTE: Fix does not work with Cmake. ***
+ # set (HDF5_LINKER_FLAGS "-Wl,-commons,use_dylibs")
if (NOT ALLOW_UNSUPPORTED)
message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
set (SKIP_HDF5_FORTRAN_SHARED ON)
diff --git a/MANIFEST b/MANIFEST
index e448a44..c34e614 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2240,6 +2240,8 @@
./tools/test/h5diff/testfiles/h5diff_709.txt
./tools/test/h5diff/testfiles/h5diff_710.txt
./tools/test/h5diff/testfiles/h5diff_80.txt
+./tools/test/h5diff/testfiles/h5diff_800.txt
+./tools/test/h5diff/testfiles/h5diff_801.txt
./tools/test/h5diff/testfiles/h5diff_90.txt
./tools/test/h5diff/testfiles/h5diff_100.txt
./tools/test/h5diff/testfiles/h5diff_101.txt
@@ -2350,6 +2352,7 @@
./tools/test/h5diff/testfiles/h5diff_basic2.h5
./tools/test/h5diff/testfiles/h5diff_dset1.h5
./tools/test/h5diff/testfiles/h5diff_dset2.h5
+./tools/test/h5diff/testfiles/h5diff_dset3.h5
./tools/test/h5diff/testfiles/h5diff_dtypes.h5
./tools/test/h5diff/testfiles/h5diff_empty.h5
./tools/test/h5diff/testfiles/h5diff_hyper1.h5
@@ -2429,6 +2432,7 @@
./tools/test/h5repack/testfiles/h5repack_soffset.h5
./tools/test/h5repack/testfiles/h5repack_szip.h5
./tools/test/h5repack/testfiles/ublock.bin
+./tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
./tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
./tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst
./tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
diff --git a/configure.ac b/configure.ac
index d0aeda9..9695fe3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -918,14 +918,13 @@ H5_FORTRAN_SHARED="no"
if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then
AC_MSG_CHECKING([if shared Fortran libraries are supported])
H5_FORTRAN_SHARED="yes"
-
- ## Disable fortran shared libraries on Mac. (MAM - 03/30/11)
-
+ ## tell libtool to do the right thing with COMMON symbols, this fixes
+ ## corrupt values with COMMON and EQUIVALENCE when building shared
+ ## Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772).
case "`uname`" in
Darwin*)
- H5_FORTRAN_SHARED="no"
- CHECK_WARN="Shared Fortran libraries not currently supported on Mac."
- ;;
+ H5_LDFLAGS="$H5_LDFLAGS -Wl,-commons,use_dylibs"
+ ;;
esac
## Report results of check(s)
@@ -3484,6 +3483,14 @@ chmod 755 tools/src/misc/h5cc
if test "X$HDF_FORTRAN" = "Xyes"; then
chmod 755 fortran/src/h5fc
+ ## libtool does not pass the correct argument linker (wl=) for the Intel Fortran compiler
+ ## on OS X, which is needed when building shared libraries on OS X. This script
+ ## replaces the 3rd occurrence, which is for Fortran, of wl="" with wl="-Wl," (HDFFV-2772)
+ case "`uname`" in
+ Darwin*)
+ cat libtool | awk '/wl=\"/{c++;if(c==3){sub("wl=\"\"","wl=\"-Wl,\"");c=0}}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
+ ;;
+ esac
fi
if test "X$HDF_CXX" = "Xyes"; then
diff --git a/fortran/test/fortranlib_test.F90 b/fortran/test/fortranlib_test.F90
index 94b084e..8d5b32b 100644
--- a/fortran/test/fortranlib_test.F90
+++ b/fortran/test/fortranlib_test.F90
@@ -50,11 +50,11 @@ PROGRAM fortranlibtest
IF(total_error .EQ. 0) THEN
WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
- WRITE(*, '(I1)', advance="NO") majnum
+ WRITE(*, '(I0)', advance="NO") majnum
WRITE(*, '(".")', advance="NO")
- WRITE(*, '(I1)', advance="NO") minnum
+ WRITE(*, '(I0)', advance="NO") minnum
WRITE(*, '(" release ")', advance="NO")
- WRITE(*, '(I3)') relnum
+ WRITE(*, '(I0)') relnum
ELSE
total_error = total_error + 1
ENDIF
diff --git a/fortran/test/fortranlib_test_1_8.F90 b/fortran/test/fortranlib_test_1_8.F90
index 850cab9..1306da5 100644
--- a/fortran/test/fortranlib_test_1_8.F90
+++ b/fortran/test/fortranlib_test_1_8.F90
@@ -46,11 +46,11 @@ PROGRAM fortranlibtest
CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
IF(total_error .EQ. 0) THEN
WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
- WRITE(*, '(I1)', advance="NO") majnum
+ WRITE(*, '(I0)', advance="NO") majnum
WRITE(*, '(".")', advance="NO")
- WRITE(*, '(I1)', advance="NO") minnum
+ WRITE(*, '(I0)', advance="NO") minnum
WRITE(*, '(" release ")', advance="NO")
- WRITE(*, '(I3)') relnum
+ WRITE(*, '(I0)') relnum
ELSE
total_error = total_error + 1
ENDIF
diff --git a/fortran/test/fortranlib_test_F03.F90 b/fortran/test/fortranlib_test_F03.F90
index ae12dba..9a74120 100644
--- a/fortran/test/fortranlib_test_F03.F90
+++ b/fortran/test/fortranlib_test_F03.F90
@@ -47,11 +47,11 @@ PROGRAM fortranlibtest_F03
CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
IF(total_error .EQ. 0) THEN
WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
- WRITE(*, '(I1)', advance="NO") majnum
+ WRITE(*, '(I0)', advance="NO") majnum
WRITE(*, '(".")', advance="NO")
- WRITE(*, '(I1)', advance="NO") minnum
+ WRITE(*, '(I0)', advance="NO") minnum
WRITE(*, '(" release ")', advance="NO")
- WRITE(*, '(I3)') relnum
+ WRITE(*, '(I0)') relnum
ELSE
total_error = total_error + 1
ENDIF
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index c670066..8fb56cc 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -74,15 +74,15 @@ New Features
Tools:
------
- -
+ -
High-Level APIs:
---------------
- -
+ -
C Packet Table API
------------------
- -
+ -
Internal header file
--------------------
@@ -105,7 +105,7 @@ Bug Fixes since HDF5-1.10.1 release
Configuration
-------------
- -
+ -
Performance
-------------
@@ -117,7 +117,9 @@ Bug Fixes since HDF5-1.10.1 release
Tools
-----
- -
+ - Improved h5diff compare of strings and arrays.
+
+ (ADB, 2017/05/18, HDFFV-9055, HDFFV-10128)
High-Level APIs:
------
@@ -302,16 +304,16 @@ The following platforms are not supported but have been tested for this release.
(cmake and autotools)
Fedora 24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
- gcc, g++ (GCC) 6.1.1 20160621
+ gcc, g++ (GCC) 6.1.1 20160621
(Red Hat 6.1.1-3)
- GNU Fortran (GCC) 6.1.1 20160621
+ GNU Fortran (GCC) 6.1.1 20160621
(Red Hat 6.1.1-3)
(cmake and autotools)
Ubuntu 16.04.1 4.4.0-38-generic #57-Ubuntu SMP x86_64 GNU/Linux
- gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2)
+ gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2)
5.4.0 20160609
- GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2)
+ GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2)
5.4.0 20160609
(cmake and autotools)
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 16be455..98e1b1a 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -315,6 +315,11 @@ H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Inf
info_dup = info;
}
+ /* Set MPI_ERRORS_RETURN on comm_dup so that MPI failures are not fatal,
+ and return codes can be checked and handled. May 23, 2017 FTW */
+ if (MPI_SUCCESS != (mpi_code = MPI_Comm_set_errhandler(comm_dup, MPI_ERRORS_RETURN)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Errhandler_set failed", mpi_code)
+
/* copy them to the return arguments */
*comm_new = comm_dup;
*info_new = info_dup;
diff --git a/src/H5S.c b/src/H5S.c
index dd390d9..9ac40a7 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1544,7 +1544,7 @@ H5Sencode(hid_t obj_id, void *buf, size_t *nalloc)
H5TRACE3("e", "i*x*z", obj_id, buf, nalloc);
/* Check argument and retrieve object */
- if (NULL==(dspace=(H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE)))
+ if (NULL == (dspace = (H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
if(H5S_encode(dspace, (unsigned char **)&buf, nalloc)<0)
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index e6e6cff..9263cd8 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -7571,7 +7571,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
- if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if (H5S_SCALAR==H5S_GET_EXTENT_TYPE(space))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space")
@@ -7640,7 +7640,7 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
- if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(start==NULL || count==NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified")
@@ -7768,9 +7768,9 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5TRACE3("i", "iSsi", space1_id, op, space2_id);
/* Check args */
- if (NULL == (space1=H5I_object_verify(space1_id, H5I_DATASPACE)))
+ if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
- if (NULL == (space2=H5I_object_verify(space2_id, H5I_DATASPACE)))
+ if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
@@ -7896,9 +7896,9 @@ H5Sselect_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5TRACE3("e", "iSsi", space1_id, op, space2_id);
/* Check args */
- if (NULL == (space1=H5I_object_verify(space1_id, H5I_DATASPACE)))
+ if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
- if (NULL == (space2=H5I_object_verify(space2_id, H5I_DATASPACE)))
+ if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
if(!(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID))
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index dd35859..769011c 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -85,7 +85,7 @@ H5Z_can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UN
FUNC_ENTER_NOAPI(FAIL)
/* Get datatype */
- if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Get datatype's size, for checking the "bits-per-pixel" */
@@ -156,7 +156,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get datatype */
- if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Get the filter's current parameters */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 49f41dc..499d5eb 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -623,6 +623,7 @@ static hsize_t diff_datum(void *_mem1,
*-------------------------------------------------------------------------
*/
case H5T_COMPOUND:
+ h5difftrace("diff_datum H5T_COMPOUND\n");
nmembs = members->n;
@@ -655,18 +656,21 @@ static hsize_t diff_datum(void *_mem1,
*-------------------------------------------------------------------------
*/
case H5T_STRING:
-
+ h5difftrace("diff_datum H5T_STRING\n");
{
- H5T_str_t pad;
- char *s;
- char *s1;
- char *s2;
- size_t size1;
- size_t size2;
+ char *s = NULL;
+ char *sx = NULL;
+ char *s1 = NULL;
+ char *s2 = NULL;
+ size_t size1;
+ size_t size2;
+ size_t sizex;
+ size_t size_mtype = H5Tget_size(m_type);
+ H5T_str_t pad = H5Tget_strpad(m_type);
/* if variable length string */
- if(H5Tis_variable_str(m_type))
- {
+ if(H5Tis_variable_str(m_type)) {
+ h5difftrace("diff_datum H5T_STRING variable\n");
/* Get pointer to first string */
s1 = *(char**) mem1;
size1 = HDstrlen(s1);
@@ -674,14 +678,26 @@ static hsize_t diff_datum(void *_mem1,
s2 = *(char**) mem2;
size2 = HDstrlen(s2);
}
- else
- {
+ else if (H5T_STR_NULLTERM == pad) {
+ h5difftrace("diff_datum H5T_STRING null term\n");
+ /* Get pointer to first string */
+ s1 = (char*) mem1;
+ size1 = HDstrlen(s1);
+ if (size1 > size_mtype)
+ size1 = size_mtype;
+ /* Get pointer to second string */
+ s2 = (char*) mem2;
+ size2 = HDstrlen(s2);
+ if (size2 > size_mtype)
+ size2 = size_mtype;
+ }
+ else {
/* Get pointer to first string */
s1 = (char *)mem1;
- size1 = H5Tget_size(m_type);
+ size1 = size_mtype;
/* Get pointer to second string */
s2 = (char *)mem2;
- size2 = H5Tget_size(m_type);
+ size2 = size_mtype;
}
/*
@@ -692,45 +708,59 @@ static hsize_t diff_datum(void *_mem1,
*/
h5diffdebug2("diff_datum string size:%d\n",size1);
h5diffdebug2("diff_datum string size:%d\n",size2);
- if(size1 != size2)
- {
+ if(size1 != size2) {
h5difftrace("diff_datum string sizes\n");
nfound++;
}
- if(size1 < size2)
- {
+ if(size1 < size2) {
size = size1;
s = s1;
+ sizex = size2;
+ sx = s2;
}
- else
- {
+ else {
size = size2;
s = s2;
+ sizex = size1;
+ sx = s1;
}
/* check for NULL pointer for string */
- if(s!=NULL)
- {
+ if(s!=NULL) {
/* try fast compare first */
- if (HDmemcmp(s1, s2, size)==0)
- break;
-
- pad = H5Tget_strpad(m_type);
-
- for (u=0; u<size; u++)
- nfound+=character_compare(
- s1 + u,
- s2 + u, /* offset */
- i, /* index position */
- u, /* string character position */
- rank,
- dims,
- acc,
- pos,
- options,
- obj1,
- obj2,
- ph);
+ if(HDmemcmp(s1, s2, size)==0) {
+ if(size1 != size2)
+ if(print_data(options))
+ for (u=size; u<sizex; u++)
+ character_compare(
+ s1 + u,
+ s2 + u, /* offset */
+ i, /* index position */
+ u, /* string character position */
+ rank,
+ dims,
+ acc,
+ pos,
+ options,
+ obj1,
+ obj2,
+ ph);
+ }
+ else
+ for (u=0; u<size; u++)
+ nfound+=character_compare(
+ s1 + u,
+ s2 + u, /* offset */
+ i, /* index position */
+ u, /* string character position */
+ rank,
+ dims,
+ acc,
+ pos,
+ options,
+ obj1,
+ obj2,
+ ph);
}
}
@@ -741,6 +771,7 @@ static hsize_t diff_datum(void *_mem1,
*-------------------------------------------------------------------------
*/
case H5T_BITFIELD:
+ h5difftrace("diff_datum H5T_BITFIELD\n");
/* byte-by-byte comparison */
for (u=0; u<type_size; u++)
@@ -764,7 +795,7 @@ static hsize_t diff_datum(void *_mem1,
*-------------------------------------------------------------------------
*/
case H5T_OPAQUE:
-
+ h5difftrace("diff_datum H5T_OPAQUE\n");
/* byte-by-byte comparison */
for (u=0; u<type_size; u++)
nfound+=character_compare_opt(
@@ -788,6 +819,7 @@ static hsize_t diff_datum(void *_mem1,
*-------------------------------------------------------------------------
*/
case H5T_ENUM:
+ h5difftrace("diff_datum H5T_ENUM\n");
/* For enumeration types we compare the names instead of the
integer values. For each pair of elements being
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 004672e..74607da 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -91,7 +91,7 @@ static void table_attrs_free( table_attrs_t *table )
/*-------------------------------------------------------------------------
* Function: table_attr_mark_exist
*
- * Purpose: mark given attribute name to table as sign of exsit
+ * Purpose: mark given attribute name to table as sign of exist
*
* Parameter:
* - exist [IN]
@@ -155,6 +155,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
unsigned i;
table_attrs_t *table_lp = NULL;
+ h5difftrace("build_match_list_attrs start\n");
if(H5Oget_info(loc1_id, &oinfo1) < 0)
goto error;
if(H5Oget_info(loc2_id, &oinfo2) < 0)
@@ -162,6 +163,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
table_attrs_init( &table_lp );
+ h5diffdebug3("build_match_list_attrs: %ld - %ld\n", curr1 < oinfo1.num_attrs, curr2 < oinfo2.num_attrs);
/*--------------------------------------------------
* build the list
@@ -226,6 +228,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* get name */
if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0)
goto error;
+ h5diffdebug2("build_match_list_attrs #1 name - %s\n", name1);
table_attr_mark_exist(infile, name1, table_lp);
table_lp->nattrs_only1++;
@@ -247,6 +250,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* get name */
if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0)
goto error;
+ h5diffdebug2("build_match_list_attrs #2 name - %s\n", name2);
table_attr_mark_exist(infile, name2, table_lp);
table_lp->nattrs_only2++;
@@ -278,6 +282,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
*table_out = table_lp;
+ h5difftrace("build_match_list_attrs end\n");
return 0;
error:
@@ -286,6 +291,7 @@ error:
if (0 < attr2_id)
H5Aclose(attr2_id);
+ h5difftrace("build_match_list_attrs end with error\n");
return -1;
}
@@ -322,8 +328,8 @@ hsize_t diff_attr(hid_t loc1_id,
hid_t space2_id=-1; /* space ID */
hid_t ftype1_id=-1; /* file data type ID */
hid_t ftype2_id=-1; /* file data type ID */
- int vstrtype1=0; /* ftype1 is a variable string */
- int vstrtype2=0; /* ftype2 is a variable string */
+ int vstrtype1=0; /* ftype1 is a variable string */
+ int vstrtype2=0; /* ftype2 is a variable string */
hid_t mtype1_id=-1; /* memory data type ID */
hid_t mtype2_id=-1; /* memory data type ID */
size_t msize1; /* memory size of memory type */
@@ -346,12 +352,15 @@ hsize_t diff_attr(hid_t loc1_id,
hsize_t nfound_total = 0;
int j;
- table_attrs_t * match_list_attrs = NULL;
+ table_attrs_t *match_list_attrs = NULL;
+ h5difftrace("diff_attr start\n");
+
if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
goto error;
/* if detect any unique extra attr */
if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2) {
+ h5difftrace("diff_attr attributes only in one file\n");
/* exit will be 1 */
options->contents = 0;
}
@@ -359,6 +368,7 @@ hsize_t diff_attr(hid_t loc1_id,
for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++) {
if((match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1])) {
name1 = name2 = match_list_attrs->attrs[u].name;
+ h5diffdebug2("diff_attr name - %s\n", name1);
/*--------------
* attribute 1 */
@@ -370,6 +380,7 @@ hsize_t diff_attr(hid_t loc1_id,
if((attr2_id = H5Aopen(loc2_id, name2, H5P_DEFAULT)) < 0)
goto error;
+ h5difftrace("diff_attr got attributes\n");
/* get the datatypes */
if((ftype1_id = H5Aget_type(attr1_id)) < 0)
goto error;
@@ -556,6 +567,7 @@ hsize_t diff_attr(hid_t loc1_id,
table_attrs_free(match_list_attrs);
+ h5difftrace("diff_attr end\n");
return nfound_total;
error:
@@ -584,6 +596,7 @@ error:
} H5E_END_TRY;
options->err_stat = 1;
+ h5difftrace("diff_attr end with error\n");
return nfound_total;
}
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 9f70299..991ef48 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -44,6 +44,7 @@ hsize_t diff_dataset( hid_t file1_id,
hid_t dcpl2 = -1;
hsize_t nfound = 0;
+ h5difftrace("diff_dataset start\n");
/*-------------------------------------------------------------------------
* open the handles
*-------------------------------------------------------------------------
@@ -52,13 +53,11 @@ hsize_t diff_dataset( hid_t file1_id,
H5E_BEGIN_TRY
{
/* Open the datasets */
- if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0)
- {
+ if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj1_name);
goto error;
}
- if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0)
- {
+ if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj2_name);
goto error;
}
@@ -78,15 +77,9 @@ hsize_t diff_dataset( hid_t file1_id,
* 2) the internal filters might be turned off
*-------------------------------------------------------------------------
*/
- if ((h5tools_canreadf((options->m_verbose?obj1_name:NULL),dcpl1)==1) &&
- (h5tools_canreadf((options->m_verbose?obj2_name:NULL),dcpl2)==1))
- {
- nfound=diff_datasetid(did1,
- did2,
- obj1_name,
- obj2_name,
- options);
- }
+ if ((h5tools_canreadf((options->m_verbose ? obj1_name : NULL), dcpl1) == 1) &&
+ (h5tools_canreadf((options->m_verbose ? obj2_name : NULL), dcpl2) == 1))
+ nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, options);
else
goto error;
@@ -94,20 +87,12 @@ hsize_t diff_dataset( hid_t file1_id,
* close
*-------------------------------------------------------------------------
*/
- /* disable error reporting */
- H5E_BEGIN_TRY {
- H5Pclose(dcpl1);
- H5Pclose(dcpl2);
- H5Dclose(did1);
- H5Dclose(did2);
- /* enable error reporting */
- } H5E_END_TRY;
-
-
- return nfound;
+ goto done;
error:
- options->err_stat=1;
+ options->err_stat = 1;
+
+done:
/* disable error reporting */
H5E_BEGIN_TRY {
H5Pclose(dcpl1);
@@ -117,6 +102,7 @@ error:
/* enable error reporting */
} H5E_END_TRY;
+ h5difftrace("diff_dataset end\n");
return nfound;
}
@@ -188,20 +174,24 @@ hsize_t diff_datasetid( hid_t did1,
hid_t sid2=-1;
hid_t f_tid1=-1;
hid_t f_tid2=-1;
+ hid_t dam_tid=-1; /* m_tid for diff_array function */
hid_t m_tid1=-1;
hid_t m_tid2=-1;
hid_t dcpl1 = -1;
hid_t dcpl2 = -1;
H5D_layout_t stl1 = -1;
H5D_layout_t stl2 = -1;
+ size_t dam_size; /* m_size for diff_array function */
size_t m_size1;
size_t m_size2;
H5T_sign_t sign1;
H5T_sign_t sign2;
int rank1;
int rank2;
+ hsize_t danelmts; /* nelmts for diff_array function */
hsize_t nelmts1;
hsize_t nelmts2;
+ hsize_t *dadims; /* dims for diff_array function */
hsize_t dims1[H5S_MAX_RANK];
hsize_t dims2[H5S_MAX_RANK];
hsize_t maxdim1[H5S_MAX_RANK];
@@ -223,30 +213,29 @@ hsize_t diff_datasetid( hid_t did1,
h5difftrace("diff_datasetid start\n");
/* Get the dataspace handle */
- if ( (sid1 = H5Dget_space(did1)) < 0 )
+ if((sid1 = H5Dget_space(did1)) < 0)
goto error;
/* Get rank */
- if ( (rank1 = H5Sget_simple_extent_ndims(sid1)) < 0 )
+ if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0)
goto error;
/* Get the dataspace handle */
- if ( (sid2 = H5Dget_space(did2)) < 0 )
+ if((sid2 = H5Dget_space(did2)) < 0 )
goto error;
/* Get rank */
- if ( (rank2 = H5Sget_simple_extent_ndims(sid2)) < 0 )
+ if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0)
goto error;
/* Get dimensions */
- if ( H5Sget_simple_extent_dims(sid1,dims1,maxdim1) < 0 )
+ if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0)
goto error;
/* Get dimensions */
- if ( H5Sget_simple_extent_dims(sid2,dims2,maxdim2) < 0 )
- {
+ if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0)
goto error;
- }
+ h5diffdebug3("rank: %ld - %ld\n", rank1, rank2);
/*-------------------------------------------------------------------------
* get the file data type
@@ -254,15 +243,12 @@ hsize_t diff_datasetid( hid_t did1,
*/
/* Get the data type */
- if ( (f_tid1 = H5Dget_type(did1)) < 0 )
+ if((f_tid1 = H5Dget_type(did1)) < 0)
goto error;
/* Get the data type */
- if ( (f_tid2 = H5Dget_type(did2)) < 0 )
- {
+ if((f_tid2 = H5Dget_type(did2)) < 0)
goto error;
- }
-
/*-------------------------------------------------------------------------
* get the storage layout type
@@ -284,22 +270,20 @@ hsize_t diff_datasetid( hid_t did1,
*/
h5difftrace("check for empty datasets\n");
- storage_size1=H5Dget_storage_size(did1);
- storage_size2=H5Dget_storage_size(did2);
+ storage_size1 = H5Dget_storage_size(did1);
+ storage_size2 = H5Dget_storage_size(did2);
+ h5diffdebug3("storage size: %ld - %ld\n", storage_size1, storage_size2);
- if (storage_size1==0 || storage_size2==0)
- {
- if (stl1==H5D_VIRTUAL || stl2==H5D_VIRTUAL)
- {
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
+ if(storage_size1 == 0 || storage_size2 == 0) {
+ if(stl1 == H5D_VIRTUAL || stl2 == H5D_VIRTUAL) {
+ if((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
parallel_print("Warning: <%s> or <%s> is a virtual dataset\n", obj1_name, obj2_name);
}
- else
- {
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
+ else {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name)
parallel_print("Not comparable: <%s> or <%s> is an empty dataset\n", obj1_name, obj2_name);
- can_compare=0;
- options->not_cmp=1;
+ can_compare = 0;
+ options->not_cmp = 1;
}
}
@@ -307,71 +291,58 @@ hsize_t diff_datasetid( hid_t did1,
* check for comparable TYPE and SPACE
*-------------------------------------------------------------------------
*/
-
- if (diff_can_type(f_tid1,
- f_tid2,
- rank1,
- rank2,
- dims1,
- dims2,
- maxdim1,
- maxdim2,
- obj1_name,
- obj2_name,
- options,
- 0)!=1)
- {
- can_compare=0;
- }
+ if (diff_can_type(f_tid1, f_tid2, rank1, rank2,
+ dims1, dims2, maxdim1, maxdim2,
+ obj1_name, obj2_name,
+ options, 0) != 1)
+ can_compare = 0;
/*-------------------------------------------------------------------------
* memory type and sizes
*-------------------------------------------------------------------------
*/
h5difftrace("check for memory type and sizes\n");
- if ((m_tid1=H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0)
+ if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0)
goto error;
- if ((m_tid2=H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0)
+ if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0)
goto error;
- m_size1 = H5Tget_size( m_tid1 );
- m_size2 = H5Tget_size( m_tid2 );
+ m_size1 = H5Tget_size(m_tid1);
+ m_size2 = H5Tget_size(m_tid2);
+ h5diffdebug3("type size: %ld - %ld\n", m_size1, m_size2);
/*-------------------------------------------------------------------------
* check for different signed/unsigned types
*-------------------------------------------------------------------------
*/
- if (can_compare)
- {
+ if(can_compare) {
h5difftrace("can_compare for sign\n");
- sign1=H5Tget_sign(m_tid1);
- sign2=H5Tget_sign(m_tid2);
- if ( sign1 != sign2 )
- {
+ sign1 = H5Tget_sign(m_tid1);
+ sign2 = H5Tget_sign(m_tid2);
+ if(sign1 != sign2) {
h5difftrace("sign1 != sign2\n");
- if ((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
parallel_print("Not comparable: <%s> has sign %s ", obj1_name, get_sign(sign1));
parallel_print("and <%s> has sign %s\n", obj2_name, get_sign(sign2));
}
- can_compare=0;
- options->not_cmp=1;
+ can_compare = 0;
+ options->not_cmp = 1;
}
}
/* Check if type is either VLEN-data or VLEN-string to reclaim any
* VLEN memory buffer later */
- if( TRUE == h5tools_detect_vlen(m_tid1) )
+ if(TRUE == h5tools_detect_vlen(m_tid1))
vl_data = TRUE;
/*------------------------------------------------------------------------
* only attempt to compare if possible
*-------------------------------------------------------------------------
*/
- if(can_compare) /* it is possible to compare */
- {
+ if(can_compare) { /* it is possible to compare */
+ H5T_class_t tclass = H5Tget_class(f_tid1);
h5difftrace("can_compare attempt\n");
/*-----------------------------------------------------------------
@@ -386,19 +357,44 @@ hsize_t diff_datasetid( hid_t did1,
for(i = 0; i < rank2; i++)
nelmts2 *= dims2[i];
+ h5diffdebug3("nelmts: %ld - %ld\n", nelmts1, nelmts2);
HDassert(nelmts1 == nelmts2);
- /*-----------------------------------------------------------------
- * "upgrade" the smaller memory size
- *------------------------------------------------------------------
- */
- h5difftrace("upgrade the smaller memory size?\n");
-
- if (FAIL == match_up_memsize (f_tid1, f_tid2,
- &m_tid1, &m_tid2,
- &m_size1, &m_size2))
- goto error;
-
+ if(tclass != H5T_ARRAY) {
+ /*-----------------------------------------------------------------
+ * "upgrade" the smaller memory size
+ *------------------------------------------------------------------
+ */
+ h5difftrace("upgrade the smaller memory size?\n");
+ if (FAIL == match_up_memsize (f_tid1, f_tid2,
+ &m_tid1, &m_tid2,
+ &m_size1, &m_size2))
+ goto error;
+ h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2);
+ dadims = dims1;
+ dam_size = m_size1;
+ dam_tid = m_tid1;
+ danelmts = nelmts1;
+ need = (size_t)(nelmts1 * m_size1); /* bytes needed */
+ }
+ else {
+ h5diffdebug3("Array dims: %d - %d\n", dims1[0], dims2[0]);
+ /* Compare the smallest array, but create the largest buffer */
+ if(m_size1 <= m_size2) {
+ dadims = dims1;
+ dam_size = m_size1;
+ dam_tid = m_tid1;
+ danelmts = nelmts1;
+ need = (size_t)(nelmts2 * m_size2); /* bytes needed */
+ }
+ else {
+ dadims = dims2;
+ dam_size = m_size2;
+ dam_tid = m_tid2;
+ danelmts = nelmts2;
+ need = (size_t)(nelmts1 * m_size1); /* bytes needed */
+ }
+ }
/* print names */
if(obj1_name)
name1 = diff_basename(obj1_name);
@@ -410,7 +406,6 @@ hsize_t diff_datasetid( hid_t did1,
* read/compare
*-----------------------------------------------------------------
*/
- need = (size_t)(nelmts1 * m_size1); /* bytes needed */
if(need < H5TOOLS_MALLOCSIZE) {
buf1 = HDmalloc(need);
buf2 = HDmalloc(need);
@@ -420,12 +415,13 @@ hsize_t diff_datasetid( hid_t did1,
h5difftrace("buf1 != NULL && buf2 != NULL\n");
if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0)
goto error;
+ h5difftrace("H5Dread did2\n");
if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0)
goto error;
/* array diff */
- nfound = diff_array(buf1, buf2, nelmts1, (hsize_t)0, rank1, dims1,
- options, name1, name2, m_tid1, did1, did2);
+ nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims,
+ options, name1, name2, dam_tid, did1, did2);
/* reclaim any VL memory, if necessary */
if(vl_data) {
@@ -433,10 +429,9 @@ hsize_t diff_datasetid( hid_t did1,
H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
} /* end if */
} /* end if */
- else /* possibly not enough memory, read/compare by hyperslabs */
- {
- size_t p_type_nbytes = m_size1; /*size of memory type */
- hsize_t p_nelmts = nelmts1; /*total selected elmts */
+ else { /* possibly not enough memory, read/compare by hyperslabs */
+ size_t p_type_nbytes = dam_size; /*size of memory type */
+ hsize_t p_nelmts = danelmts; /*total selected elmts */
hsize_t elmtno; /*counter */
int carry; /*counter carry value */
@@ -462,7 +457,7 @@ hsize_t diff_datasetid( hid_t did1,
if(size == 0) /* datum size > H5TOOLS_BUFSIZE */
size = 1;
- sm_size[i - 1] = MIN(dims1[i - 1], size);
+ sm_size[i - 1] = MIN(dadims[i - 1], size);
sm_nbytes *= sm_size[i - 1];
HDassert(sm_nbytes > 0);
} /* end for */
@@ -490,7 +485,7 @@ hsize_t diff_datasetid( hid_t did1,
/* calculate the hyperslab size */
if(rank1 > 0) {
for(i = 0, hs_nelmts = 1; i < rank1; i++) {
- hs_size[i] = MIN(dims1[i] - hs_offset[i], sm_size[i]);
+ hs_size[i] = MIN(dadims[i] - hs_offset[i], sm_size[i]);
hs_nelmts *= hs_size[i];
} /* end for */
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
@@ -503,15 +498,15 @@ hsize_t diff_datasetid( hid_t did1,
else
hs_nelmts = 1;
- if(H5Dread(did1,m_tid1,sm_space,sid1,H5P_DEFAULT,sm_buf1) < 0)
+ if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0)
goto error;
- if(H5Dread(did2,m_tid2,sm_space,sid2,H5P_DEFAULT,sm_buf2) < 0)
+ if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0)
goto error;
/* get array differences. in the case of hyperslab read, increment the number of differences
- found in each hyperslab and pass the position at the beggining for printing */
+ found in each hyperslab and pass the position at the beginning for printing */
nfound += diff_array(sm_buf1, sm_buf2, hs_nelmts, elmtno, rank1,
- dims1, options, name1, name2, m_tid1, did1, did2);
+ dadims, options, name1, name2, dam_tid, did1, did2);
/* reclaim any VL memory, if necessary */
if(vl_data) {
@@ -522,7 +517,7 @@ hsize_t diff_datasetid( hid_t did1,
/* calculate the next hyperslab offset */
for(i = rank1, carry = 1; i > 0 && carry; --i) {
hs_offset[i - 1] += hs_size[i - 1];
- if(hs_offset[i - 1] == dims1[i - 1])
+ if(hs_offset[i - 1] == dadims[i - 1])
hs_offset[i - 1] = 0;
else
carry = 0;
@@ -574,37 +569,33 @@ error:
options->err_stat=1;
/* free */
- if (buf1!=NULL)
- {
+ if(buf1 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data)
H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
HDfree(buf1);
- buf1=NULL;
+ buf1 = NULL;
}
- if (buf2!=NULL)
- {
+ if(buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data)
H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
HDfree(buf2);
- buf2=NULL;
+ buf2 = NULL;
}
- if (sm_buf1!=NULL)
- {
+ if(sm_buf1 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data)
H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
HDfree(sm_buf1);
- sm_buf1=NULL;
+ sm_buf1 = NULL;
}
- if (sm_buf2!=NULL)
- {
+ if(sm_buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data)
H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2);
HDfree(sm_buf2);
- sm_buf2=NULL;
+ sm_buf2 = NULL;
}
/* disable error reporting */
@@ -652,75 +643,55 @@ int diff_can_type( hid_t f_tid1, /* file data type */
diff_opt_t *options,
int is_compound)
{
-
-
H5T_class_t tclass1;
H5T_class_t tclass2;
- int maxdim_diff=0; /* maximum dimensions are different */
- int dim_diff=0; /* current dimensions are different */
+ int maxdim_diff = 0; /* maximum dimensions are different */
+ int dim_diff = 0; /* current dimensions are different */
int i;
- int can_compare = 1; /* return value */
+ int can_compare = 1; /* return value */
+ h5difftrace("diff_can_type start\n");
/*-------------------------------------------------------------------------
* check for the same class
*-------------------------------------------------------------------------
*/
-
- if ((tclass1=H5Tget_class(f_tid1)) < 0)
+ if((tclass1 = H5Tget_class(f_tid1)) < 0)
return -1;
-
- if ((tclass2=H5Tget_class(f_tid2)) < 0)
+ if((tclass2 = H5Tget_class(f_tid2)) < 0)
return -1;
- if ( tclass1 != tclass2 )
- {
-
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
-
- if ( is_compound )
- {
-
+ if(tclass1 != tclass2) {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
+ if(is_compound) {
parallel_print("Not comparable: <%s> has a class %s and <%s> has a class %s\n",
- obj1_name, get_class(tclass1),
- obj2_name, get_class(tclass2) );
-
+ obj1_name, get_class(tclass1),
+ obj2_name, get_class(tclass2));
}
-
- else
-
- {
-
+ else {
parallel_print("Not comparable: <%s> is of class %s and <%s> is of class %s\n",
- obj1_name, get_class(tclass1),
- obj2_name, get_class(tclass2) );
-
+ obj1_name, get_class(tclass1),
+ obj2_name, get_class(tclass2));
}
-
}
-
-
can_compare = 0;
options->not_cmp = 1;
- return can_compare;
+ goto done;
}
/*-------------------------------------------------------------------------
* check for non supported classes
*-------------------------------------------------------------------------
*/
-
- HDassert(tclass1==tclass2);
- switch (tclass1)
- {
+ HDassert(tclass1 == tclass2);
+ switch (tclass1) {
case H5T_TIME:
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
parallel_print("Not comparable: <%s> and <%s> are of class %s\n",
- obj1_name,obj2_name,get_class(tclass2) );
+ obj1_name, obj2_name, get_class(tclass2));
} /* end if */
can_compare = 0;
options->not_cmp = 1;
- return can_compare;
+ goto done;
case H5T_INTEGER:
case H5T_FLOAT:
@@ -735,6 +706,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
+ h5diffdebug2("diff_can_type class - %s\n", get_class(tclass1));
break;
} /* end switch */
@@ -742,17 +714,11 @@ int diff_can_type( hid_t f_tid1, /* file data type */
* check for equal file datatype; warning only
*-------------------------------------------------------------------------
*/
-
- if ( (H5Tequal(f_tid1, f_tid2)==0) &&
- (options->m_verbose) && obj1_name && obj2_name)
- {
-
+ if((H5Tequal(f_tid1, f_tid2) == 0) && (options->m_verbose) && obj1_name && obj2_name) {
H5T_class_t cl = H5Tget_class(f_tid1);
-
parallel_print("Warning: different storage datatype\n");
- if ( cl == H5T_INTEGER || cl == H5T_FLOAT )
- {
+ if(cl == H5T_INTEGER || cl == H5T_FLOAT) {
parallel_print("<%s> has file datatype ", obj1_name);
print_type(f_tid1);
parallel_print("\n");
@@ -760,110 +726,85 @@ int diff_can_type( hid_t f_tid1, /* file data type */
print_type(f_tid2);
parallel_print("\n");
}
-
-
-
}
/*-------------------------------------------------------------------------
* check for the same rank
*-------------------------------------------------------------------------
*/
-
-
- if ( rank1 != rank2 )
- {
-
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
+ if(rank1 != rank2) {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1);
- print_dimensions(rank1,dims1);
+ print_dimensions(rank1, dims1);
parallel_print(", max dimensions ");
- print_dimensions(rank1,maxdim1);
+ print_dimensions(rank1, maxdim1);
parallel_print("\n" );
parallel_print("and <%s> has rank %d, dimensions ", obj2_name, rank2);
- print_dimensions(rank2,dims2);
+ print_dimensions(rank2, dims2);
parallel_print(", max dimensions ");
- print_dimensions(rank2,maxdim2);
+ print_dimensions(rank2, maxdim2);
parallel_print("\n");
}
-
can_compare = 0;
options->not_cmp = 1;
- return can_compare;
+ goto done;
}
/*-------------------------------------------------------------------------
* check for different dimensions
*-------------------------------------------------------------------------
*/
-
- HDassert(rank1==rank2);
- for ( i=0; i<rank1; i++)
- {
- if (maxdim1 && maxdim2)
- {
- if ( maxdim1[i] != maxdim2[i] )
- maxdim_diff=1;
+ HDassert(rank1 == rank2);
+ for(i = 0; i<rank1; i++) {
+ if(maxdim1 && maxdim2) {
+ if(maxdim1[i] != maxdim2[i])
+ maxdim_diff = 1;
}
- if ( dims1[i] != dims2[i] )
- dim_diff=1;
+ if(dims1[i] != dims2[i])
+ dim_diff = 1;
}
/*-------------------------------------------------------------------------
* current dimensions
*-------------------------------------------------------------------------
*/
-
- if (dim_diff==1)
- {
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
+ if(dim_diff == 1) {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1);
- print_dimensions(rank1,dims1);
- if (maxdim1 && maxdim2)
- {
+ print_dimensions(rank1, dims1);
+ if(maxdim1 && maxdim2) {
parallel_print(", max dimensions ");
- print_dimensions(rank1,maxdim1);
+ print_dimensions(rank1, maxdim1);
parallel_print("\n" );
parallel_print("and <%s> has rank %d, dimensions ", obj2_name, rank2);
- print_dimensions(rank2,dims2);
+ print_dimensions(rank2, dims2);
parallel_print(", max dimensions ");
- print_dimensions(rank2,maxdim2);
+ print_dimensions(rank2, maxdim2);
parallel_print("\n");
}
}
-
-
can_compare = 0;
options->not_cmp = 1;
- return can_compare;
-
-
-
+ goto done;
}
/*-------------------------------------------------------------------------
* maximum dimensions; just give a warning
*-------------------------------------------------------------------------
*/
- if (maxdim1 && maxdim2 && maxdim_diff==1 && obj1_name )
- {
- if (options->m_verbose) {
+ if(maxdim1 && maxdim2 && maxdim_diff == 1 && obj1_name) {
+ if(options->m_verbose) {
parallel_print( "Warning: different maximum dimensions\n");
parallel_print("<%s> has max dimensions ", obj1_name);
- print_dimensions(rank1,maxdim1);
+ print_dimensions(rank1, maxdim1);
parallel_print("\n");
parallel_print("<%s> has max dimensions ", obj2_name);
- print_dimensions(rank2,maxdim2);
+ print_dimensions(rank2, maxdim2);
parallel_print("\n");
}
}
-
- if ( tclass1 == H5T_COMPOUND )
- {
-
+ if(tclass1 == H5T_COMPOUND) {
int nmembs1;
int nmembs2;
int j;
@@ -873,67 +814,40 @@ int diff_can_type( hid_t f_tid1, /* file data type */
nmembs1 = H5Tget_nmembers(f_tid1);
nmembs2 = H5Tget_nmembers(f_tid2);
- if ( nmembs1 != nmembs2 )
- {
-
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
+ if(nmembs1 != nmembs2) {
+ if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) {
parallel_print("Not comparable: <%s> has %d members ", obj1_name, nmembs1);
parallel_print("<%s> has %d members ", obj2_name, nmembs2);
parallel_print("\n");
}
-
can_compare = 0;
options->not_cmp = 1;
- return can_compare;
+ goto done;
}
- for (j = 0; j < nmembs1; j++)
- {
+ for (j = 0; j < nmembs1; j++) {
memb_type1 = H5Tget_member_type(f_tid1, (unsigned)j);
memb_type2 = H5Tget_member_type(f_tid2, (unsigned)j);
- if (diff_can_type(memb_type1,
- memb_type2,
- rank1,
- rank2,
- dims1,
- dims2,
- maxdim1,
- maxdim2,
- obj1_name,
- obj2_name,
- options,
- 1)!=1)
- {
+ if (diff_can_type(memb_type1, memb_type2, rank1, rank2,
+ dims1, dims2, maxdim1, maxdim2, obj1_name, obj2_name,
+ options, 1) != 1) {
can_compare = 0;
options->not_cmp = 1;
H5Tclose(memb_type1);
H5Tclose(memb_type2);
- return can_compare;
+ goto done;
}
-
H5Tclose(memb_type1);
H5Tclose(memb_type2);
-
}
-
-
-
-
-
}
-
-
-
-
-
+done:
+ h5diffdebug2("diff_can_type end - %d\n", can_compare);
return can_compare;
}
-
-
/*-------------------------------------------------------------------------
* Function: print_sizes
*
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index a74fdd2..22fd863 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -51,6 +51,10 @@ unsigned packed_data_length; /* length of packed bits to display */
unsigned long long packed_data_mask; /* mask in which packed bits to display */
int enable_error_stack= FALSE; /* re-enable error stack */
+/* sort parameters */
+H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */
+H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | descending] */
+
/* module-scoped variables */
static int h5tools_init_g; /* if h5tools lib has been initialized */
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index c5e750a..3d38dd0 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -568,6 +568,10 @@ H5TOOLS_DLLVAR int oid_output; /* oid output */
H5TOOLS_DLLVAR int data_output; /* data output */
H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */
+/* sort parameters */
+H5TOOLS_DLLVAR H5_index_t sort_by; /*sort_by [creation_order | name] */
+H5TOOLS_DLLVAR H5_iter_order_t sort_order; /*sort_order [ascending | descending] */
+
/* things to display or which are set via command line parameters */
H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack */
diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c
index b57e274..ae7160b 100644
--- a/tools/lib/h5tools_type.c
+++ b/tools/lib/h5tools_type.c
@@ -15,38 +15,6 @@
#include "h5tools.h"
/*-------------------------------------------------------------------------
- * Function: h5tools_get_native_type
- *
- * Purpose: Wrapper around H5Tget_native_type() to work around
- * Problems with bitfields.
- *
- * Return: Success: datatype ID
- *
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Tuesday, October 5, 2004
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-hid_t
-h5tools_get_native_type(hid_t type)
-{
- hid_t p_type;
- H5T_class_t type_class;
-
- type_class = H5Tget_class(type);
- if(type_class==H5T_BITFIELD)
- p_type=H5Tcopy(type);
- else
- p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
-
- return(p_type);
-}
-
-/*-------------------------------------------------------------------------
* Function: h5tools_get_little_endian_type
*
* Purpose: Get a little endian type from a file type
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 5437803..0537b9f 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -56,7 +56,7 @@ static struct long_options l_opts[] = {
static void check_options(diff_opt_t* options)
{
/*--------------------------------------------------------------
- * check for mutually exclusive options
+ * check for mutually exclusive options
*--------------------------------------------------------------*/
/* check between -d , -p, --use-system-epsilon.
@@ -127,13 +127,13 @@ void parse_command_line(int argc,
h5diff_exit(EXIT_SUCCESS);
case 'v':
options->m_verbose = 1;
- /* This for loop is for handling style like
+ /* This for loop is for handling style like
* -v, -v1, --verbose, --verbose=1.
*/
for (i = 1; i < argc; i++)
- {
- /*
- * short opt
+ {
+ /*
+ * short opt
*/
if (!strcmp (argv[i], "-v")) /* no arg */
{
@@ -145,10 +145,10 @@ void parse_command_line(int argc,
{
options->m_verbose_level = atoi(&argv[i][2]);
break;
- }
+ }
- /*
- * long opt
+ /*
+ * long opt
*/
if (!strcmp (argv[i], "--verbose")) /* no arg */
{
@@ -177,7 +177,7 @@ void parse_command_line(int argc,
break;
case 'E':
options->exclude_path = 1;
-
+
/* create linked list of excluding objects */
if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL)
{
@@ -189,8 +189,8 @@ void parse_command_line(int argc,
exclude_node->obj_path = (char*)opt_arg;
exclude_node->obj_type = H5TRAV_TYPE_UNKNOWN;
exclude_prev = exclude_head;
-
- if (NULL == exclude_head)
+
+ if (NULL == exclude_head)
{
exclude_head = exclude_node;
exclude_head->next = NULL;
@@ -202,7 +202,7 @@ void parse_command_line(int argc,
exclude_node->next = NULL;
exclude_prev->next = exclude_node;
- }
+ }
break;
case 'd':
options->d=1;
@@ -458,7 +458,7 @@ check_d_input( const char *str )
void usage(void)
{
- printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] \n");
+ printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]\n");
printf(" file1 File name of the first HDF5 file\n");
printf(" file2 File name of the second HDF5 file\n");
printf(" [obj1] Name of an HDF5 object, in absolute path\n");
@@ -519,19 +519,22 @@ void usage(void)
printf(" -n C, --count=C\n");
printf(" Print differences up to C. C must be a positive integer.\n");
printf(" -d D, --delta=D\n");
- printf(" Print difference if (|a-b| > D). D must be a positive number.\n");
+ printf(" Print difference if (|a-b| > D). D must be a positive number. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" Can not use with '-p' or '--use-system-epsilon'.\n");
printf(" -p R, --relative=R\n");
- printf(" Print difference if (|(a-b)/b| > R). R must be a positive number.\n");
+ printf(" Print difference if (|(a-b)/b| > R). R must be a positive number. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" Can not use with '-d' or '--use-system-epsilon'.\n");
printf(" --use-system-epsilon\n");
- printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value.\n");
+ printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a\n");
+ printf(" is the data point value in file1 and b is the data point value in file2.\n");
printf(" If the system epsilon is not defined,one of the following predefined\n");
printf(" values will be used:\n");
printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n");
printf(" DBL_EPSILON = 2.22045E-16 for double precision type\n");
printf(" Can not use with '-p' or '-d'.\n");
- printf(" --exclude-path \"path\" \n");
+ printf(" --exclude-path \"path\"\n");
printf(" Exclude the specified path to an object when comparing files or groups.\n");
printf(" If a group is excluded, all member objects will also be excluded.\n");
printf(" The specified path is excluded wherever it occurs.\n");
@@ -570,15 +573,15 @@ void usage(void)
printf("\n");
printf(" Object comparison:\n");
- printf(" 1) Groups \n");
+ printf(" 1) Groups\n");
printf(" First compares the names of member objects (relative path, from the\n");
printf(" specified group) and generates a report of objects that appear in only\n");
printf(" one group or in both groups. Common objects are then compared recursively.\n");
- printf(" 2) Datasets \n");
+ printf(" 2) Datasets\n");
printf(" Array rank and dimensions, datatypes, and data values are compared.\n");
- printf(" 3) Datatypes \n");
+ printf(" 3) Datatypes\n");
printf(" The comparison is based on the return value of H5Tequal.\n");
- printf(" 4) Symbolic links \n");
+ printf(" 4) Symbolic links\n");
printf(" The paths to the target objects are compared.\n");
printf(" (The option --follow-symlinks overrides the default behavior when\n");
printf(" symbolic links are compared.).\n");
diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h
index 211fd14..801f60d 100644
--- a/tools/src/h5dump/h5dump.h
+++ b/tools/src/h5dump/h5dump.h
@@ -78,10 +78,6 @@ int include_attrs = TRUE; /* Display attributes */
int display_vds_first = FALSE; /* vds display to all by default*/
int vds_gap_size = 0; /* vds skip missing files default is none */
-/* sort parameters */
-H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */
-H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | descending] */
-
#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
#define PACKED_BITS_SIZE_MAX (8*sizeof(long long)) /* Maximum bits size of integer types of packed-bits */
/* mask list for packed bits */
diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h
index 22aca73..00d3bd2 100644
--- a/tools/src/h5dump/h5dump_extern.h
+++ b/tools/src/h5dump/h5dump_extern.h
@@ -77,10 +77,6 @@ extern int include_attrs; /* Display attributes */
extern int display_vds_first; /* vds display to first missing */
extern int vds_gap_size; /* vds skip missing files */
-/* sort parameters */
-extern H5_index_t sort_by; /*sort_by [creation_order | name] */
-extern H5_iter_order_t sort_order; /*sort_order [ascending | descending] */
-
#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
#define PACKED_BITS_SIZE_MAX 8*sizeof(long long) /* Maximum bits size of integer types of packed-bits */
/* mask list for packed bits */
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index 3c9ce90..bc8527b 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -784,6 +784,8 @@ static int check_objects(const char* fname, pack_opt_t *options) {
*-------------------------------------------------------------------------
*/
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
/* init table */
trav_table_init(&travt);
diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h
index e36f0ef..e5ae03f 100644
--- a/tools/src/h5repack/h5repack.h
+++ b/tools/src/h5repack/h5repack.h
@@ -29,10 +29,10 @@
#define MAX_COMPACT_DSIZE 64512 /* max data size for compact layout. -1k for header size */
/* File space default information */
-#define FS_PAGESIZE_DEF 4096
-#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
-#define FS_PERSIST_DEF FALSE
-#define FS_THRESHOLD_DEF 1
+#define FS_PAGESIZE_DEF 4096
+#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
+#define FS_PERSIST_DEF FALSE
+#define FS_THRESHOLD_DEF 1
/*-------------------------------------------------------------------------
@@ -120,10 +120,10 @@ typedef struct {
hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */
hsize_t threshold; /* alignment threshold for H5Pset_alignment */
hsize_t alignment; /* alignment for H5Pset_alignment */
- H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
- int fs_persist; /* Free space section threshold */
- long fs_threshold; /* Free space section threshold */
- long long fs_pagesize; /* File space page size */
+ H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
+ int fs_persist; /* Free space section threshold */
+ long fs_threshold; /* Free space section threshold */
+ long long fs_pagesize; /* File space page size */
} pack_opt_t;
@@ -150,10 +150,10 @@ int h5repack_end(pack_opt_t *options);
int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options);
int h5repack_cmp_pl(const char *fname1, const char *fname2);
-/* Note: The below copy_named_datatype(), named_datatype_free(), copy_attr()
- * and struct named_dt_t were located in h5repack_copy.c as static prior to
- * bugfix1726.
- * Made shared functions as copy_attr() was needed in h5repack_refs.c.
+/* Note: The below copy_named_datatype(), named_datatype_free(), copy_attr()
+ * and struct named_dt_t were located in h5repack_copy.c as static prior to
+ * bugfix1726.
+ * Made shared functions as copy_attr() was needed in h5repack_refs.c.
* However copy_attr() may be obsoleted when H5Acopy is available and put back
* others to static in h5repack_copy.c.
*/
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index ec3e287..42fedbc 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -103,6 +103,7 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
hbool_t in_persist; /* Persist free-space status from input file */
hsize_t in_threshold; /* Free-space section threshold from input file */
hsize_t in_pagesize; /* File space page size from input file */
+ unsigned crt_order_flags; /* group creation order flag */
/*-------------------------------------------------------------------------
* open input file
@@ -116,6 +117,8 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
/* get user block size and file space strategy/persist/threshold */
{
hid_t fcpl_in; /* file creation property list ID for input file */
+ hid_t grp_in = -1; /* group ID */
+ hid_t gcpl_in = -1; /* group creation property list */
if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) {
error_msg("failed to retrieve file creation property list\n");
@@ -127,17 +130,28 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
}
- /* If the -S option is not set, get "strategy" from the input file */
- if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) {
- error_msg("failed to retrieve file space strategy\n");
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
- }
+ /* If the -S option is not set, get "strategy" from the input file */
+ if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) {
+ error_msg("failed to retrieve file space strategy\n");
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
+ }
- /* If the -G option is not set, get "pagesize" from the input file */
- if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) {
- error_msg("failed to retrieve file space threshold\n");
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
- }
+ /* If the -G option is not set, get "pagesize" from the input file */
+ if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) {
+ error_msg("failed to retrieve file space threshold\n");
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed");
+ }
+ /* open root group */
+ if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed");
+
+ /* get root group creation property list */
+ if ((gcpl_in = H5Gget_create_plist(grp_in)) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed");
+
+ /* query and set the group creation properties */
+ if (H5Pget_link_creation_order(gcpl_in, &crt_order_flags) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed");
if (H5Pclose(fcpl_in) < 0) {
error_msg("failed to close property list\n");
@@ -309,6 +323,9 @@ print_user_block(fnamein, fidin);
}
}
+ if(H5Pset_link_creation_order(fcpl, crt_order_flags ) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed");
+
/* Set file space info to those from input file */
set_strategy = in_strategy;
set_persist = in_persist;
@@ -375,6 +392,8 @@ print_user_block(fnamein, fidin);
*-------------------------------------------------------------------------
*/
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
/* init table */
trav_table_init(&travt);
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 339dc83..31b1e14 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -31,7 +31,7 @@ const char *outfile = NULL;
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:P:T:G:E";
+static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:P:T:G:q:z:E";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
@@ -56,6 +56,8 @@ static struct long_options l_opts[] = {
{ "fs_persist", require_arg, 'P' },
{ "fs_threshold", require_arg, 'T' },
{ "fs_pagesize", require_arg, 'G' },
+ { "sort_by", require_arg, 'q' },
+ { "sort_order", require_arg, 'z' },
{ "enable-error-stack", no_arg, 'E' },
{ NULL, 0, '\0' }
};
@@ -90,6 +92,8 @@ static void usage(const char *prog) {
PRINTVALSTREAM(rawoutstream, " -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size\n");
PRINTVALSTREAM(rawoutstream, " -t T, --threshold=T Threshold value for H5Pset_alignment\n");
PRINTVALSTREAM(rawoutstream, " -a A, --alignment=A Alignment value for H5Pset_alignment\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, " -f FILT, --filter=FILT Filter type\n");
PRINTVALSTREAM(rawoutstream, " -l LAYT, --layout=LAYT Layout type\n");
PRINTVALSTREAM(rawoutstream, " -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy\n");
@@ -103,6 +107,8 @@ static void usage(const char *prog) {
PRINTVALSTREAM(rawoutstream, " U - is a filename.\n");
PRINTVALSTREAM(rawoutstream, " T - is an integer\n");
PRINTVALSTREAM(rawoutstream, " A - is an integer greater than zero\n");
+ PRINTVALSTREAM(rawoutstream, " Q - is the sort index type for the input file. It can be \"name\" or \"creation_order\" (default)\n");
+ PRINTVALSTREAM(rawoutstream, " Z - is the sort order type for the input file. It can be \"descending\" or \"ascending\" (default)\n");
PRINTVALSTREAM(rawoutstream, " B - is the user block size, any value that is 512 or greater and is\n");
PRINTVALSTREAM(rawoutstream, " a power of 2 (1024 default)\n");
PRINTVALSTREAM(rawoutstream, " F - is the shared object header message type, any of <dspace|dtype|fill|\n");
@@ -370,6 +376,52 @@ done:
}
/*-------------------------------------------------------------------------
+ * Function: set_sort_by
+ *
+ * Purpose: set the "by" form of sorting by translating from a string input
+ * parameter to a H5_index_t return value
+ * current sort values are [creation_order | name]
+ *
+ * Return: H5_index_t form of sort or H5_INDEX_UNKNOWN if none found
+ *-------------------------------------------------------------------------
+ */
+static H5_index_t
+set_sort_by(const char *form)
+{
+ H5_index_t idx_type = H5_INDEX_UNKNOWN;
+
+ if (HDstrcmp(form,"name")==0) /* H5_INDEX_NAME */
+ idx_type = H5_INDEX_NAME;
+ else if (HDstrcmp(form,"creation_order")==0) /* H5_INDEX_CRT_ORDER */
+ idx_type = H5_INDEX_CRT_ORDER;
+
+ return idx_type;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: set_sort_order
+ *
+ * Purpose: set the order of sorting by translating from a string input
+ * parameter to a H5_iter_order_t return value
+ * current order values are [ascending | descending ]
+ *
+ * Return: H5_iter_order_t form of order or H5_ITER_UNKNOWN if none found
+ *-------------------------------------------------------------------------
+ */
+static H5_iter_order_t
+set_sort_order(const char *form)
+{
+ H5_iter_order_t iter_order = H5_ITER_UNKNOWN;
+
+ if (HDstrcmp(form,"ascending")==0) /* H5_ITER_INC */
+ iter_order = H5_ITER_INC;
+ else if (HDstrcmp(form,"descending")==0) /* H5_ITER_DEC */
+ iter_order = H5_ITER_DEC;
+
+ return iter_order;
+}
+
+/*-------------------------------------------------------------------------
* Function: parse_command_line
*
* Purpose: parse command line input
@@ -553,14 +605,14 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case 'P':
- options->fs_persist = HDatoi( opt_arg );
+ options->fs_persist = HDatoi(opt_arg);
if(options->fs_persist == 0)
/* To distinguish the "specified" zero value */
options->fs_persist = -1;
break;
case 'T':
- options->fs_threshold = HDatol( opt_arg );
+ options->fs_threshold = HDatol(opt_arg);
if(options->fs_threshold == 0)
/* To distinguish the "specified" zero value */
options->fs_threshold = -1;
@@ -570,12 +622,30 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
options->fs_pagesize = HDstrtoll(opt_arg, NULL, 0);
if(options->fs_pagesize == 0)
/* To distinguish the "specified" zero value */
- options->fs_pagesize = -1;
+ options->fs_pagesize = -1;
break;
- case 'E':
- enable_error_stack = TRUE;
- break;
+ case 'q':
+ if((sort_by = set_sort_by(opt_arg)) < 0) {
+ error_msg(" failed to set sort by form <%s>\n", opt_arg);
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = -1;
+ goto done;
+ }
+ break;
+
+ case 'z':
+ if((sort_order = set_sort_order(opt_arg)) < 0) {
+ error_msg(" failed to set sort order form <%s>\n", opt_arg);
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = -1;
+ goto done;
+ }
+ break;
+
+ case 'E':
+ enable_error_stack = TRUE;
+ break;
default:
break;
@@ -644,6 +714,9 @@ int main(int argc, const char **argv)
/* initialize options */
h5repack_init(&options, 0, FALSE);
+ /* Initialize default indexing options */
+ sort_by = H5_INDEX_CRT_ORDER;
+
if (parse_command_line(argc, argv, &options) < 0)
goto done;
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index 7e79aa7..4ff4875 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -55,11 +55,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
trav_table_t *travt = NULL;
int ok = 1;
hid_t fcpl_in = -1; /* file creation property for input file */
- hid_t fcpl_out = -1; /* file creation property for output file */
- H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */
- hbool_t in_persist, out_persist; /* free-space persist status for in/output file */
- hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */
- hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */
+ hid_t fcpl_out = -1; /* file creation property for output file */
+ H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */
+ hbool_t in_persist, out_persist; /* free-space persist status for in/output file */
+ hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */
+ hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */
/* open the output file */
if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
@@ -122,6 +122,8 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
if(options->all_filter == 1 || options->all_layout == 1)
{
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
/* init table */
trav_table_init(&travt);
@@ -455,6 +457,9 @@ int h5repack_cmp_pl(const char *fname1,
* get file table list of objects
*-------------------------------------------------------------------------
*/
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
+ /* init table */
trav_table_init(&trav);
if(h5trav_gettable(fid1, trav) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed");
@@ -643,7 +648,7 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter)
{
case H5Z_FILTER_NONE:
- break;
+ break;
case H5Z_FILTER_SHUFFLE:
/* 1 private client value is returned by DCPL */
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index ed41998..bda0686 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -33,12 +33,12 @@
#define DATASET_COMPRESSED "compressed"
#define DATASET_NAMED_VL "named_vl"
#define DATASET_NESTED_VL "nested_vl"
-#define DATASET_ATTR "dset_attr"
-#define ATTR "attr"
+#define DATASET_ATTR "dset_attr"
+#define ATTR "attr"
#define GROUP_EMPTY "grp_empty"
#define GROUP_DATASETS "grp_dsets"
#define GROUP_NESTED "grp_nested"
-#define GROUP_ATTR "grp_attr"
+#define GROUP_ATTR "grp_attr"
/* Obj reference */
#define OBJ_REF_DS "Dset1"
@@ -327,8 +327,8 @@ static void gent_nested_vl(hid_t loc_id)
* Function: gent_att_compound_vlstr
*
* Purpose: Generate a dataset and a group.
- * Both has an attribute with a compound datatype consisting
- * of a variable length string
+ * Both has an attribute with a compound datatype consisting
+ * of a variable length string
*
*-------------------------------------------------------------------------
*/
@@ -347,7 +347,7 @@ static void gent_att_compound_vlstr(hid_t loc_id)
hid_t vl_str_tid = -1; /* Variable length datatype ID */
hid_t cmpd_tid = -1; /* Compound datatype ID */
hid_t null_sid = -1; /* Null dataspace ID */
- s1 buf; /* Buffer */
+ s1 buf; /* Buffer */
buf.i = 9;
buf.v = "ThisIsAString";
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index f6cd2dd..72dda6b 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -28,6 +28,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset3.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5
@@ -275,6 +276,8 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp1.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp2.txt
@@ -464,6 +467,7 @@
set (FILE6 h5diff_attr2.h5)
set (FILE7 h5diff_dset1.h5)
set (FILE8 h5diff_dset2.h5)
+ set (FILE8A h5diff_dset3.h5)
set (FILE9 h5diff_hyper1.h5)
set (FILE10 h5diff_hyper2.h5)
set (FILE11 h5diff_empty.h5)
@@ -872,6 +876,10 @@
h5diff_710.out.err
h5diff_80.out
h5diff_80.out.err
+ h5diff_800.out
+ h5diff_800.out.err
+ h5diff_801.out
+ h5diff_801.out.err
h5diff_90.out
h5diff_90.out.err
h5diff_v1.out
@@ -1478,6 +1486,14 @@ ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/
ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
# ##############################################################################
+# # Test array variances
+# ##############################################################################
+#
+# Test with -d , -p and --use-system-epsilon.
+ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
+ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
+
+# ##############################################################################
# VDS tests
# ##############################################################################
ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2})
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index cc7b057..708f371 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -48,6 +48,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define FILE6 "h5diff_attr2.h5"
#define FILE7 "h5diff_dset1.h5"
#define FILE8 "h5diff_dset2.h5"
+#define FILE8A "h5diff_dset3.h5"
#define FILE9 "h5diff_hyper1.h5"
#define FILE10 "h5diff_hyper2.h5"
#define FILE11 "h5diff_empty.h5"
@@ -197,6 +198,7 @@ int main(void)
/* generate 2 files, the second call creates a similar file with differences */
test_datasets(FILE7,0);
test_datasets(FILE8,1);
+ test_datasets(FILE8A,2);
/* generate 2 files, the second call creates a similar file with differences */
test_hyperslab(FILE9,0);
@@ -1328,7 +1330,7 @@ int test_datasets(const char *file,
herr_t status;
int buf[2]={1,2};
- if(make_diffs)
+ if(make_diffs > 0)
memset(buf, 0, sizeof buf);
/* Create a file */
@@ -1399,9 +1401,8 @@ int test_special_datasets(const char *file,
/* Create a dataset with zero dimension size in one file but the other one
* has a dataset with a non-zero dimension size */
- if(make_diffs) {
+ if(make_diffs)
dims[1] = SPACE1_DIM2 + 4;
- }
sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -5466,6 +5467,34 @@ static void test_objs_strings(const char *fname1, const char *fname2)
H5Sclose(space);
H5Dclose(dataset);
+ /* string 5 : early term long string */
+ string4A[0][10] = 0;
+ string4A[0][11] = 0;
+ string4B[0][10] = 0;
+
+ string4A[1][10] = 0;
+ string4A[1][11] = 'Z';
+ string4B[1][10] = 0;
+ string4B[1][11] = 'x';
+
+ string4A[2][10] = 0;
+ string4B[2][10] = 0;
+ string4B[2][11] = 'a';
+ string4B[2][12] = 'B';
+ string4B[2][13] = 'c';
+ space = H5Screate_simple(1, dims4, NULL);
+ f_type = mkstr(168, H5T_STR_NULLTERM);
+ m_type = mkstr(21, H5T_STR_NULLTERM);
+ dataset = H5Dcreate2(fid1, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4A);
+ H5Dclose(dataset);
+ dataset = H5Dcreate2(fid2, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4B);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
out:
/*-----------------------------------------------------------------------
* Close IDs
@@ -6613,6 +6642,9 @@ void write_dset_in(hid_t loc_id,
int buf73[4][3][2]; /* integer */
float buf83[4][3][2]; /* float */
+ if(make_diffs == 2) {
+ dimarray[0] = 4;
+ }
/*-------------------------------------------------------------------------
* H5S_SCALAR
@@ -6621,11 +6653,8 @@ void write_dset_in(hid_t loc_id,
- if ( make_diffs )
- {
-
+ if(make_diffs)
scalar_data = 1;
- }
/* create a space */
sid = H5Screate(H5S_SCALAR);
@@ -7208,7 +7237,7 @@ void write_dset_in(hid_t loc_id,
n=1;
for (i = 0; i < 24; i++) {
- for (j = 0; j < (int)dimarray[0]; j++) {
+ for (j = 0; j < 3; j++) {
if (make_diffs) buf63[i][j]=0;
else buf63[i][j]=n++;
}
diff --git a/tools/test/h5diff/testfiles/diff_strings1.h5 b/tools/test/h5diff/testfiles/diff_strings1.h5
index 8839f5a..0f8b380 100644
--- a/tools/test/h5diff/testfiles/diff_strings1.h5
+++ b/tools/test/h5diff/testfiles/diff_strings1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings2.h5 b/tools/test/h5diff/testfiles/diff_strings2.h5
index 810278c..e8520ae 100644
--- a/tools/test/h5diff/testfiles/diff_strings2.h5
+++ b/tools/test/h5diff/testfiles/diff_strings2.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index a699f00..0a0ee22 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -1,4 +1,4 @@
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_58.txt b/tools/test/h5diff/testfiles/h5diff_58.txt
index 768dd97..d27a0c9 100644
--- a/tools/test/h5diff/testfiles/h5diff_58.txt
+++ b/tools/test/h5diff/testfiles/h5diff_58.txt
@@ -1,5 +1,5 @@
dataset: </refreg> and </refreg>
-Referenced dataset 10720 10720
+Referenced dataset 10784 10784
------------------------------------------------------------
Region blocks
block #0 (2,2)-(7,7) (0,0)-(2,2)
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 3c3ad9f..4362711 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -1,4 +1,4 @@
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 087764a..9ab3204 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -1,5 +1,5 @@
<-d -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index c31a67e..afe0e72 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -1,5 +1,5 @@
<-d 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 05318bd..97a1747 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -1,5 +1,5 @@
<-p -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index fd756b3..78770f0 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -1,5 +1,5 @@
<-p 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index fd8c680..b2a5881 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -1,5 +1,5 @@
<-n -4> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index f0d38af..66a3025 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -1,5 +1,5 @@
<-n 0> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 4ab66a5..f9258d1 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -1,5 +1,5 @@
<-n u> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index f5e7ee3..57a4ddd 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -1,5 +1,5 @@
<-n 0x1> is not a valid option
-usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
+usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
file1 File name of the first HDF5 file
file2 File name of the second HDF5 file
[obj1] Name of an HDF5 object, in absolute path
@@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
-n C, --count=C
Print differences up to C. C must be a positive integer.
-d D, --delta=D
- Print difference if (|a-b| > D). D must be a positive number.
+ Print difference if (|a-b| > D). D must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-p' or '--use-system-epsilon'.
-p R, --relative=R
- Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Print difference if (|(a-b)/b| > R). R must be a positive number. Where a
+ is the data point value in file1 and b is the data point value in file2.
Can not use with '-d' or '--use-system-epsilon'.
--use-system-epsilon
- Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a
+ is the data point value in file1 and b is the data point value in file2.
If the system epsilon is not defined,one of the following predefined
values will be used:
FLT_EPSILON = 1.19209E-07 for floating-point type
DBL_EPSILON = 2.22045E-16 for double precision type
Can not use with '-p' or '-d'.
- --exclude-path "path"
+ --exclude-path "path"
Exclude the specified path to an object when comparing files or groups.
If a group is excluded, all member objects will also be excluded.
The specified path is excluded wherever it occurs.
@@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
common objects.
Object comparison:
- 1) Groups
+ 1) Groups
First compares the names of member objects (relative path, from the
specified group) and generates a report of objects that appear in only
one group or in both groups. Common objects are then compared recursively.
- 2) Datasets
+ 2) Datasets
Array rank and dimensions, datatypes, and data values are compared.
- 3) Datatypes
+ 3) Datatypes
The comparison is based on the return value of H5Tequal.
- 4) Symbolic links
+ 4) Symbolic links
The paths to the target objects are compared.
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/testfiles/h5diff_80.txt
index 5957d72..836e073 100644
--- a/tools/test/h5diff/testfiles/h5diff_80.txt
+++ b/tools/test/h5diff/testfiles/h5diff_80.txt
@@ -865,7 +865,7 @@ position vlen3D vlen3D difference
[ 3 2 1 ] 59 0 59
59 differences found
dataset: </refreg> and </refreg>
-Referenced dataset 10720 10720
+Referenced dataset 10784 10784
------------------------------------------------------------
Region blocks
block #0 (2,2)-(7,7) (0,0)-(2,2)
diff --git a/tools/test/h5diff/testfiles/h5diff_800.txt b/tools/test/h5diff/testfiles/h5diff_800.txt
new file mode 100644
index 0000000..e43e7b4
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_800.txt
@@ -0,0 +1,12 @@
+dataset: </g1/array> and </g1/array>
+size: [2] [2]
+position array array difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 0 ] 2 0 2
+[ 0 ] 3 0 3
+[ 1 ] 4 0 4
+[ 1 ] 5 0 5
+[ 1 ] 6 0 6
+6 differences found
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_801.txt b/tools/test/h5diff/testfiles/h5diff_801.txt
new file mode 100644
index 0000000..043e7e3
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_801.txt
@@ -0,0 +1,13 @@
+dataset: </g1/array> and </g1/array>
+Warning: different storage datatype
+size: [2] [2]
+position array array difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 0 ] 2 0 2
+[ 0 ] 3 0 3
+[ 1 ] 4 0 4
+[ 1 ] 5 0 5
+[ 1 ] 6 0 6
+6 differences found
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_dset1.h5 b/tools/test/h5diff/testfiles/h5diff_dset1.h5
index 123e141..fefd86a 100644
--- a/tools/test/h5diff/testfiles/h5diff_dset1.h5
+++ b/tools/test/h5diff/testfiles/h5diff_dset1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_dset2.h5 b/tools/test/h5diff/testfiles/h5diff_dset2.h5
index 3ae6993..598e481 100644
--- a/tools/test/h5diff/testfiles/h5diff_dset2.h5
+++ b/tools/test/h5diff/testfiles/h5diff_dset2.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_dset3.h5 b/tools/test/h5diff/testfiles/h5diff_dset3.h5
new file mode 100644
index 0000000..893c135
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_dset3.h5
Binary files differ
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 04e405f..897209c 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -90,6 +90,7 @@
${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -137,6 +138,7 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5.ddl
)
foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
@@ -312,7 +314,7 @@
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}"
+ -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
@@ -965,6 +967,11 @@
endif ()
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+#crtorder
+ set (arg tordergr.h5 -L)
+ set (TESTTYPE "TEST")
+ ADD_H5_DMP_TEST (crtorder ${TESTTYPE} 0 ${arg})
+
#########################################################
# layout options (these files have no filters)
#########################################################
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index e479031..bc6b527 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -113,6 +113,7 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5
$SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
+$SRC_TOOLS_TESTFILES/tordergr.h5
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -143,6 +144,7 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
@@ -684,7 +686,7 @@ TOOLTEST_DUMP()
VERIFY h5dump output $@
(
cd $TESTDIR
- $RUNSERIAL $H5DUMP_BIN -pH $outfile
+ $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile
) >$actual 2>$actual_err
cat $actual_err >> $actual
@@ -1051,6 +1053,10 @@ else
TOOLTEST deflate_file $arg
fi
+#crtorder
+arg="tordergr.h5 -L"
+TOOLTEST_DUMP crtorder $arg
+
#########################################################
# layout options (these files have no filters)
#########################################################
diff --git a/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
new file mode 100644
index 0000000..870d154
--- /dev/null
+++ b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
@@ -0,0 +1,36 @@
+HDF5 "out-crtorder.tordergr.h5" {
+GROUP "/" {
+ GROUP "2" {
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a21" {
+ }
+ GROUP "a22" {
+ }
+ }
+ }
+ GROUP "b" {
+ }
+ GROUP "c" {
+ }
+ }
+ GROUP "1" {
+ GROUP "c" {
+ }
+ GROUP "b" {
+ }
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a22" {
+ }
+ GROUP "a21" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 69b1644..65edd89 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -17,6 +17,8 @@ usage: h5repack [OPTIONS] file1 file2
-M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size
-t T, --threshold=T Threshold value for H5Pset_alignment
-a A, --alignment=A Alignment value for H5Pset_alignment
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
-f FILT, --filter=FILT Filter type
-l LAYT, --layout=LAYT Layout type
-S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy
@@ -30,6 +32,8 @@ usage: h5repack [OPTIONS] file1 file2
U - is a filename.
T - is an integer
A - is an integer greater than zero
+ Q - is the sort index type for the input file. It can be "name" or "creation_order" (default)
+ Z - is the sort order type for the input file. It can be "descending" or "ascending" (default)
B - is the user block size, any value that is 512 or greater and is
a power of 2 (1024 default)
F - is the shared object header message type, any of <dspace|dtype|fill|