Sorry for this follow up… I feel like I forgot about one more item that might or might not hit here.
There are file formats that have members that are not valid under certain other settings.
Still those members occupy some space and thus have some value – it might be a random value.
Just if someone really wants to track down the root cause then it might or might not be the case that it is raised by such a member.
Regards, Alex.
···
Von: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] Im Auftrag von Ekin Akoglu
Gesendet: Dienstag, 5. August 2014 17:59
An: HDF Users Discussion List
Betreff: Re: [Hdf-forum] Identical HDF5 files according to "h5diff" differ in comparison with "diff" Unix command
Thank you all for the suggestions and brainstorming thus far.
Like Rob, I would also expect that HDF5 binaries be equal. But suggestion by Werner is also a workaround for me for now.
In the meantime, I went from HDF5 release 1.8.12 down to as far back as HDF5 1.8.8 with Intel Fortran Compiler 14.0.3 on an Ubuntu 12.04.4 x64 using the h5ex_t_cmpd_F03.f90<http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/hdf5-examples/1_8/FORTRAN/H5T/h5ex_t_cmpd_F03.f90> example and making trials; however, I could not manage to get binary equality out of "diff" command for HDF5 data files created by two identical runs. This shows that my memory of remembering managing h5 files under GIT is false, although I was almost sure that I could do manage a GIT repo with h5 files in the past.
Anyway, thank you all for the fruitful discussion. It seems that the suggestion of Werner is the way to go.
Regards,
Ekin
On 5 August 2014 17:32, Werner Benger <werner@cct.lsu.edu<mailto:werner@cct.lsu.edu>> wrote:
HDF5, when using the newest version's library features, includes time stamps in the file, as "h5ls -v" displays:
h5ls -v LOD.f5
Opened "LOD.f5" with sec2 driver.
Charts Group
Location: 1:70486
Links: 1
Modified: 2014-07-15 15:57:53 W. Europe Daylight Time
TableOfContents Group
Attribute: version {3}
Type: native int
Data: 0, 1, 5
Location: 1:342
Links: 1
Modified: 2014-07-15 15:57:53 W. Europe Daylight Time
Comment: "All file objects in reverse order for easier browsing. "
t=000000000.0000000000 Group
Attribute: Time scalar
Type: native double
Data: 0
Location: 1:195
Links: 1
Modified: 2014-07-15 15:57:53 W. Europe Daylight Time
However, you can control whether the newest library features are used or not by calling
H5Pset_libver_bounds(fapl_id, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST);
see
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLibverBounds
Thereby you should be able to disable timestamps to be put into the HDF5 file by forcing it to *not* use the newest library features and binary diffs should work again for such old-style files.
Cheers,
Werner
On 05.08.2014 15:14, Ekin Akoglu wrote:
Dear all,
For the two versions of the same HDF5 file, h5diff comparison outputs "0 differences found"; however, when compared with the Unix "diff" command, they differ. This is creating inconvenience under version control system. Do you have any suggestions why diff and h5diff conflicts? As far as I remember, this was not the case in the past and I remember managing HDF5 data files without problems under GIT DVCS; however, I cannot recall which version of the HDF5 library.
I tried this as below:
I compiled my Fortran program (using GNU Fortran 4.8.2) and ran it so as to create the HDF5 datafile as output. I moved the datafile to some other directory. Then I re-ran my program (without recompiling) and then compared the newly created HDF5 data file with the old one using "diff" tool in Mac OS X (10.9.4) and Linux (Debian Wheezy 7.6 x64) and they did differ. Why?
My HDF5 version is 1.8.12 and diff version is GNU diffutils 2.8.1.
Thank you in advance,
Ekin
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809<tel:%2B1%20225%20578%204809> Fax.: +1 225 578-5362<tel:%2B1%20225%20578-5362>
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5