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

Flushing file #135

Closed
kiranshila opened this issue Mar 26, 2024 · 6 comments · Fixed by #136
Closed

Flushing file #135

kiranshila opened this issue Mar 26, 2024 · 6 comments · Fixed by #136

Comments

@kiranshila
Copy link

Hello again! Another quick issue/question -

Is there an equivalent to nc_sync / flushing to disk in this rust implementation? I'm getting some errors occasionally that look like

HDF5.API.H5Error: Error reading dataset /voltages
libhdf5 Stacktrace:
  [1] H5FD_read: Invalid arguments to routine/Address overflowed
      addr overflow, addr = 16803176, size = 3656, eoa = 16803176

when trying to read from other programs. Looking around this seems to be the result of an incomplete write.

@mulimoen
Copy link
Collaborator

We should expose nc_sync to allow the user to sync the file. In the mean time you could use open_with with the SHARE flag.

@lnicola
Copy link
Member

lnicola commented Mar 26, 2024

Can you get the native handle to call nc_sync on it? I couldn't spot it in the docs.

@mulimoen
Copy link
Collaborator

No, the native handle is kept private

@mulimoen
Copy link
Collaborator

It should be mentioned that reading a file whilst writing to it is not supported by hdf5 unless SWMR mode is set. There is a PR implementing this in netcdf-c here: Unidata/netcdf-c#2653

@mulimoen
Copy link
Collaborator

@kiranshila This is published in 0.9.1 and can be called as FileMut::sync.

@kiranshila
Copy link
Author

Fantastic, beat me to the PR. Thank you so much!

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

Successfully merging a pull request may close this issue.

3 participants