SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

cGadgetron locks access to HDF5 data #290

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 5 years ago

We cannot run multiple recons on the same data at the same time. (This can easily happen when using the SIRF-Exercises, when you try multiple notebooks). We get an error that HDF5 has locked the file

unable to lock file, errno = 11, error message = 'Resource temporarily unavailable'

I guess this is because we open read/write. Can we open read-only? That should resolve this (see e.g. https://github.com/h5py/h5py/issues/1066#issuecomment-402618924).

Caveat: I'll confess I haven't really checked if this is due to the acquisition data. I'm hoping we're never writing to the same image in these demos?

evgueni-ovtchinnikov commented 5 years ago

ismrmrd's dataset class constructor does not provide an option to open file as read-only

we could inherit our own dataset type from ismrmrd's and add a constructor with read-only flag - good move do you think?

DANAJK commented 5 years ago

You might need to be a bit careful regarding default output filenames and default group names within these files. It's possible to append dataset groups (named with date and time) over multiple runs to a single hdf5 output file.

KrisThielemans commented 5 years ago

After fixing, will have to update the doc for the SIRF-Exercises

KrisThielemans commented 4 years ago

@evgueni-ovtchinnikov please create an issue on ISMRMRD (or even PR).

KrisThielemans commented 4 years ago

check if we are still compatible with ISMRMRD master

evgueni-ovtchinnikov commented 3 years ago

I believe a much simpler solution is to set storage scheme to memory and clone the acquisition data read from file.