-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please be aware that a double is twice as long as a float. So, if you wanted to store 100 doubles and specified IEEE-NATIVE-FLOAT, you have only written the first 50 doubles to disk. So, unless you have actually calculated the number of elements in the data from the _size_ of the array, you will have to recreate your data because half of it will be missing - there is no way of fixing missing data.

Cheers,
Nathanael Hübbe



On 05/02/2013 05:47:50 PM, John K wrote:
Someone else just discovered a mess that I've made in our data, where I was using double (64-bit IEEE floating point) for in-memory storage for certain fields in compound data types/structs, but on disk was using IEEE-NATIVE-FLOAT (i.e. 32-bit).

To be more specific, I had a C++ type double that was being mapped to HDF type H5T_NATIVE_FLOAT rather than DOUBLE. The end result hasn't been pretty - the files are usable only in the code that retained that incorrect mapping.

Since repairing the type mapping to double->NATIVE_DOUBLE, the previously written data files have invalid values for those fields. I was kind of hoping the internal HDF5 type mapping would resolve the translation correctly, but it hasn't.

I'm assuming at this point I'm going to have to rewrite these old files with the bad mapping in them. Does anyone have any suggestions as to how best accomplish this task? The original files contain:

1 dataset with the dodgy type mappings
1 dataset consisting of references to the above (essentially the same data but from a different indexing)
several dimension scales for the above two datasets
a slew of datatypes

What would have to change are the datatypes and the one dataset with the dodgy type mappings. Is there a quick and easy way to create a new file with the change in types (I can back-fill the correct values for the broken fields later) or do I just need to rewrite the whole thing from scratch?


_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJRg3ITAAoJEO3tJW5NCfoMIJQP/R8Jj5CWfoQ/012/Y0XhhMZu
DJ/XHOYBRV5uof3OOSoVjVumQEweq48Tf/IH7b/NYicjhGUdzorPS6HxUmtOh19g
y0Ars3ltAi9RvP0IldwV5AErekK1+JU4i8i3Gsgj4XKawPWtiBhqPZWwCVXH844z
8HKhraJUBxmGbZc4R268t12+c4ZMrVP6khFXUddKe0lFpTbHBBLhsIpwgBqw5xBX
5/k6XRrelW1QQpdvnQwgzOTHn7cGJBaEjpfvllfdG73gF7rOSEblJixnrVKK5gX5
ynMETnkO1s0+jkx5XjR7PAMnFsodNFs9Ywkml2G1+xe5E87/QlE4hKiiDq1JIY9d
8tACdrd6elxI9LFHHCiCJi20KXaaha8qYJPpKihKsb1EqHWUYtVVVUFNIHWd1Mr+
yw+JJnHEZtkjpJr+w9Ndt+CUYdyVbOcxYWt3WfZKaVpW1w1CsLvaC53wj5YDbi60
/LwKXFcu+S06p5goCpjtoB+MLoNYSuvKae94ccxy0HGES5g5RPkYVr/dEouGZ8vv
4sDkKz+6DApDEm8AMnDgKyd5MjCLVymMEzu3Jv/k/hQIGgv1bv2k7s0NaBbXIzc3
afCNGjjXvyFQUFSIj0W7UEtpTcFn/S4KqhxN5CAUhZz4qV0VmrOeCAO0FnVjzocs
LgHI3cLoYJt9ZY7ZcPus
=DWRa
-----END PGP SIGNATURE-----

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

Reply via email to