summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Smith <jake.smith@hdfgroup.org>2019-09-24 21:38:36 (GMT)
committerJacob Smith <jake.smith@hdfgroup.org>2019-09-24 21:40:02 (GMT)
commit9a388325ebaec339f67ddd210ca31ddcc3ede973 (patch)
treec541bac166199e47985bf879663bbf256db9bbf1
parent4ecc50bc136e71329593bef9fc675b6044bcff86 (diff)
parent9c73ed788ad620af7b09aaa75a7582ce30fac6be (diff)
downloadhdf5-9a388325ebaec339f67ddd210ca31ddcc3ede973.zip
hdf5-9a388325ebaec339f67ddd210ca31ddcc3ede973.tar.gz
hdf5-9a388325ebaec339f67ddd210ca31ddcc3ede973.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into bugfix/repack_external_storage
-rw-r--r--configure.ac4
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/H5EA.c4
-rw-r--r--src/H5EAcache.c20
-rw-r--r--src/H5EAhdr.c12
-rw-r--r--src/H5EAprivate.h4
-rw-r--r--src/H5EAtest.c6
-rw-r--r--tools/src/h5stat/h5stat.c4
-rw-r--r--tools/test/h5repack/h5repackgentest.c4
9 files changed, 44 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index b4308f6..e119e0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2280,8 +2280,8 @@ AC_SUBST([INTERNAL_DEBUG_OUTPUT])
## too specialized or have huge performance hits. These
## are not listed in the "all" packages list.
##
-## all_packages="AC,B,B2,D,EA,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
-all_packages="AC,B2,CX,D,EA,F,HL,I,O,S,ST,T,Z"
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
+all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z"
case "X-$INTERNAL_DEBUG_OUTPUT" in
X-yes|X-all)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 26a3c26..6df8af3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1115,8 +1115,8 @@ if (BUILD_SHARED_LIBS)
set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
endif ()
-## all_packages="AC,B,B2,D,EA,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
-#all_packages="AC,B2,CX,D,EA,F,HL,I,O,S,ST,T,Z"
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
+#all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z"
option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
#-----------------------------------------------------------------------------
@@ -1137,7 +1137,7 @@ if (NOT ONLY_SHARED_LIBS)
${HDF_EXTRA_FLAGS}
PRIVATE
$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5EA_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
)
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_LIB_TARGET}
@@ -1175,7 +1175,7 @@ if (BUILD_SHARED_LIBS)
PRIVATE
$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5EA_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
)
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_LIBSH_TARGET}
diff --git a/src/H5EA.c b/src/H5EA.c
index 604df5d..96eee12 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -877,7 +877,7 @@ H5EA_close(H5EA_t *ea))
if(pending_delete) {
H5EA_hdr_t *hdr; /* Another pointer to extensible array header */
-#ifdef H5EA_DEBUG
+#ifndef NDEBUG
{
unsigned hdr_status = 0; /* Header's status in the metadata cache */
@@ -890,7 +890,7 @@ H5EA_close(H5EA_t *ea))
HDassert(hdr_status & H5AC_ES__IS_PINNED);
HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
-#endif /* H5EA_DEBUG */
+#endif /* NDEBUG */
/* Lock the array header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index d55a2b4..da67e6b 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -581,7 +581,11 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing))
break;
default:
+#ifdef NDEBUG
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
+#else /* NDEBUG */
+ HDassert(0 && "Unknown action?!?");
+#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
@@ -974,7 +978,11 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing))
break;
default:
+#ifdef NDEBUG
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
+#else /* NDEBUG */
+ HDassert(0 && "Unknown action?!?");
+#endif /* NDEBUG */
} /* end switch */
CATCH
@@ -1382,7 +1390,11 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing))
break;
default:
+#ifdef NDEBUG
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
+#else /* NDEBUG */
+ HDassert(0 && "Unknown action?!?");
+#endif /* NDEBUG */
} /* end switch */
CATCH
@@ -1791,7 +1803,11 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing))
break;
default:
+#ifdef NDEBUG
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
+#else /* NDEBUG */
+ HDassert(0 && "Unknown action?!?");
+#endif /* NDEBUG */
} /* end switch */
CATCH
@@ -2168,7 +2184,11 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing))
break;
default:
+#ifdef NDEBUG
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
+#else /* NDEBUG */
+ HDassert(0 && "Unknown action?!?");
+#endif /* NDEBUG */
} /* end switch */
CATCH
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 8a2e1d1..ec40298 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -49,10 +49,10 @@
/* Local Macros */
/****************/
-#ifdef H5EA_DEBUG
+#ifndef NDEBUG
/* Max. # of bits for max. nelmts index */
#define H5EA_MAX_NELMTS_IDX_MAX 64
-#endif /* H5EA_DEBUG */
+#endif /* NDEBUG */
/* # of elements in a data block for a particular super block */
#define H5EA_SBLK_DBLK_NELMTS(s, m) \
@@ -366,7 +366,7 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata))
HDassert(f);
HDassert(cparam);
-#ifdef H5EA_DEBUG
+#ifndef NDEBUG
{
unsigned sblk_idx; /* Super block index for first "actual" super block */
size_t dblk_nelmts; /* Number of data block elements */
@@ -398,7 +398,7 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata))
if(cparam->max_dblk_page_nelmts_bits > cparam->max_nelmts_bits)
H5E_THROW(H5E_BADVALUE, "max. # of elements per data block page bits must be <= max. # of elements bits")
}
-#endif /* H5EA_DEBUG */
+#endif /* NDEBUG */
/* Allocate space for the shared information */
if(NULL == (hdr = H5EA__hdr_alloc(f)))
@@ -724,7 +724,7 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr))
HDassert(hdr);
HDassert(!hdr->file_rc);
-#ifdef H5EA_DEBUG
+#ifndef NDEBUG
{
unsigned hdr_status = 0; /* Array header's status in the metadata cache */
@@ -736,7 +736,7 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr))
HDassert(hdr_status & H5AC_ES__IN_CACHE);
HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
} /* end block */
-#endif /* H5EA_DEBUG */
+#endif /* NDEBUG */
/* Check for index block */
if(H5F_addr_defined(hdr->idx_blk_addr)) {
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index 6067ed0..1195256 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -150,8 +150,8 @@ H5_DLL herr_t H5EA_patch_file(H5EA_t *fa, H5F_t *f);
H5_DLL herr_t H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats);
/* Debugging routines */
-#ifdef H5EA_DEBUG
-#endif /* H5EA_DEBUG */
+#ifdef H5EA_DEBUGGING
+#endif /* H5EA_DEBUGGING */
#endif /* _H5EAprivate_H */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index f7731eb..814e64f 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -282,9 +282,9 @@ herr_t, SUCCEED, -,
H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx))
/* Local variables */
-#ifdef H5EA_DEBUG
+#ifndef NDEBUG
H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */
-#endif /* H5EA_DEBUG */
+#endif /* NDEBUG */
uint64_t *elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
@@ -292,9 +292,7 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx))
HDassert(raw);
HDassert(elmt);
HDassert(nelmts);
-#ifdef H5EA_DEBUG
HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
-#endif /* H5EA_DEBUG */
/* Decode raw elements into native elements */
while(nelmts) {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 9528d2c..3eea368 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -173,7 +173,7 @@ struct handler_t {
char **obj;
};
-static const char *s_opts ="Aa:Ddm:EFfhGgl:sSTO:Vw:";
+static const char *s_opts ="Aa:Ddm:EFfhGgl:sSTO:Vw:H:";
/* e.g. "filemetadata" has to precede "file"; "groupmetadata" has to precede "group" etc. */
static struct long_options l_opts[] = {
{"help", no_arg, 'h'},
@@ -2014,7 +2014,7 @@ done:
iter_free(&iter);
if (fapl_id != H5P_DEFAULT) {
- if (0 < H5Pclose(fapl_id)) {
+ if (H5Pclose(fapl_id) < 0) {
error_msg("unable to close fapl entry\n");
h5tools_setstatus(EXIT_FAILURE);
}
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 6e2c6bf..12883b7 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -26,6 +26,10 @@
*
* There is no restriction on the name, number, or structure of datasets and
* groups in HDF5 file.
+ *
+ * The inluded datatypes should be more than adequate to verify the correctness
+ * of the behavior -- if one type can be consolidated from external storage,
+ * then thay all can.
*/
#include "hdf5.h"