- changed status to open
- removed comment
CarpetIOHDF5 corrupts memory when readingi compressed grid structure strings
Issue #1423
resolved
Input.cc uses H5Dget_storage_size to determine how much memory to allocate for the large string attributes (Paramters and grid structure). However this function literally returns the space used on disk which differs from the space in memory when compression is used (or when the dataset is sparse, or when the datatype on disk is different from that in memory eg float vs double).
The attached patch instead queries the dataspace for the number of points.
Ok to apply? Is there a preferred way of getting this size othewise?
Keyword:
Comments (3)
-
reporter -
- changed status to open
- removed comment
Approved.
-
reporter - changed status to resolved
- removed comment
Applied as hash fdadb2cfc19a42ada49fc91c12e56646848ca8b9 "CarpetIOHDF5: use simple_extents rather than storage size on disk" of Carpet.
- Log in to comment
Also change type of data read in to what the memory dataspace is not what the dataspace on disk is. This way HDF5 actually converts from the on-disk representation to the in-memory one.