question about closing resources in HDF5

Howdy HDF5 programmers,

One problem that I often have is that my code forgets to close a HDF5
resource, like a typeid. This isn't detected when I close the file,
but when I try to recreate a file with the same name, I get an error
on the create, which looks like this:

HDF5-DIAG: Error detected in HDF5 (1.7.46) thread 0:
  #000: H5F.c line 2097 in H5Fcreate(): unable to create file
    major: File accessability
    minor: Unable to open file
  #001: H5F.c line 1771 in H5F_open(): unable to truncate a file which is 
already open
    major: File accessability
    minor: Unable to open file

Unfortunately, this gives no clue whatsoever as to which resource was
left open.

Is there any way to get more information about which resource is left

Also, is there a way to have HDF5 detect this when I H5Fclose the
file, instead of when I try and overwrite it with a new file?


Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx