summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-06-21 21:45:01 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-06-21 21:45:01 (GMT)
commitcf07aa6803a70f52f6a178219097e9f9e6ee1a51 (patch)
tree38bbce437bb596ee74745a550d37a61260610cf4 /src/H5Dchunk.c
parent48e1bbb0f87c6712189f82a7c5d8835a87d21ee2 (diff)
downloadhdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.zip
hdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.tar.gz
hdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.tar.bz2
[svn-r27261] apply metadata enhancement patch that was based on the mdc 3 branch.
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index af5123c..ca7bda5 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -45,6 +45,7 @@
/****************/
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
@@ -56,6 +57,7 @@
#endif /* H5_HAVE_PARALLEL */
#include "H5Dpkg.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File functions */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -2497,6 +2499,9 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled,
/* Check for cached information */
if(!H5D__chunk_cinfo_cache_found(&dset->shared->cache.chunk.last, udata)) {
H5D_chk_idx_info_t idx_info; /* Chunked index info */
+#ifdef H5_HAVE_PARALLEL
+ H5P_coll_md_read_flag_t temp_flag; /* temp flag to hold the coll metadata read setting */
+#endif /* H5_HAVE_PARALLEL */
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
@@ -2505,10 +2510,27 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled,
idx_info.layout = &dset->shared->layout.u.chunk;
idx_info.storage = &dset->shared->layout.storage.u.chunk;
+#ifdef H5_HAVE_PARALLEL
+ if(H5F_HAS_FEATURE(idx_info.f, H5FD_FEAT_HAS_MPI)) {
+ /* disable collective metadata read for chunk indexes
+ as it is highly unlikely that users would read the
+ same chunks from all processes. MSC - might turn on
+ for root node? */
+ temp_flag = idx_info.f->coll_md_read;
+ idx_info.f->coll_md_read = H5P_FORCE_FALSE;
+ }
+#endif /* H5_HAVE_PARALLEL */
+
/* Go get the chunk information */
if((dset->shared->layout.storage.u.chunk.ops->get_addr)(&idx_info, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address")
+#ifdef H5_HAVE_PARALLEL
+ if(H5F_HAS_FEATURE(idx_info.f, H5FD_FEAT_HAS_MPI)) {
+ idx_info.f->coll_md_read = temp_flag;
+ }
+#endif /* H5_HAVE_PARALLEL */
+
/* Cache the information retrieved */
H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, udata);
} /* end if */