On Thu, Jun 15, 2017 at 09:21:40PM +0000, Elena Pourmal wrote:
This behavior is documented in H5Dwrite 
https://support.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Write

(yep...confusing)

Hi Elena,

Thanks. I must have missed that. This is indeed confusing. I am currently also looking at the tutorial at

 https://support.hdfgroup.org/HDF5/Tutor/rdwt.html

which states: "Note that H5S_ALL is passed in for the memory and file dataspace parameters in the read and write calls. This indicates that the entire dataspace of the dataset will be read or written to."

While this is technically correct (since in the examples both the memory and the file dataspace are specified as H5S_ALL), this is indeed a confusing statement. Maybe a note could be added that 'H5S_ALL' by itself does not necessarily have that meaning, and the meaning of specifying H5S_ALL for one dataspace indeed depends on the other dataspace.

In general, this is quite a confusing choice of definition for H5S_ALL. Is there another define that does what I actually thought H5S_ALL does: simply selecting the entire available space, independent of whatever was selected for the other data space? My best guess is: no, since I don't see anything mentioned in H5Spublic.h. It would be a useful addition.

There is of course the simple workaround of specifying a space for both, but requiring a separate data space for a simple array just because the other space has an offset seems a bit awkward.

Frank

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to