summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-05-30 08:46:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-05-30 08:46:59 (GMT)
commitbe18b5da13bbaff17ab2ceff6908251e5d65a91f (patch)
treece4811641807828d438ec6fffc9e2a376a542341 /perform/pio_perf.c
parent9fcb8dd01065c6b110e9dd5a9fdb75de0433ecd4 (diff)
downloadhdf5-be18b5da13bbaff17ab2ceff6908251e5d65a91f.zip
hdf5-be18b5da13bbaff17ab2ceff6908251e5d65a91f.tar.gz
hdf5-be18b5da13bbaff17ab2ceff6908251e5d65a91f.tar.bz2
[svn-r5486] Purpose:
Code cleanup and new feature. Description: Cleaned out some old debug print statments. Added option -B for interleaved I/O block size. (Just parsing and sanity check is done. Real I/O implementation is not done yet.) Platforms tested: eirene(pp)
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 78f9cca..73ff4eb 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -103,9 +103,9 @@ static const char *progname = "pio_perf";
* adding more, make sure that they don't clash with each other.
*/
#if 1
-static const char *s_opts = "ha:A:cD:f:P:p:X:x:nd:F:i:o:stT:";
+static const char *s_opts = "ha:A:B:cD:f:P:p:X:x:nd:F:i:o:stT:";
#else
-static const char *s_opts = "ha:A:bcD:f:P:p:X:x:nd:F:i:o:stT:";
+static const char *s_opts = "ha:A:bB:cD:f:P:p:X:x:nd:F:i:o:stT:";
#endif /* 1 */
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
@@ -125,6 +125,15 @@ static struct long_options l_opts[] = {
{ "bin", no_arg, 'b' },
{ "bi", no_arg, 'b' },
#endif /* 0 */
+ { "block-size", require_arg, 'B' },
+ { "block-siz", require_arg, 'B' },
+ { "block-si", require_arg, 'B' },
+ { "block-s", require_arg, 'B' },
+ { "block-", require_arg, 'B' },
+ { "block", require_arg, 'B' },
+ { "bloc", require_arg, 'B' },
+ { "blo", require_arg, 'B' },
+ { "bl", require_arg, 'B' },
{ "chunk", no_arg, 'c' },
{ "chun", no_arg, 'c' },
{ "chu", no_arg, 'c' },
@@ -227,6 +236,7 @@ struct options {
int min_num_procs; /* minimum number of processes to use */
size_t max_xfer_size; /* maximum transfer buffer size */
size_t min_xfer_size; /* minimum transfer buffer size */
+ size_t block_size; /* interleaved block size */
int print_times; /* print times as well as throughputs */
int print_raw; /* print raw data throughput info */
off_t h5_alignment; /* alignment in HDF5 file */
@@ -365,6 +375,7 @@ run_test_loop(struct options *opts)
parms.num_files = opts->num_files;
parms.num_dsets = opts->num_dsets;
parms.num_iters = opts->num_iters;
+ parms.block_size = opts->block_size;
parms.h5_align = opts->h5_alignment;
parms.h5_thresh = opts->h5_threshold;
parms.h5_use_chunks = opts->h5_use_chunks;
@@ -950,6 +961,9 @@ report_parameters(struct options *opts)
recover_size_and_print((long_long)opts->min_xfer_size, ":");
recover_size_and_print((long_long)opts->max_xfer_size, "\n");
+ HDfprintf(output, "rank %d: Interleaved block size=", rank);
+ recover_size_and_print((long_long)opts->block_size, "\n");
+
{
char *prefix = getenv("HDF5_PARAPREFIX");
@@ -990,6 +1004,7 @@ parse_command_line(int argc, char *argv[])
cl_opts->min_num_procs = 1;
cl_opts->max_xfer_size = 1 * ONE_MB;
cl_opts->min_xfer_size = 128 * ONE_KB;
+ cl_opts->block_size = 0; /* no interleaved I/O */
cl_opts->print_times = 0; /* Printing times is off by default */
cl_opts->print_raw = 0; /* Printing raw data throughput is off by default */
cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */
@@ -1041,6 +1056,9 @@ parse_command_line(int argc, char *argv[])
/* the future "binary" option */
break;
#endif /* 0 */
+ case 'B':
+ cl_opts->block_size = parse_size_directive(opt_arg);
+ break;
case 'c': /* Turn on chunked HDF5 dataset creation */
cl_opts->h5_use_chunks = 1;
break;
@@ -1226,6 +1244,8 @@ usage(const char *prog)
#if 0
printf(" -b, --binary The elusive binary option\n");
#endif /* 0 */
+ printf(" -B S, --block-size=S Interleaved block size\n");
+ printf(" [default: 0 no interleaved IO]\n");
printf(" -c, --chunk Create HDF5 datasets chunked [default: off]\n");
printf(" -d N, --num-dsets=N Number of datasets per file [default:1]\n");
printf(" -D DL, --debug=DL Indicate the debugging level\n");