I use Packet Tables extensively and Dimension Scales (less so). And I do have multiple threads accessing multiple independent files (on Windows). Can I live without HDF’s thread safety? Or is there a work around?
Are the HL interfaces mostly an afterthought these days? They never were supported in the old HDF5DotNet wrappers and weren’t in the PInvoke implementation when I last looked.
The reason the high-level library is not considered thread-safe is because the global library lock only exists in the C library and is not hoisted up into the HL library. The thread-safe + high-level library combination was not explicitly marked as unsafe and unsupported until a few years ago. You can override this setting in CMake by setting ENABLE_UNSUPPORTED (edit: ALLOW_UNSUPPORTED) to ON or configuring with --enable-unsupported in the autotools.
This may work for you or you may encounter problems; we simply haven’t had the internal resources to investigate this properly. Making thread-safety and the high-level library mutually exclusive came about when we were cleaning up the build systems and that combination (as well as the language wrappers) was flagged as problematic and not supported, not because we know for sure that there are problems.
We’ve talked about fixing this for some time, but unfortunately it’s never made it to the front of our queue. If anyone cares deeply about this and wants to fund the work, that could quickly change.
Also, for what it’s worth, regardless of your file access patterns, the HDF5 C library contains global state that can mutate in even read-only cases. You are far, far better off building with thread-safety and the high-level library (even though it’s technically unsupported) than attempting to use the non-thread-safe library from multiple threads. In the former, you at least have the bulk of the code protected by the global lock.
But, is ENABLE_UNSUPPORTED right? That doesn’t change a thing when I add it. I don’t see a reference to it in the files. I see a reference to ALLOW_UNSUPPORTED, but it doesn’t help either.
The GUI has an advanced option, that will display more options, ALLOW_UNSUPPORTED is one of those.
I would think that the manual entry is incorrectly setting the option.
Sorry for the typo, ALLOW_UNSUPPORTED is correct. A quick test on our development trunk (very close to 1.10.1) with ccmake shows that ALLOW_UNSUPPORTED, HDF5_BUILD_HL_LIB, and HDF5_ENABLE_THREADSAFE work correctly.
Allen might have more insight into what is failing.