summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
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 /src/H5Fistore.c
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
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c9
1 files changed, 5 insertions, 4 deletions
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 */