diff options
Diffstat (limited to 'perform')
-rw-r--r-- | perform/pio_engine.c | 23 | ||||
-rw-r--r-- | perform/pio_perf.c | 38 | ||||
-rw-r--r-- | perform/pio_perf.h | 1 |
3 files changed, 53 insertions, 9 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 126d88a..60c4590 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -1518,12 +1518,23 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) GOTOERROR(FAIL); } - /* Set the file driver to the MPI-I/O driver */ - hrc = H5Pset_fapl_mpio(acc_tpl, pio_comm_g, h5_io_info_g); - if (hrc < 0) { - fprintf(stderr, "HDF5 Property List Set failed\n"); - GOTOERROR(FAIL); - } + /* Use the appropriate VFL driver */ + if(param->h5_use_mpi_posix) { + /* Set the file driver to the MPI-posix driver */ + hrc = H5Pset_fapl_mpiposix(acc_tpl, pio_comm_g); + if (hrc < 0) { + fprintf(stderr, "HDF5 Property List Set failed\n"); + GOTOERROR(FAIL); + } + } /* end if */ + else { + /* Set the file driver to the MPI-I/O driver */ + hrc = H5Pset_fapl_mpio(acc_tpl, pio_comm_g, h5_io_info_g); + if (hrc < 0) { + fprintf(stderr, "HDF5 Property List Set failed\n"); + GOTOERROR(FAIL); + } + } /* end else */ /* Set the alignment of objects in HDF5 file */ hrc = H5Pset_alignment(acc_tpl, param->h5_thresh, param->h5_align); diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 5ddac67..a36cce5 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -117,9 +117,9 @@ static const char *progname = "h5perf"; * adding more, make sure that they don't clash with each other. */ #if 1 -static const char *s_opts = "a:A:B:cCd:D:e:F:hi:Ino:p:P:stT:wx:X:"; +static const char *s_opts = "a:A:B:cCd:D:e:F:hi:Imno:p:P:stT:wx:X:"; #else -static const char *s_opts = "a:A:bB:cCd:D:e:F:hi:Ino:p:P:stT:wx:X:"; +static const char *s_opts = "a:A:bB:cCd:D:e:F:hi:Imno:p:P:stT:wx:X:"; #endif /* 1 */ static struct long_options l_opts[] = { { "align", require_arg, 'a' }, @@ -209,6 +209,14 @@ static struct long_options l_opts[] = { { "min-xfe", require_arg, 'x' }, { "min-xf", require_arg, 'x' }, { "min-x", require_arg, 'x' }, + { "mpi-posix", no_arg, 'm' }, + { "mpi-posi", no_arg, 'm' }, + { "mpi-pos", no_arg, 'm' }, + { "mpi-po", no_arg, 'm' }, + { "mpi-p", no_arg, 'm' }, + { "mpi-", no_arg, 'm' }, + { "mpi", no_arg, 'm' }, + { "mp", no_arg, 'm' }, { "no-fill", no_arg, 'n' }, { "no-fil", no_arg, 'n' }, { "no-fi", no_arg, 'n' }, @@ -285,6 +293,7 @@ struct options { int h5_use_chunks; /* Make HDF5 dataset chunked */ int h5_no_fill; /* Disable HDF5 writing fill values */ int h5_write_only; /* Perform the write tests only */ + unsigned h5_use_mpi_posix; /* Use MPI-posix VFD for HDF5 I/O (instead of MPI-I/O VFD) */ int verify; /* Verify data correctness */ }; @@ -426,6 +435,7 @@ run_test_loop(struct options *opts) parms.h5_use_chunks = opts->h5_use_chunks; parms.h5_no_fill = opts->h5_no_fill; parms.h5_write_only = opts->h5_write_only; + parms.h5_use_mpi_posix = opts->h5_use_mpi_posix; parms.verify = opts->verify; /* start with max_num_procs and decrement it by half for each loop. */ @@ -524,7 +534,10 @@ run_test(iotype iot, parameters parms, struct options *opts) output_report("MPIO\n"); break; case PHDF5: - output_report("PHDF5\n"); + if(parms.h5_use_mpi_posix) + output_report("PHDF5 (w/MPI-posix driver)\n"); + else + output_report("PHDF5 (w/MPI-I/O driver)\n"); break; } @@ -1044,6 +1057,18 @@ report_parameters(struct options *opts) else HDfprintf(output, "Independent\n"); + HDfprintf(output, "rank %d: VFL used for HDF5 I/O=", rank); + if(opts->h5_use_mpi_posix) + HDfprintf(output, "MPI-posix driver\n"); + else + HDfprintf(output, "MPI-I/O driver\n"); + + HDfprintf(output, "rank %d: Data storage method in HDF5=", rank); + if(opts->h5_use_chunks) + HDfprintf(output, "Chunked\n"); + else + HDfprintf(output, "Contiguous\n"); + { char *prefix = getenv("HDF5_PARAPREFIX"); @@ -1094,6 +1119,7 @@ parse_command_line(int argc, char *argv[]) cl_opts->h5_use_chunks = FALSE; /* Don't chunk the HDF5 dataset by default */ cl_opts->h5_no_fill = FALSE; /* Write fill values by default */ cl_opts->h5_write_only = FALSE; /* Do both read and write by default */ + cl_opts->h5_use_mpi_posix = FALSE; /* Don't use MPI-posix VFD for HDF5 I/O by default */ cl_opts->verify = FALSE; /* No Verify data correctness by default */ while ((opt = get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) { @@ -1223,6 +1249,10 @@ parse_command_line(int argc, char *argv[]) case 'I': cl_opts->interleaved = 1; break; + case 'm': + /* Turn on MPI-posix VFL driver for HDF5 I/O */ + cl_opts->h5_use_mpi_posix = TRUE; + break; case 'n': /* Turn off writing fill values */ #ifdef H5_HAVE_NOFILL cl_opts->h5_no_fill = TRUE; @@ -1357,6 +1387,8 @@ usage(const char *prog) printf(" -i, --num-iterations Number of iterations to perform [default: 1]\n"); printf(" -I, --interleaved Interleaved block I/O (see below for example)\n"); printf(" [default: Contiguous block I/O]\n"); + printf(" -m, --mpi-posix Use MPI-posix driver for HDF5 I/O\n"); + printf(" [default: use MPI-I/O driver]\n"); printf(" -n, --no-fill Don't write fill values to HDF5 dataset\n"); printf(" (Supported in HDF5 library v1.5 only)\n"); printf(" [default: off (i.e. write fill values)]\n"); diff --git a/perform/pio_perf.h b/perform/pio_perf.h index 5053eb2..05b5b15 100644 --- a/perform/pio_perf.h +++ b/perform/pio_perf.h @@ -47,6 +47,7 @@ typedef struct parameters_ { int h5_use_chunks; /* Make HDF5 dataset chunked */ int h5_no_fill; /* Disable HDF5 writing fill values */ int h5_write_only; /* Perform the write tests only */ + unsigned h5_use_mpi_posix; /* Use MPI-posix VFD for HDF5 I/O (instead of MPI-I/O VFD) */ int verify; /* Verify data correctness */ } parameters; |