Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to close HDF5-file? #61

Closed
tammojan opened this issue Oct 12, 2018 · 3 comments
Closed

Need to close HDF5-file? #61

tammojan opened this issue Oct 12, 2018 · 3 comments

Comments

@tammojan
Copy link
Collaborator

As reported by Neal:

I've been writing and using hdf5 files with the new NDPPP - I run NDPPP via an os.system call from the script. It seems to work very nicely except for one thing: if I want to open the file for writing afterwards, it doesn't let me do this unless I exit Python and restart (thus presumably automatically flushing and closing the open file). Please could I check whether NDPPP closes the file explicitly, and if not if it's possible to do that? (I tried workarounds such as renaming the file, but the open-flag seems to follow the file around).

@tammojan
Copy link
Collaborator Author

A workaround seems to be in /home/jackson/scripts/loop3A.py on CEP3

@aroffringa
Copy link
Contributor

I don't see in that file any workaround (and a bit more specific would be nice...). I have looked at the hdf5 code and I don't think it's possible that the file remains open when dppp finishes normally. The H5File destructor always closes the file, and e.g. in GainCal it is on the stack, so always destructed. I think this is just an oddity of H5, or maybe there are h5 version mismatches on Neil's machine -- I've seen some similar weird things too because of this.

Is this introduced during the Github fork? I don't think we changed anything there, but it could be that it is compiled differently.

I myself have tried opening h5 files in Python after running dppp and found that worked fine, although I have seen that crashes could bring the whole h5 system in a weird state in which it wouldn't open anything.

Unless there's a very reproducible example I don't we can do anything with this.

@aroffringa
Copy link
Contributor

I'm closing this, as I can't reproduce any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants