Hi Steve,

On Aug 28, 2012, at 9:33 AM, Steve Bissell wrote:

> We have an application that produces an HDF5 file using library 1.8.8. It
> has been working fine for some time on Windows XP SP 3.
> Running the SAME BINARIES on Windows 7 64 bit machine in 32 bit environment
> produces some files that are corrupt (but others are fine).
> The corruption is reported by h5debug as "unable to find a valid file
> signature".
> Detailed examination and comparison with a hex editor shows that ALL of the
> metadata appears to be missing: the first part of the file is just zeroes,
> whereas for the "good" file (produced on the win32 xp box, using same
> binaries) contains the hdf5 signature string at the start of the file.
> Subsequent differences in the files all seem to point to missing metadata
> (tree structure, attributes etc).
> 
> Anyone else come across this problem?
> 
> Just to be clear: the HDF character sequence that forms the start of the
> "\211HDF\r\n\032\n" signature is found in the good file at the beginning,
> but is not found ANYWHERE in the bad file.
> 
> ** UPDATE **
> Problem has been solved by calling flush(H5F_SCOPE_GLOBAL) prior to calling
> the close() method on the H5File object. 
> Which raises the following questions ...
> the fortran api states:
> H5Fclose terminates access to an HDF5 file by flushing all data to storage
> and terminating access to the file through file_id. 
> So does this mean the C++ "close" api behaves differently? If so, why?
> Why did the previous code always work ok for XP SP3 but only work for some
> files on Windows 7 (32 bit or 32 bit on 64 bit OS) - some difference in the
> way Windows handles memory/file flushing between the 2 OS types?
> Has there been a change in the behaviour on file close between 1.8.5 and
> 1.8.8 (I did my original dev work at the time of 1.8.5)?

        I'm guessing that you have an HDF5 ID leak in your application 
somewhere, which is holding the file ID open.  You could use the 
H5Pset_fclose_degree() property to help debug this.

        Regards,
                Quincey


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

Reply via email to