diff options
author | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-02-02 22:01:35 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-02-02 22:01:35 (GMT) |
commit | d8e77f13be0b849fdadedf2fb4689eb2ce04aaeb (patch) | |
tree | cdc33e6b5dae4d920ab8ef7b5f8691a8d36a13a1 /test/vfd_swmr_remove_reader.c | |
parent | 592f8b738eb3fbab9805f2bf2ed9130539a6663b (diff) | |
download | hdf5-d8e77f13be0b849fdadedf2fb4689eb2ce04aaeb.zip hdf5-d8e77f13be0b849fdadedf2fb4689eb2ce04aaeb.tar.gz hdf5-d8e77f13be0b849fdadedf2fb4689eb2ce04aaeb.tar.bz2 |
(1) Add new routine to configure for VFD SWMR: init_vfd_swmr_config()
(2) Revise routine to setup fapl for VFD SWMR legacy and other integration tests: vfd_swmr_create_fapl()
(3) Update all VFD SWMR integration tests to use the above two routines
(4) Clean up VFD SWMR legacy tests: turn on compression in test script, remove #ifdef OUT H5Fflush(), message file name
Diffstat (limited to 'test/vfd_swmr_remove_reader.c')
-rw-r--r-- | test/vfd_swmr_remove_reader.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/test/vfd_swmr_remove_reader.c b/test/vfd_swmr_remove_reader.c index f56fce3..c4eaba2 100644 --- a/test/vfd_swmr_remove_reader.c +++ b/test/vfd_swmr_remove_reader.c @@ -32,6 +32,7 @@ #include "h5test.h" #include "vfd_swmr_common.h" +#include "swmr_common.h" /*******************/ /* Local Variables */ @@ -297,31 +298,18 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, start_time = HDtime(NULL); curr_time = start_time; - /* Create file access property list */ - if((fapl = h5_fileaccess()) < 0) - goto error; - - /* - * Set up to open the file with VFD SWMR configured. - */ - /* Enable page buffering */ - if(H5Pset_page_buffer_size(fapl, 4096, 0, 0) < 0) - goto error; - /* Allocate memory for the configuration structure */ if((config = HDcalloc(1, sizeof(*config))) == NULL) goto error; - config->version = H5F__CURR_VFD_SWMR_CONFIG_VERSION; - config->tick_len = 4; - config->max_lag = 5; - config->writer = FALSE; - config->md_pages_reserved = 128; - HDstrcpy(config->md_file_path, "./rw-shadow"); + /* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */ + init_vfd_swmr_config(config, 4, 5 , FALSE, FALSE, 128, "./rw-shadow"); - /* Enable VFD SWMR configuration */ - if(H5Pset_vfd_swmr_config(fapl, config) < 0) + /* use_latest_format, use_vfd_swmr, only_meta_page, config */ + if((fapl = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, config)) < 0) { + fprintf(stderr, "%s.%d: vfd_swmr_create_fapl failed\n", __func__, __LINE__); goto error; + } /* Loop over reading records until [at least] the correct # of seconds have passed */ while(curr_time < (time_t)(start_time + (time_t)nseconds)) { @@ -567,7 +555,7 @@ int main(int argc, const char *argv[]) return -1; /* Reading records from datasets */ - if(read_records(COMMON_FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { + if(read_records(VFD_SWMR_FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) { HDfprintf(stderr, "READER: Error reading records from datasets!\n"); HDexit(1); } /* end if */ |