diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-11-14 21:35:35 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-11-14 21:35:35 (GMT) |
commit | ce2748f0114cb1eae00799f8349a5451152c7fa3 (patch) | |
tree | fd3e39e6de7b37651a2c7047bd3ad128b5c4e204 /test/vfd_swmr_writer.c | |
parent | e62f4bd4fab00b0cd03e269a858c21558a9321fa (diff) | |
download | hdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.zip hdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.tar.gz hdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.tar.bz2 |
(A) Fixes for the assertion failures described in issue #2 (see John Mainzer's last checkin message):
--src/H5PB.c: checks for size >= page size
--src/H5MF.c: disable/enable page buffering in H5MF_tidy_self_referential_fsm_hack()
--src/H5MFsection.c: call H5PB_remove_entry() for both raw/metadata pages in H5MF__sect_small_merge()
(B) Port and modify existing concurrent swmr tests to VFD SWMR. Also modify the following:
--remove flushes from VFD SWMR writer tests
--set Nreaders to 0 in test/testvfdswmr.sh.in to test for writers only
Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'test/vfd_swmr_writer.c')
-rw-r--r-- | test/vfd_swmr_writer.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/test/vfd_swmr_writer.c b/test/vfd_swmr_writer.c index bf4acb7..083f6298 100644 --- a/test/vfd_swmr_writer.c +++ b/test/vfd_swmr_writer.c @@ -13,13 +13,14 @@ /*------------------------------------------------------------------------- * - * Created: swmr_writer.c + * Created: vfd_swmr_writer.c + * (copied and modified from swmr_writer.c) * * Purpose: Writes data to a randomly selected subset of the datasets - * in the SWMR test file. + * in the VFD SWMR test file. * * This program is intended to run concurrently with the - * swmr_reader program. + * vfd_swmr_reader program. * *------------------------------------------------------------------------- */ @@ -77,7 +78,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, hid_t fapl; /* File access property list */ unsigned u, v; /* Local index variable */ hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ -H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ + H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ HDassert(filename); @@ -85,7 +86,7 @@ H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ if((fapl = h5_fileaccess()) < 0) return -1; - /* FOR NOW: set to use latest format, the "old"parameter is not used */ + /* FOR NOW: set to use latest format, the "old" parameter is not used */ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) return -1; @@ -108,7 +109,7 @@ H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ if(use_log_vfd) { char verbose_name[1024]; - HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed); + HDsnprintf(verbose_name, sizeof(verbose_name), "vfd_swmr_writer.log.%u", random_seed); H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024)); } /* end if */ @@ -144,6 +145,9 @@ H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ if(H5Pclose(fapl) < 0) return -1; + if(config) + HDfree(config); + /* Emit informational message */ if(verbose) HDfprintf(verbose_file, "Opening datasets\n"); @@ -156,8 +160,6 @@ H5F_vfd_swmr_config_t *config = NULL; /* Configuration for VFD SWMR */ symbol_info[u][v].nrecords = 0; } /* end for */ - if(config) - HDfree(config); return fid; } /* open_skeleton() */ @@ -267,9 +269,11 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, /* Check for counter being reached */ if(0 == rec_to_flush) { +#ifdef TEMP_OUT /* Flush contents of file */ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) return -1; +#endif /* TEMP_OUT */ /* Reset flush counter */ rec_to_flush = flush_count; @@ -304,7 +308,7 @@ usage(void) printf("\n"); printf("Usage error!\n"); printf("\n"); - printf("Usage: swmr_writer [-q] [-o] [-f <# of records to write between flushing\n"); + printf("Usage: vfd_swmr_writer [-q] [-o] [-f <# of records to write between flushing\n"); printf(" file contents>] [-r <random seed>] <# of records>\n"); printf("\n"); printf("<# of records to write between flushing file contents> should be 0\n"); @@ -400,7 +404,7 @@ int main(int argc, const char *argv[]) if(verbose) { char verbose_name[1024]; - HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed); + HDsnprintf(verbose_name, sizeof(verbose_name), "vfd_swmr_writer.out.%u", random_seed); if(NULL == (verbose_file = HDfopen(verbose_name, "w"))) { HDfprintf(stderr, "Can't open verbose output file!\n"); HDexit(1); |