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

Opening file if already opened elsewhere can lead to weird runtime errors #39

Open
Vindaar opened this issue Dec 1, 2020 · 1 comment

Comments

@Vindaar
Copy link
Owner

Vindaar commented Dec 1, 2020

If a file is opened in one place and then opened in another place, certain HDF5 functions can fail with some really hard to debug errors.

We should try to detect that somehow. Opening a file when opened by hdfview fails, because the file is locked. Can we lock the file so an additional open call fails?

@Vindaar
Copy link
Owner Author

Vindaar commented Feb 6, 2022

Note:

If opening a file from multiple locations is desired, set the following environment variable:

export HDF5_USE_FILE_LOCKING=FALSE

This is also mentioned in the README nowadays here:
https://github.com/Vindaar/nimhdf5#threadsafe-hdf5-library--file-locks

Before closing this, investigate if there's a way to ask the library for "is the file locked?".

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

1 participant