summaryrefslogtreecommitdiffstats
path: root/src/H5Faccum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Faccum.c')
-rw-r--r--src/H5Faccum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 3fac184..48f9bdd 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -726,6 +726,12 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t map_type, haddr_t add
} /* end else */
} /* end if */
else {
+ /* Make certain that data in accumulator is visible before new write */
+ if((H5F_INTENT(fio_info->f) & H5F_ACC_SWMR_WRITE) > 0)
+ /* Flush if dirty and reset accumulator */
+ if(H5F__accum_reset(fio_info, TRUE) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator")
+
/* Write the data */
if(H5FD_write(fio_info->f->shared->lf, fio_info->dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")