diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2021-07-15 14:49:29 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2021-07-15 14:49:29 (GMT) |
commit | 0bfc2b7f707f4f272e9a67c031ea96b9e7b63247 (patch) | |
tree | b850fa21a22540505d802b7a03374063a8bfd62f /test | |
parent | fedd949b4f1ce6b550c6c587aeda6d9fc6227c4c (diff) | |
download | hdf5-0bfc2b7f707f4f272e9a67c031ea96b9e7b63247.zip hdf5-0bfc2b7f707f4f272e9a67c031ea96b9e7b63247.tar.gz hdf5-0bfc2b7f707f4f272e9a67c031ea96b9e7b63247.tar.bz2 |
Minor change: move the end tick function to just before the file is closed.
Diffstat (limited to 'test')
-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 */ |