diff options
Diffstat (limited to 'testpar/testphdf5.c')
-rw-r--r-- | testpar/testphdf5.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index e193177..b650e00 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -107,6 +107,7 @@ usage(void) printf("\t-v\t\tverbose on\n"); printf("\t-f <prefix>\tfilename prefix\n"); printf("\t-s\t\tuse Split-file together with MPIO\n"); + printf("\t-p\t\tuse combo MPI-POSIX driver\n"); printf("\t-d <dim0> <dim1>\tdataset dimensions\n"); printf("\t-c <dim0> <dim1>\tdataset chunk dimensions\n"); printf("\tDefault: do write then read with dimensions %dx%d\n", @@ -163,6 +164,9 @@ parse_options(int argc, char **argv) } paraprefix = *argv; break; + case 'p': /* Use the MPI-POSIX driver access */ + facc_type = FACC_MPIPOSIX; + break; case 's': /* Use the split-file driver with MPIO access */ /* Can use $HDF5_METAPREFIX to define the */ /* meta-file-prefix. */ @@ -285,6 +289,13 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type ) return(ret_pl); } + if (l_facc_type == FACC_MPIPOSIX) { + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpiposix(ret_pl, comm); + VRFY((ret >= 0), ""); + return(ret_pl); + } + /* unknown file access types */ return (ret_pl); } @@ -294,6 +305,10 @@ int main(int argc, char **argv) { int mpi_size, mpi_rank; /* mpi variables */ + /* Un-buffer the stdout and stderr */ + setbuf(stderr, NULL); + setbuf(stdout, NULL); + MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); |