diff options
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r-- | src/H5Distore.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 */ |