Help debugging for a new user

We have written a data collector using HDF5 for the data storage. All of our unit tests pass and we can read the files created with the unit test. However, the actual application writes a tone of data to the file (as seen with the ls -l), but when we’re done, we get unable to open the file. Every utility we have tried gives an error trying to open the file: h5dump, h5ld, h5debug, h5clear.

Are there any other tools that we can use to figure out what is wrong with the file? From that we should be able to figure out what is wrong in our code.

What’s the output of

od -N 6 -c your-file.h5

?

Should be something like

0000000 211   H   D   F  \r  \n
0000006

What about

strings your-file.h5

?

Should be something like

TREE
HEAP
mount_point
TREE
HEAP
SNOD
...

Can you tell us a little more about your environment, HDF5 version, unit tests, application?

G.

Thank you for that info. It’s very helpful! It looks like there was a compilation issue. I forced a rebuild of my entire project and it seems to be working better.

I’m running on Ubuntu 18.04 LTS with a h5dump version 1.12.0.

We have had this problem periodically and it seems to be something with not closing the file correctly. While the program is running, I can watch the file size grow. But, when I try to use h5dump, h5ls, h5clear, it says it can’t open the file.

I had deleted the bad file and haven’t had the issues since I rebuilt the project. The commands you listed are working as expected on the files that I do have and are working.

Any suggestions you have are greatly appreciated. If the problem happens again, I’ll try the commands you mentioned on the bad file and post again to the forum with the results.

Thank you again!