From 3f225a14b7e4d29db0cf5bd99dd2387e651f419f Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 10 Jun 2002 12:35:34 -0500 Subject: [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 --- release_docs/RELEASE.txt | 2 ++ src/H5Distore.c | 9 +++++---- 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 */ -- cgit v0.12