diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-06 15:17:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-06 15:17:09 (GMT) |
commit | 98dfa67e89bb99f3baee80a1364e4f3555b03abd (patch) | |
tree | 444d960e451e821bbdaf53a9f5aa0b72f1466ffb /testpar | |
parent | 43c69e978bb5773be6046c9276f7e7dd762e9d22 (diff) | |
download | hdf5-98dfa67e89bb99f3baee80a1364e4f3555b03abd.zip hdf5-98dfa67e89bb99f3baee80a1364e4f3555b03abd.tar.gz hdf5-98dfa67e89bb99f3baee80a1364e4f3555b03abd.tar.bz2 |
[svn-r7551] Purpose:
Bug/feature fix.
Description:
Relax restriction on parallel writing to compact datasets to allow partial
I/O.
Updates to reference manual mentioning the issues involved are delayed until
reference manual 'lock' is removed later this week.
Platforms tested:
FreeBSD 4.9 (sleipnir)
too minor to require h5committest
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_mdset.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 3d40307..3bbad86 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -105,15 +105,13 @@ void multiple_dset_write(char *filename, int ndatasets) } /* Example of using PHDF5 to create, write, and read compact dataset. - * Hyperslab is prohibited for write. */ 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]; + hid_t iof, plist, dcpl, dxpl, dataset, filespace; + hsize_t file_dims [DIM]={SIZE,SIZE}; hsize_t count[DIM]={1,1}; double outme [SIZE][SIZE], inme[SIZE][SIZE]; char dname[]="dataset"; @@ -127,11 +125,7 @@ void compact_dataset(char *filename) 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. */ - get_slab(chunk_origin, chunk_dims, count, file_dims); - /* Define data space */ - memspace = H5Screate_simple (DIM, chunk_dims, NULL); filespace = H5Screate_simple (DIM, file_dims, NULL); /* Create a compact dataset */ @@ -145,27 +139,12 @@ void compact_dataset(char *filename) dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, dcpl); VRFY((dataset >= 0), "H5Dcreate succeeded"); - /* Define hyperslab */ - ret = H5Sselect_hyperslab (filespace, H5S_SELECT_SET, chunk_origin, chunk_dims, count, chunk_dims); - VRFY((ret>=0), "mdata hyperslab selection"); - /* set up the collective transfer properties list */ dxpl = H5Pcreate (H5P_DATASET_XFER); VRFY((dxpl >= 0), ""); ret=H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE); VRFY((ret >= 0), "H5Pcreate xfer succeeded"); - /* calculate data to write */ - for (i = 0; i < SIZE; i++) - for (j = 0; j < SIZE; j++) - outme [i][j] = (i+j)*1000 + mpi_rank; - - /* Test hyperslab writing. Supposed to fail */ - H5E_BEGIN_TRY { - ret=H5Dwrite(dataset, H5T_NATIVE_DOUBLE, memspace, filespace, dxpl, outme); - } H5E_END_TRY; - VRFY((ret < 0), "H5Dwrite hyperslab write failed as expected"); - /* Recalculate data to write. Each process writes the same data. */ for (i = 0; i < SIZE; i++) for (j = 0; j < SIZE; j++) @@ -178,7 +157,6 @@ void compact_dataset(char *filename) H5Pclose (plist); H5Dclose (dataset); H5Sclose (filespace); - H5Sclose (memspace); H5Fclose (iof); /* Open the file and dataset, read and compare the data. */ |