summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-10 17:35:34 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-10 17:35:34 (GMT)
commit3f225a14b7e4d29db0cf5bd99dd2387e651f419f (patch)
tree096203d25dec49b1dd634ced43b76a6b3c882f66
parent7a272fc66038db933a4df9adbf599e54be94614c (diff)
downloadhdf5-3f225a14b7e4d29db0cf5bd99dd2387e651f419f.zip
hdf5-3f225a14b7e4d29db0cf5bd99dd2387e651f419f.tar.gz
hdf5-3f225a14b7e4d29db0cf5bd99dd2387e651f419f.tar.bz2
[svn-r5571] Purpose:
Bug Fix (#709)/Code improvement. Description: Allow chunks for chunked datasets to be cached when file is open for read-only access. Platforms tested: IRIX64 6.5 (modi4) w/parallel
-rw-r--r--release_docs/RELEASE.txt2
-rw-r--r--src/H5Distore.c9
-rw-r--r--src/H5Fistore.c9
3 files changed, 12 insertions, 8 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 5bf8427..9a6d09f 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -175,6 +175,8 @@ Documentation
New Features
============
+ * Allow chunks in chunked datasets to be cached when file is opened for
+ read-only access (bug #709). QAK - 2002/06/10
* Added internal "small data" aggregation, which can reduce the number of
actual I/O calls made, improving performance. QAK - 2002/06/05
* Improved internal metadata aggregation, which can reduce the number of
diff --git a/src/H5Distore.c b/src/H5Distore.c
index d966edd..03fd598 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1875,11 +1875,12 @@ H5F_istore_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
/*
- * If MPIO is used, must bypass the chunk-cache scheme because other
- * MPI processes could be writing to other elements in the same chunk.
+ * If MPIO is used and file can be written to, we must bypass the
+ * chunk-cache scheme because other MPI processes could be writing to
+ * other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || IS_H5FD_MPIO(f)
+ || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */
@@ -2062,7 +2063,7 @@ H5F_istore_write(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* MPI processes could be writing to other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || IS_H5FD_MPIO(f)
+ || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index d966edd..03fd598 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -1875,11 +1875,12 @@ H5F_istore_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
/*
- * If MPIO is used, must bypass the chunk-cache scheme because other
- * MPI processes could be writing to other elements in the same chunk.
+ * If MPIO is used and file can be written to, we must bypass the
+ * chunk-cache scheme because other MPI processes could be writing to
+ * other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || IS_H5FD_MPIO(f)
+ || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */
@@ -2062,7 +2063,7 @@ H5F_istore_write(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* MPI processes could be writing to other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || IS_H5FD_MPIO(f)
+ || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */