diff options
-rw-r--r-- | test/vfd_swmr_bigset_writer.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index 23f2125..9c05fa6 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -737,6 +737,17 @@ state_destroy(state_t *s) TEST_ERROR; } + /* The writer ends the tick before closing the file to make the data visible to the reader */ + if (s->writer && s->use_vfd_swmr) { + unsigned long j; + + if (s->vds != vds_multi) + H5Fvfd_swmr_end_tick(s->file[0]); + else + for (j = 0; j < NELMTS(s->file); j++) + H5Fvfd_swmr_end_tick(s->file[j]); + } + /* For checking the time spent in file close. It's for running the writer alone */ if (s->do_perf) { if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) { @@ -2049,17 +2060,6 @@ write_dsets(state_t s, np_state_t *np, mat_t *mat) } } - /* After finishing writing all the chunks, end the tick */ - if (s.use_vfd_swmr && step == (s.nsteps - 1)) { - unsigned long i; - - if (s.vds != vds_multi) - H5Fvfd_swmr_end_tick(s.file[0]); - else - for (i = 0; i < NELMTS(s.file); i++) - H5Fvfd_swmr_end_tick(s.file[i]); - } - /* Notify the reader to start verification by * sending the timestamp and the number of chunks written */ |