[gdal-dev] NetCDF+HDF5 and threadsafety

William Kyngesburye woklist at kyngchaos.com
Thu Feb 4 16:41:14 PST 2016


On Feb 4, 2016, at 5:09 PM, Even Rouault <even.rouault at spatialys.com> wrote:
> 
> Le jeudi 04 février 2016 23:55:57, William Kyngesburye a écrit :
>> I'm updating my HDF5 library and ran into a catch-22: I build my HDF5 with
>> threadsafety (threadsafe is good, right?), and NetCDF4 requires HDF5 with
>> the high-level library.  At HDF5 1.8.12 I could do this combination, but
>> HDF5 1.8.16 (I think it started with 1.8.13) says threadsafe and
>> high-level options are not compatible.
>> 
>> Is threadsafety in HDF5 important for GDAL?
> 
> Hum, likely if people use the HDF5 driver in a multi-threaded context. GDAL 
> has explicit mutex around calls to the netCDF and HDF4 lib in the netCDF and 
> HDF4 drivers (since at least the versions of those lib I use are not thread-
> safe), but not from the HDF5 driver. So if the HDF5 lib is not re-entrant, 
> there might be issues.
> 
> There's an optionnaly compiled app you can use to test threadsafety :
> 
> cd apps
> make multireadtest
> ./multireadtest -nlo [-oi number_of_iterations] file_to_test
> 
> Increase number_of_iterations so that it runs for a few seconds.
> 
How do I trigger building that?  I see it in the source and the apps/gnumakefile, but it looks like it should build by default.

> Just testing it on my own HDF5 lib (ancient 1.8.4-5 on Ubuntu 10.04), I see 
> crashes... Looking at the stacktrace, I see my HDF5 lib has however mutex 
> protection, but apparently not sufficiently robust for this stress test.
> 
>> 
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>> 
>> "Those people who most want to rule people are, ipso-facto, those least
>> suited to do it."
>> 
>> - A rule of the universe, from the HitchHiker's Guide to the Galaxy
>> 
>> 
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin




More information about the gdal-dev mailing list