summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2003-08-04 18:25:41 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2003-08-04 18:25:41 (GMT)
commit2b59b42447aea84dfee60f905989a1506cb9fce4 (patch)
tree62d43c5ae8c77e8b3e75fa2fc7aafdf8189c4159 /examples
parenta9aa3859a79ca869fb6ecd492b5d0d8ab3d031f9 (diff)
downloadhdf5-2b59b42447aea84dfee60f905989a1506cb9fce4.zip
hdf5-2b59b42447aea84dfee60f905989a1506cb9fce4.tar.gz
hdf5-2b59b42447aea84dfee60f905989a1506cb9fce4.tar.bz2
[svn-r7283]
Purpose: Enhancement Description: This example writes extendible dataset and doesn't use fill value. On some systems (verebena, titan) unwritten data will be displayed as garbage by h5_chunk_read. Solution: Use H5Pset_fill_value to set 0 fill value. Platforms tested: arabica, verbena, titan Misc. update:
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_extend_write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index 133e2aa..3320544 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -43,6 +43,7 @@ main (void)
int data3[2][2] = { {3, 3},
{3, 3} };
+ int fillvalue = 0;
/*
* Create the data space with unlimited dimensions.
@@ -59,6 +60,7 @@ main (void)
*/
cparms = H5Pcreate(H5P_DATASET_CREATE);
status = H5Pset_chunk( cparms, RANK, chunk_dims);
+ status = H5Pset_fill_value (cparms, H5T_NATIVE_INT, &fillvalue );
/*
* Create a new dataset within the file using cparms