summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-27 19:31:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-27 19:31:04 (GMT)
commit7ee60ff06d5804ec69ef81f0d8e3327d338616fb (patch)
tree2b4d64dde2948cf1f04b450d8dcd18b8315b43a0
parentdec82bd98e743a32f800b6ffcbfb90b42a2ef435 (diff)
downloadhdf5-7ee60ff06d5804ec69ef81f0d8e3327d338616fb.zip
hdf5-7ee60ff06d5804ec69ef81f0d8e3327d338616fb.tar.gz
hdf5-7ee60ff06d5804ec69ef81f0d8e3327d338616fb.tar.bz2
[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
-rw-r--r--testpar/t_mdset.c12
1 files changed, 11 insertions, 1 deletions
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);
}