diff options
-rw-r--r-- | release_docs/RELEASE.txt | 2 | ||||
-rw-r--r-- | src/H5Distore.c | 9 | ||||
-rw-r--r-- | src/H5Fistore.c | 9 |
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 */ |