diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-05-05 20:48:33 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-05-05 20:48:33 (GMT) |
commit | c12f91908be82a3864fbbe23ff48a8a8abe629d4 (patch) | |
tree | ba68b0c811b473b1ed9543ee947d9da0f5c12e7e /testpar/t_mdset.c | |
parent | f69ae67faa5fd78196f5afd417090c7440781687 (diff) | |
download | hdf5-c12f91908be82a3864fbbe23ff48a8a8abe629d4.zip hdf5-c12f91908be82a3864fbbe23ff48a8a8abe629d4.tar.gz hdf5-c12f91908be82a3864fbbe23ff48a8a8abe629d4.tar.bz2 |
[svn-r6795] Purpose:
Feature Add
Description:
Added knob so that the programmer can enable or disable GPFS
hints during runtime instead of having it only enabled at
configure/compile time. Some of the public APIs were changed
to add an extra parameter for this option...
Platforms tested:
Blue (LLNL). It only affects the MPI/POSIX driver, so no need
to test it on non-GPFS platforms.
Misc. update:
Diffstat (limited to 'testpar/t_mdset.c')
-rw-r--r-- | testpar/t_mdset.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index f4ae360..9d32cb5 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -41,6 +41,7 @@ void multiple_dset_write(char *filename, int ndatasets) int i, j, n, mpi_size, mpi_rank; hid_t iof, plist, dataset, memspace, filespace; hid_t dcpl; /* Dataset creation property list */ + hbool_t use_gpfs = FALSE; /* Use GPFS hints */ hssize_t chunk_origin [DIM]; hsize_t chunk_dims [DIM], file_dims [DIM]; hsize_t count[DIM]={1,1}; @@ -54,9 +55,12 @@ void multiple_dset_write(char *filename, int ndatasets) VRFY((mpi_size <= SIZE), "mpi_size <= SIZE"); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); + VRFY((plist>=0), "create_faccess_plist succeeded"); iof = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); - H5Pclose (plist); + VRFY((iof>=0), "H5Fcreate succeeded"); + ret = H5Pclose (plist); + VRFY((ret>=0), "H5Pclose succeeded"); /* decide the hyperslab according to process number. */ get_slab(chunk_origin, chunk_dims, count, file_dims); @@ -106,6 +110,7 @@ void multiple_dset_write(char *filename, int ndatasets) void compact_dataset(char *filename) { int i, j, mpi_size, mpi_rank, err_num=0; + hbool_t use_gpfs = FALSE; hid_t iof, plist, dcpl, dxpl, dataset, memspace, filespace; hssize_t chunk_origin [DIM]; hsize_t chunk_dims [DIM], file_dims [DIM]; @@ -119,7 +124,7 @@ void compact_dataset(char *filename) VRFY((mpi_size <= SIZE), "mpi_size <= SIZE"); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); iof = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); /* decide the hyperslab according to process number. */ @@ -177,7 +182,7 @@ void compact_dataset(char *filename) H5Fclose (iof); /* Open the file and dataset, read and compare the data. */ - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); iof = H5Fopen(filename, H5F_ACC_RDONLY, plist); VRFY((iof >= 0), "H5Fopen succeeded"); @@ -213,6 +218,7 @@ void collective_group_write(char *filename, int ngroups) { int mpi_rank, mpi_size; int i, j, m; + hbool_t use_gpfs = FALSE; char gname[64], dname[32]; hid_t fid, gid, did, plist, dcpl, memspace, filespace; DATATYPE outme[SIZE][SIZE]; @@ -224,7 +230,7 @@ void collective_group_write(char *filename, int ngroups) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); H5Pclose(plist); @@ -291,11 +297,12 @@ void independent_group_read(char *filename, int ngroups) { int mpi_rank, mpi_size, m; hid_t plist, fid; + hbool_t use_gpfs = FALSE; MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); fid = H5Fopen(filename, H5F_ACC_RDONLY, plist); H5Pclose(plist); @@ -382,6 +389,7 @@ void multiple_group_write(char *filename, int ngroups) { int mpi_rank, mpi_size; int m; + hbool_t use_gpfs = FALSE; char gname[64]; hid_t fid, gid, plist, memspace, filespace; hssize_t chunk_origin[DIM]; @@ -391,7 +399,7 @@ void multiple_group_write(char *filename, int ngroups) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); H5Pclose(plist); @@ -526,6 +534,7 @@ void multiple_group_read(char *filename, int ngroups) { int mpi_rank, mpi_size, error_num; int m; + hbool_t use_gpfs = FALSE; char gname[64]; hid_t plist, fid, gid, memspace, filespace; hssize_t chunk_origin[DIM]; @@ -534,7 +543,7 @@ void multiple_group_read(char *filename, int ngroups) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs); fid = H5Fopen(filename, H5F_ACC_RDONLY, plist); H5Pclose(plist); |