Jeff Whitaker

Results 569 comments of Jeff Whitaker

answering my own question from above - HDF5 > 1.10 creates a file lock by default. This test script behaves as expected on macos x (problem not reproduced, file is...

@DennisHeimbigner it would have to be at the netcdf-c level, since the python interface is just calling nc_create/nc_open. I can't reproduce it though, so it may be something specific to...

> #jswhit sorry for the late response. I use the Jupyter in VSCode, so the file is clobbered directly in my file directory when I read/write from it. Let me...

[The table on this page](https://support.hdfgroup.org/documentation/hdf5/latest/_file_lock.html) seems to indicate that HDF5 file locking may not work on Windows unless you have a recent version of the HDF5 lib. But 1.14.2 (which...

OK thanks, so it is specific to the concurrent Jupyter environment. @DennisHeimbigner it appears that in the concurrent environment (using separate processes) the HDF5 file lock is triggering an error...

I tried this on macos x and can confirm the file gets clobbered when you try to open it in a concurrent Jupyter session (when it is open for read...

However, the file locking does work if I have a file open for writing in one Jupyter session and then try to open the same one for writing or reading...

@DennisHeimbigner I spoke too soon - it looks like even though the PermissionError is raised, the file is actually clobbered when you open it for writing in the second process.

I don't know what the solution to this is, but I'm 99.9% sure it's not in the python interface.

This is due to the behavior of the underlying [C lib](https://github.com/Unidata/netcdf-c). You might get more insight into why this happens if you ask at https://github.com/Unidata/netcdf-c/issues.