From 7ee60ff06d5804ec69ef81f0d8e3327d338616fb Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 27 Aug 2002 14:31:04 -0500 Subject: [svn-r5898] Purpose: Additional test Description: Add in a fill-value to one of the tests, to make certain that they are handled correctly. Platforms tested: FreeBSD 4.6 (sleipnir) w/serial & parallel --- testpar/t_mdset.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 574fdb4..1272e42 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -25,10 +25,12 @@ 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 */ hssize_t chunk_origin [DIM]; hsize_t chunk_dims [DIM], file_dims [DIM]; hsize_t count[DIM]={1,1}; double outme [SIZE][SIZE]; + double fill=1.0; /* Fill value */ char dname [100]; herr_t ret; @@ -54,9 +56,16 @@ void multiple_dset_write(char *filename, int ndatasets) ret = H5Sselect_hyperslab (filespace, H5S_SELECT_SET, chunk_origin, chunk_dims, count, chunk_dims); VRFY((ret>=0), "mdata hyperslab selection"); + /* Create a dataset creation property list */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + VRFY((dcpl>=0), "dataset creation property list succeeded"); + + ret=H5Pset_fill_value(dcpl, H5T_NATIVE_DOUBLE, &fill); + VRFY((ret>=0), "set fill-value succeeded"); + for (n = 0; n < ndatasets; n++) { sprintf (dname, "dataset %d", n); - dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT); + dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, dcpl); VRFY((dataset > 0), dname); /* calculate data to write */ @@ -77,6 +86,7 @@ void multiple_dset_write(char *filename, int ndatasets) H5Sclose (filespace); H5Sclose (memspace); + H5Pclose (dcpl); H5Fclose (iof); } -- cgit v0.12