From b1aa07bd2a033591cdd9afae6c1274a83b308f1e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 15 Jul 2002 10:21:44 -0500 Subject: [svn-r5800] Purpose: New feature. Description: Added MPI-posix VFL driver support. Platforms tested: FreeBSD 4.6 (sleipnir) w/parallel & IRIX64 6.5 (modi4) w/parallel --- testpar/testphdf5.c | 15 +++++++++++++++ testpar/testphdf5.h | 1 + 2 files changed, 16 insertions(+) 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 \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 \tdataset dimensions\n"); printf("\t-c \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); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 57510df..47d7ac0 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -84,6 +84,7 @@ #define FACC_MPIO 0x1 /* MPIO */ #define FACC_SPLIT 0x2 /* Split File */ #define FACC_MULTI 0x4 /* Multi File */ +#define FACC_MPIPOSIX 0x8 /* MPIPOSIX */ /* dataset data type. Int's can be easily octo dumped. */ typedef int DATATYPE; -- cgit v0.12