How does HDF5 behave in read-write mode (H5F_ACC_RDWR) ?

Hello,

At least some versions of HDFView worked so that they opened .h5 data files in read-write mode and, when closing, re-wrote the headers(?) of the data file even though the user thought that no changes were needed. That could cause data loss if the format of the datafile was not interpreted correctly in the first place.

My question is: How does the read-write mode behave, nowadays, in terms of re-writing things or leaving them intact? When closing a file opened in read-write mode, does the HDF5 library write something only when there are changes or does it always re-write headers?

Thanks and regards,
Vesa Paatero

Hi Vesa,

···

On Aug 18, 2010, at 4:46 AM, Vesa Paatero wrote:

Hello,

At least some versions of HDFView worked so that they opened .h5 data files in read-write mode and, when closing, re-wrote the headers(?) of the data file even though the user thought that no changes were needed. That could cause data loss if the format of the datafile was not interpreted correctly in the first place.

My question is: How does the read-write mode behave, nowadays, in terms of re-writing things or leaving them intact? When closing a file opened in read-write mode, does the HDF5 library write something only when there are changes or does it always re-write headers?

  The behavior you describe was a bug that we fixed in the 1.8.3 (or maybe 1.8.2?) release, and the library now only writes to the file when something has changed.

  Quincey

Hi Vesa,

The bug was fixed in HDF5 1.8.5. If you are using HDFView 2.6 or later version,
you should not see the problem.

Thanks
--pc

Vesa Paatero wrote:

···

Hello,

At least some versions of HDFView worked so that they opened .h5 data files in read-write mode and, when closing, re-wrote the headers(?) of the data file even though the user thought that no changes were needed. That could cause data loss if the format of the datafile was not interpreted correctly in the first place.

My question is: How does the read-write mode behave, nowadays, in terms of re-writing things or leaving them intact? When closing a file opened in read-write mode, does the HDF5 library write something only when there are changes or does it always re-write headers?

Thanks and regards,

Vesa Paatero

------------------------------------------------------------------------

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org