summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorvchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>2021-11-16 23:39:05 (GMT)
committerGitHub <noreply@github.com>2021-11-16 23:39:05 (GMT)
commitf3293556b7af7191496909f4577e983da19a9e68 (patch)
tree8f9a1bfab01ede517230e87ef65b91139fa603e7 /test
parentb92c7e58a97bc81a8983da3312dbfe72f6a75745 (diff)
parentd4bd58d1ecd97436806288bf57b6351dc025af38 (diff)
downloadhdf5-f3293556b7af7191496909f4577e983da19a9e68.zip
hdf5-f3293556b7af7191496909f4577e983da19a9e68.tar.gz
hdf5-f3293556b7af7191496909f4577e983da19a9e68.tar.bz2
Merge pull request #45 from vchoi-hdfgroup/feature/vfd_swmr
Feature/vfd swmr
Diffstat (limited to 'test')
-rw-r--r--test/testvfdswmr.sh.in34
-rw-r--r--test/vfd_swmr_bigset_writer.c32
-rw-r--r--test/vfd_swmr_common.c13
-rw-r--r--test/vfd_swmr_common.h3
-rw-r--r--test/vfd_swmr_gperf_writer.c197
5 files changed, 174 insertions, 105 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in
index 4dc1e82..535aafa 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -1047,31 +1047,31 @@ fi
#
BIGSET_n=25 # -n option: # of iterations
BIGSET_few_s=10 # -s option: # of datasets (for few_big test)
-BIGSET_many_s=100 # -s option: # of datasets (for many_small test)
+BIGSET_many_s=50 # -s option: # of datasets (for many_small test)
#
#
# Setting for exhaustive and quick runs
#
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
- BIGSET_n=200
- BIGSET_few_s=100
- BIGSET_many_s=1000
+ BIGSET_n=100
+ BIGSET_few_s=25
+ BIGSET_many_s=100
elif [[ "$HDF5TestExpress" -gt 1 ]]; then # quick run
BIGSET_n=10
BIGSET_few_s=3
- BIGSET_many_s=50
+ BIGSET_many_s=25
fi
#
#
-for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t -R" "-d 1 -V" "-d 1 -M" "-d 1 -V -F" "-d 1 -M -F"; do
+for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t -F" "-d 1 -t -R" "-d 1 -V" "-d 1 -M" "-d 1 -V -F" "-d 1 -M -F"; do
if [ ${do_many_small:-no} = no ]; then
continue
fi
#
- # Test many small datasets of one and two dimensions.
+ # Test many small datasets of two or three dimensions.
#
# Perform 25 iterations on 100 extensible datasets configured with
- # 2D 16x16 chunks or 3D 8x16x16 chunks of 32-bit unsigned integer elements,
+ # 2D 16x16 chunks or 3D 1x16x16 chunks of 32-bit unsigned integer elements,
# expanding each dataset by a chunk in one dimension (up to 25x1
# 16x16 chunks) on each iteration.
#
@@ -1079,16 +1079,16 @@ for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t
# in *two* dimensions (up to 25x25 16x16 chunks).
#
# If testing 3D datasets (-t option), extending each dataset along the
- # first dimension (up to 25 8x16x16)
+ # first dimension (up to 25 1x16x16)
#
echo launch vfd_swmr_bigset_writer many small, options $options
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 8 -r 16 -c 16 -q -l 3 &
+ ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 8 -r 16 -c 16 -q -l 3 &
+ ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
@@ -1116,12 +1116,12 @@ for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t
done
# bigset test for bigger chunks
-for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t -R" "-d 1 -V" "-d 1 -M" "-d 1 -V -F" "-d 1 -M -F"; do
+for options in "-d 1" "-d 1 -F" "-d 2 -l 10" "-d 2 -F -l 10" "-d 1 -t -l 10" "-d 1 -t -F -l 10" "-d 1 -t -R" "-d 1 -V" "-d 1 -M" "-d 1 -V -F" "-d 1 -M -F"; do
#
- # Test a few big datasets of one and two dimensions.
+ # Test a few big datasets of two or three dimensions.
#
# Perform 25 iterations on 10 extensible datasets configured with
- # 2D 256x256 chunks or 3D 64x256x256 of 32-bit unsigned integer elements,
+ # 2D 256x256 chunks or 3D 8x256x256 of 32-bit unsigned integer elements,
# expanding each dataset by a chunk in one dimension (up to 25x1
# 256x256 chunks) on each iteration.
#
@@ -1129,7 +1129,7 @@ for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t
# in *two* dimensions (up to 25x25 256x256 chunks).
#
# If testing 3D datasets (-t option), extending each dataset along the
- # first dimension (up to 25 64x256x256)
+ # first dimension (up to 25 8x256x256)
#
if [ ${do_few_big:-no} = no ]; then
@@ -1137,11 +1137,11 @@ for options in "-d 1" "-d 1 -F" "-d 2" "-d 2 -F" "-d 1 -t" "-d 1 -t -F" "-d 1 -t
fi
echo launch vfd_swmr_bigset_writer few big, options $options ......may take some time......
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 64 -r 256 -c 256 -q -l 3 &
+ ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 64 -r 256 -c 256 -q -l 3 &
+ ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c
index 956973a..77c7b26 100644
--- a/test/vfd_swmr_bigset_writer.c
+++ b/test/vfd_swmr_bigset_writer.c
@@ -149,6 +149,7 @@ typedef struct {
bool test_3d;
enum { vds_off, vds_single, vds_multi } vds;
bool use_vfd_swmr;
+ bool use_legacy_swmr;
bool use_named_pipe;
bool do_perf;
bool cross_chunk_read;
@@ -214,6 +215,7 @@ state_initializer(void)
.test_3d = false,
.vds = vds_off,
.use_vfd_swmr = true,
+ .use_legacy_swmr = false,
.use_named_pipe = true,
.do_perf = false,
.cross_chunk_read = false,
@@ -256,6 +258,7 @@ usage(const char *progname)
"-P: do the performance measurement\n"
"-R: flush raw data\n"
"-S: do not use VFD SWMR\n"
+ "-T: use legacy SWMR (-S and -N must also be specified)\n"
"-V: use virtual datasets and a single\n"
" source file\n"
"-a steps: `steps` between adding attributes\n"
@@ -339,7 +342,7 @@ state_init(state_t *s, int argc, char **argv)
if (tfile)
HDfree(tfile);
- while ((ch = getopt(argc, argv, "CFMNPRSVa:bc:d:e:f:g:j:k:l:m:n:o:p:qr:s:tu:v:w:")) != -1) {
+ while ((ch = getopt(argc, argv, "CFMNPRSTVa:bc:d:e:f:g:j:k:l:m:n:o:p:qr:s:tu:v:w:")) != -1) {
switch (ch) {
case 'C':
/* This flag indicates cross-over chunk read during data validation */
@@ -362,6 +365,9 @@ state_init(state_t *s, int argc, char **argv)
case 'S':
s->use_vfd_swmr = false;
break;
+ case 'T':
+ s->use_legacy_swmr = true;
+ break;
case 'V':
s->vds = vds_single;
break;
@@ -745,6 +751,18 @@ state_init(state_t *s, int argc, char **argv)
TEST_ERROR;
}
+ if (s->use_legacy_swmr) {
+ if (s->use_vfd_swmr) {
+ HDfprintf(stderr, "Can't use both VFD SWMR and Legacy SWMR\n");
+ TEST_ERROR;
+ }
+
+ if (s->use_named_pipe) {
+ HDfprintf(stderr, "Can't use named pipe for the Legacy SWMR\n");
+ TEST_ERROR;
+ }
+ }
+
return true;
error:
@@ -826,14 +844,14 @@ state_destroy(state_t *s)
if (s->vds != vds_multi) {
if (H5Fvfd_swmr_end_tick(s->file[0]) < 0) {
- HDfprintf(stderr, "H5Fclose failed\n");
+ HDfprintf(stderr, "H5Fvfd_swmr_end_tick failed\n");
TEST_ERROR;
}
}
else {
for (j = 0; j < NELMTS(s->file); j++)
if (H5Fvfd_swmr_end_tick(s->file[j]) < 0) {
- HDfprintf(stderr, "H5Fclose failed\n");
+ HDfprintf(stderr, "H5Fvfd_swmr_end_tick failed\n");
TEST_ERROR;
}
}
@@ -2081,7 +2099,7 @@ verify_dsets(state_t s, np_state_t *np, mat_t *mat)
* the validation of the chunks */
if (s.use_named_pipe && below_speed_limit(&(last.time), &(s.ival))) {
AT();
- HDfprintf(stderr, "verify_extensible_dset took too long to finish\n");
+ HDfprintf(stderr, "Warning: verify_extensible_dset took too long to finish\n");
}
/* For checking the time lapse between the writer's finishing writing a batch of chunks
@@ -2544,6 +2562,12 @@ main(int argc, char **argv)
TEST_ERROR;
}
+ /* Enable the Legacy SWMR writing mode if specified */
+ if (s.use_legacy_swmr && H5Fstart_swmr_write(s.file[0]) < 0) {
+ HDfprintf(stderr, "failed to start the Legacy SWMR writing mode\n");
+ TEST_ERROR;
+ }
+
/* Start to write chunks. The writer writes as many chunks as possible within a tick, then
* notify the reader. But it doesn't receive back the reader's notice. */
if (!write_dsets(s, &np, mat)) {
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c
index f57f39a..cfe93aa 100644
--- a/test/vfd_swmr_common.c
+++ b/test/vfd_swmr_common.c
@@ -369,6 +369,19 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t
} /* init_vfd_swmr_config() */
+/* Initialize the log file path in config, this function should be called after init_vfd_swmr_config. */
+void
+init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr, ...)
+
+{
+ va_list ap;
+
+ HDva_start(ap, log_file_fmtstr);
+ evsnprintf(config->log_file_path, sizeof(config->log_file_path), log_file_fmtstr, ap);
+ HDva_end(ap);
+
+} /* init_vfd_swmr_log() */
+
/* Perform common VFD SWMR configuration on the file-access property list:
* configure page buffering, set reasonable VFD SWMR defaults.
*/
diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h
index b2fbbbd..f5981a5 100644
--- a/test/vfd_swmr_common.h
+++ b/test/vfd_swmr_common.h
@@ -77,6 +77,9 @@ H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tic
hbool_t writer, hbool_t flush_raw_data, uint32_t md_pages_reserved,
const char *md_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 7, 8);
+H5TEST_DLL void init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr, ...)
+ H5_ATTR_FORMAT(printf, 2, 3);
+
H5TEST_DLL hid_t vfd_swmr_create_fcpl(H5F_fspace_strategy_t fs_strategy, hsize_t fs_page_size);
H5TEST_DLL void dbgf(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c
index e21f931..3342b40 100644
--- a/test/vfd_swmr_gperf_writer.c
+++ b/test/vfd_swmr_gperf_writer.c
@@ -12,6 +12,12 @@
/* Description of this program:
* This program checks the performance of group creations for VFD SWMR.
+ * It also has an option to turn on the VFD SWMR logging feature and generates
+ * a log message for group creations. The performance test illustration is in
+ * section I. The log feature illustration is in section II.
+ *
+ * I. Performance tests with options
+ *
* Currently the group creation time, H5Fopen and H5Fclose time are measured.
* After compiling the program,
* ./vfd_swmr_gperf_writer -n 1000 -P -N 5 -q
@@ -29,6 +35,18 @@
* The program is run with max_lag = 8, tick_len = 4;
* The page buffer size is 16384 bytes. The page size is 8192 bytes.
*
+ * II. How to generate log message
+ *
+ * ./vfd_swmr_gperf_writer -n 100000 -P -L -q
+ * will generate 100000 groups, each group has one attribute. It also writes the log message
+ * to file "log-test" under the same directory.
+ * To turn on the log feature, one just needs to provide the log file path as
+ * indicated by the line init_vfd_swmr_log(&config, "./log-test") in the main
+ * function. The init_vfd_swmr_log is defined inside the vfd_swmr_common.c.
+ * The "log-test" should include something like:
+ * 'EOT_PROCESSING_TIME : 0.040 s: Writer time is 1 milliseconds'
+ * The standard output of performance measurement can help check the correctness in the "log-test".
+ *
*/
#define H5F_FRIEND /*suppress error about including H5Fpkg */
@@ -63,6 +81,7 @@ typedef struct {
uint32_t max_lag;
uint32_t tick_len;
bool gperf;
+ bool glog;
double min_gc_time;
double max_gc_time;
double mean_gc_time;
@@ -84,7 +103,7 @@ typedef struct {
.file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
.filetype = H5T_NATIVE_UINT32, .asteps = 1, .nsteps = 100, .use_vfd_swmr = true, \
.old_style_grp = false, .grp_op_pattern = ' ', .grp_op_test = false, .at_pattern = ' ', \
- .attr_test = false, .tick_len = 4, .max_lag = 7, .gperf = false, .min_gc_time = 100., \
+ .attr_test = false, .tick_len = 4, .max_lag = 7, .gperf = false, .glog = false, .min_gc_time = 100., \
.max_gc_time = 0., .mean_gc_time = 0., .total_gc_time = 0., .total_time = 0., .mean_time = 0., \
.fo_total_time = 0., .fc_total_time = 0., .num_attrs = 1, .vlstr_test = false, .ps = 4096, \
.pbs = 4096, .nglevels = 0 \
@@ -93,88 +112,91 @@ typedef struct {
static void
usage(const char *progname)
{
- fprintf(stderr,
- "usage: ./%s -P -n 1000 -N 5 -q (create 1000 groups, each group has 5 attributes)\n"
- "Options: \n"
- " [-P] [-S] [-G] [-t tick_len] [-m max_lag][-B pbs] [-s ps]\n"
- " [-n ngroups] [-l ng_levels] [-O grp_op_pattern]\n"
- " [-N num_attrs] [-V] [-b] [-A at_pattern] [-a steps] [-q]\n"
- "\n"
- "-P: carry out the performance test\n"
- "-S: do not use VFD SWMR\n"
- "-G: old-style type of group\n"
- "-t tick_len: length of a tick in tenths of a second.\n"
- "-m max_lag: maximum expected lag(in ticks) between writer and readers\n"
- "-B pbs: page Buffer Size in bytes:\n"
- " The default value is 4K(4096).\n"
- "-s ps: page size used by page aggregation, page buffer and \n"
- " the metadata file. \n"
- "-n ngroups: the number of groups\n"
- "-l ng_levels: the number of level of nested groups. \n"
- " If all the groups are under the root group, \n"
- " this number should be 0.\n"
- "-N num_attrs: the number of attributes \n"
- "-V use variable length string attributes for performance test\n"
- "-b: write data in big-endian byte order\n"
- " (For the performance test, -V overwrites -b)\n"
- "-A at_pattern: `at_pattern' for different attribute tests\n"
- " The value of `at_pattern` is one of the following:\n"
- " `compact` - Attributes added in compact storage\n"
- " `dense` - An attribute added in dense storage\n"
- " `compact-del` - Attributes added and then one\n"
- " attribute deleted, in compact \n"
- " `dense-del` - Attributes added until the storage\n"
- " is dense then an attribute deleted\n"
- " the storge still in dense\n"
- " `compact-add-to-dense` - Attributes added first in compact\n"
- " then in dense storage\n"
- " `dense-del-to-compact` - Attributes added until the storage\n"
- " is dense, then several attributes \n"
- " deleted, the storage changed to\n"
- " compact\n"
- " `modify` - An attribute added then modified\n"
- " `add-vstr` - A VL string attribute added\n"
- " `remove-vstr` - A VL string attribute added then\n"
- " deleted\n"
- " `modify-vstr` - A VL string attribute added then \n"
- " modified \n"
- " `add-ohr-block` - An attribute is added and this forces\n"
- " the creation of object header\n"
- " continuation block \n"
- " `del-ohr-block` - An attribute is added and this forces\n"
- " the creation of object header\n"
- " continuation block and then this \n"
- " attribute is deleted so the \n"
- " object header continuation block is \n"
- " removed. \n"
- "-O grp_op_pattern: `grp_op_pattern' for different group operation tests\n"
- " The value of `grp_op_pattern` is one of the following:\n"
- " `grp-creation` - A group is created.\n"
- " `grp-deletion` - An existing group is deleted.\n"
- " `grp-move` - A group is moved to become \n"
- " another group. \n"
- " `grp-ins-links` - Links are inserted, including\n"
- " both hard and soft links. \n"
- " `grp-del-links` - Links are deleted, including\n"
- " both hard ans soft links. \n"
- " `grp-compact-t-dense` - Links are inserted to the group.\n"
- " The link storage of this group \n"
- " changed from compact to dense. \n"
- " The links include both hard and\n"
- " soft links. \n"
- " `grp-dense-t-compact` - Links are inserted to the group\n"
- " The link storage of this group \n"
- " changed from compact to dense. \n"
- " Then several links are deleted.\n"
- " The link storage changed from \n"
- " dense to compact again. \n"
- " The links include both hard and\n"
- " soft links. \n"
- "-a steps: `steps` between adding attributes\n"
- " (Don't recommend to use this option for performance test.)\n"
- "-q: silence printouts, few messages\n"
- "\n",
- progname);
+ fprintf(
+ stderr,
+ "usage: ./%s -P -n 1000 -N 5 -q (create 1000 groups, each group has 5 attributes)\n"
+ "usage: ./%s -P -L -n 100000 -q (create 100000 groups and generate log message to file 'log-test')\n"
+ "Options: \n"
+ " [-P] [-S] [-G] [-L] [-t tick_len] [-m max_lag][-B pbs] [-s ps]\n"
+ " [-n ngroups] [-l ng_levels] [-O grp_op_pattern]\n"
+ " [-N num_attrs] [-V] [-b] [-A at_pattern] [-a steps] [-q]\n"
+ "\n"
+ "-P: carry out the performance test\n"
+ "-S: do not use VFD SWMR\n"
+ "-G: old-style type of group\n"
+ "-L: Turn on the logging feature.\n"
+ "-t tick_len: length of a tick in tenths of a second.\n"
+ "-m max_lag: maximum expected lag(in ticks) between writer and readers\n"
+ "-B pbs: page Buffer Size in bytes:\n"
+ " The default value is 4K(4096).\n"
+ "-s ps: page size used by page aggregation, page buffer and \n"
+ " the metadata file. \n"
+ "-n ngroups: the number of groups\n"
+ "-l ng_levels: the number of level of nested groups. \n"
+ " If all the groups are under the root group, \n"
+ " this number should be 0.\n"
+ "-N num_attrs: the number of attributes \n"
+ "-V use variable length string attributes for performance test\n"
+ "-b: write data in big-endian byte order\n"
+ " (For the performance test, -V overwrites -b)\n"
+ "-A at_pattern: `at_pattern' for different attribute tests\n"
+ " The value of `at_pattern` is one of the following:\n"
+ " `compact` - Attributes added in compact storage\n"
+ " `dense` - An attribute added in dense storage\n"
+ " `compact-del` - Attributes added and then one\n"
+ " attribute deleted, in compact \n"
+ " `dense-del` - Attributes added until the storage\n"
+ " is dense then an attribute deleted\n"
+ " the storge still in dense\n"
+ " `compact-add-to-dense` - Attributes added first in compact\n"
+ " then in dense storage\n"
+ " `dense-del-to-compact` - Attributes added until the storage\n"
+ " is dense, then several attributes \n"
+ " deleted, the storage changed to\n"
+ " compact\n"
+ " `modify` - An attribute added then modified\n"
+ " `add-vstr` - A VL string attribute added\n"
+ " `remove-vstr` - A VL string attribute added then\n"
+ " deleted\n"
+ " `modify-vstr` - A VL string attribute added then \n"
+ " modified \n"
+ " `add-ohr-block` - An attribute is added and this forces\n"
+ " the creation of object header\n"
+ " continuation block \n"
+ " `del-ohr-block` - An attribute is added and this forces\n"
+ " the creation of object header\n"
+ " continuation block and then this \n"
+ " attribute is deleted so the \n"
+ " object header continuation block is \n"
+ " removed. \n"
+ "-O grp_op_pattern: `grp_op_pattern' for different group operation tests\n"
+ " The value of `grp_op_pattern` is one of the following:\n"
+ " `grp-creation` - A group is created.\n"
+ " `grp-deletion` - An existing group is deleted.\n"
+ " `grp-move` - A group is moved to become \n"
+ " another group. \n"
+ " `grp-ins-links` - Links are inserted, including\n"
+ " both hard and soft links. \n"
+ " `grp-del-links` - Links are deleted, including\n"
+ " both hard ans soft links. \n"
+ " `grp-compact-t-dense` - Links are inserted to the group.\n"
+ " The link storage of this group \n"
+ " changed from compact to dense. \n"
+ " The links include both hard and\n"
+ " soft links. \n"
+ " `grp-dense-t-compact` - Links are inserted to the group\n"
+ " The link storage of this group \n"
+ " changed from compact to dense. \n"
+ " Then several links are deleted.\n"
+ " The link storage changed from \n"
+ " dense to compact again. \n"
+ " The links include both hard and\n"
+ " soft links. \n"
+ "-a steps: `steps` between adding attributes\n"
+ " (Don't recommend to use this option for performance test.)\n"
+ "-q: silence printouts, few messages\n"
+ "\n",
+ progname, progname);
exit(EXIT_FAILURE);
}
@@ -203,7 +225,7 @@ state_init(state_t *s, int argc, char **argv)
if (argc == 1)
usage(s->progname);
- while ((ch = getopt(argc, argv, "PSGa:bVt:m:B:s:n:qA:N:l:O:")) != -1) {
+ while ((ch = getopt(argc, argv, "PSGLa:bVt:m:B:s:n:qA:N:l:O:")) != -1) {
switch (ch) {
case 'P':
s->gperf = true;
@@ -214,6 +236,9 @@ state_init(state_t *s, int argc, char **argv)
case 'G':
s->old_style_grp = true;
break;
+ case 'L':
+ s->glog = true;
+ break;
case 'a':
case 'n':
case 'N':
@@ -2764,6 +2789,10 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */
init_vfd_swmr_config(&config, s.tick_len, s.max_lag, writer, FALSE, 128, "./group-shadow");
+ /* If the log flag is on, create the log file log-test under the current directory. */
+ if (s.glog == true)
+ init_vfd_swmr_log(&config, "./log-test");
+
/* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST)
* as the second parameter of H5Pset_libver_bound() that is called by
* vfd_swmr_create_fapl. Otherwise, the latest file format(H5F_LIBVER_LATEST)