mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[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:
This commit is contained in:
parent
a9aa3859a7
commit
2b59b42447
@ -43,6 +43,7 @@ main (void)
|
|||||||
|
|
||||||
int data3[2][2] = { {3, 3},
|
int data3[2][2] = { {3, 3},
|
||||||
{3, 3} };
|
{3, 3} };
|
||||||
|
int fillvalue = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the data space with unlimited dimensions.
|
* Create the data space with unlimited dimensions.
|
||||||
@ -59,6 +60,7 @@ main (void)
|
|||||||
*/
|
*/
|
||||||
cparms = H5Pcreate(H5P_DATASET_CREATE);
|
cparms = H5Pcreate(H5P_DATASET_CREATE);
|
||||||
status = H5Pset_chunk( cparms, RANK, chunk_dims);
|
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
|
* Create a new dataset within the file using cparms
|
||||||
|
Loading…
Reference in New Issue
Block a user