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

make HDF5 thread safe #16444

Closed
smoors opened this issue Oct 19, 2022 · 0 comments · Fixed by easybuilders/easybuild-easyblocks#2824
Closed

make HDF5 thread safe #16444

smoors opened this issue Oct 19, 2022 · 0 comments · Fixed by easybuilders/easybuild-easyblocks#2824
Labels
Milestone

Comments

@smoors
Copy link
Contributor

smoors commented Oct 19, 2022

one of our users encountered the following error when running CDO (tested with CDO/2.0.5-gompi-2021b and CDO/1.9.10-gompi-2021a)

cdo    seltimestep (Warning): Using a non-thread-safe NetCDF4/HDF5 library in a multi-threaded environment may lead to erroneous results!
cdo    seltimestep (Warning): Use a thread-safe NetCDF4/HDF5 library or the CDO option -L to avoid such errors.
/user/brussel/106/vsc10678/cut_region.sh: line 42: 42420 Segmentation fault      cdo -seltimestep,1 -sellonlatbox,$WEST,$EAST,$SOUTH,$NORD $file ${file%.*}_${FILE_EXT}.nc

the reason is that HDF5, on which NetCDF4 depends, is not configured with --enable-threadsafe.

my suggestion would be to add options --enable-threadsafe --enable-unsupported, which would make the C API thread-safe. the option --enable-unsupported is needed to allow --enable-threadsafe to be used together with --enable-cxx, as --enable-threadsafe has no effect on the C++ APIs.

this seems a safe change, as argued in the similar conda-forge PR conda-forge/hdf5-feedstock#57 (comment)

  • threadsafety only applies to the C API
  • C++ / FORTRAN APIs are unaffected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants