summaryrefslogtreecommitdiffstats
path: root/tools/test/perform
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-03-14 04:30:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-03-14 04:30:37 (GMT)
commit0313cbb91d974b153dbe8747d193ac3c619eea3b (patch)
treeaf6c4a631d5753685ee0033a6a8415a25fc97672 /tools/test/perform
parent847d675f2743ec420ef6c9efdd6e52ae93b4fe44 (diff)
downloadhdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.zip
hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.gz
hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.bz2
Final merge of page buffering branch to develop
Diffstat (limited to 'tools/test/perform')
-rw-r--r--tools/test/perform/sio_engine.c11
-rw-r--r--tools/test/perform/sio_perf.c26
-rw-r--r--tools/test/perform/sio_perf.h2
3 files changed, 36 insertions, 3 deletions
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index abf1fa6..2a5efb6 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -1064,6 +1064,7 @@ done:
do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
{
int ret_code = SUCCESS;
+ hid_t fcpl;
switch (param->io_type) {
case POSIXIO:
@@ -1088,9 +1089,17 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
GOTOERROR(FAIL);
}
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ if(param->page_size) {
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)1);
+ H5Pset_file_space_page_size(fcpl, param->page_size);
+ if(param->page_buffer_size)
+ H5Pset_page_buffer_size(fapl, param->page_buffer_size, 0, 0);
+ }
+
/* create the parallel file */
if (flags & (SIO_CREATE | SIO_WRITE)) {
- fd->h5fd = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ fd->h5fd = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl);
} else {
fd->h5fd = H5Fopen(fname, H5F_ACC_RDONLY, fapl);
}
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index 5bae832..2201b99 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -100,7 +100,7 @@ static const char *progname = "h5perf_serial";
* It seems that only the options that accept additional information
* such as dataset size (-e) require the colon next to it.
*/
-static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:";
+static const char *s_opts = "a:A:B:b:c:Cd:D:e:F:G:ghi:Imno:p:P:r:stT:v:wx:X:";
static struct long_options l_opts[] = {
{ "align", require_arg, 'a' },
{ "alig", require_arg, 'a' },
@@ -292,7 +292,8 @@ struct options {
int h5_extendable; /* Perform the write tests only */
int verify; /* Verify data correctness */
vfdtype vfd; /* File driver */
-
+ size_t page_buffer_size;
+ size_t page_size;
};
typedef struct _minmax {
@@ -401,6 +402,8 @@ run_test_loop(struct options *opts)
parms.h5_write_only = opts->h5_write_only;
parms.verify = opts->verify;
parms.vfd = opts->vfd;
+ parms.page_buffer_size = opts->page_buffer_size;
+ parms.page_size = opts->page_size;
/* load multidimensional options */
parms.num_bytes = 1;
@@ -865,6 +868,16 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)opts->buf_size[i], " ");
HDfprintf(output, "\n");
+ if(opts->page_size) {
+ HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size);
+ if(opts->page_buffer_size)
+ HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size);
+ else
+ HDfprintf(output, "Page Buffering Disabled\n");
+ }
+ else
+ HDfprintf(output, "Page Aggregation Disabled\n");
+
HDfprintf(output, "Dimension access order=");
for (i=0; i<rank; i++)
recover_size_and_print((long long)opts->order[i], " ");
@@ -941,6 +954,9 @@ parse_command_line(int argc, char *argv[])
cl_opts = (struct options *)HDmalloc(sizeof(struct options));
+ cl_opts->page_buffer_size = 0;
+ cl_opts->page_size = 0;
+
cl_opts->output_file = NULL;
cl_opts->io_types = 0; /* will set default after parsing options */
cl_opts->num_iters = 1;
@@ -975,6 +991,12 @@ parse_command_line(int argc, char *argv[])
case 'a':
cl_opts->h5_alignment = parse_size_directive(opt_arg);
break;
+ case 'G':
+ cl_opts->page_size = parse_size_directive(opt_arg);
+ break;
+ case 'b':
+ cl_opts->page_buffer_size = parse_size_directive(opt_arg);
+ break;
case 'A':
{
const char *end = opt_arg;
diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h
index 7a7d708..5d9358d 100644
--- a/tools/test/perform/sio_perf.h
+++ b/tools/test/perform/sio_perf.h
@@ -67,6 +67,8 @@ typedef struct parameters_ {
int h5_extendable; /* Make HDF5 dataset chunked */
int h5_write_only; /* Perform the write tests only */
int verify; /* Verify data correctness */
+ size_t page_size;
+ size_t page_buffer_size;
} parameters;
typedef struct results_ {