larpix / larpix-control

Control the LArPix chip
Other
4 stars 12 forks source link

Fix issue with SWMR mode in raw hdf5 file format #237

Closed peter-madigan closed 3 years ago

peter-madigan commented 3 years ago

Basically, we encountered an issue when using the raw hdf5 file format from concurrent processes in a fashion that probably ought to be supported in SWMR mode - but that isn't (see this h5py issue: https://github.com/h5py/h5py/issues/712).

This is a temporary fix until HDF5 changes their SWMR reader mode that works well enough:

  1. sets the HDF5_USE_FILE_LOCKING environment variable to FALSE, which resolves errors occurring on the writer-side
  2. demotes the OSError raised during opening the file to a RuntimeWarning for a number of attempts whenever reading from the file