JuliaIO / HDF5.jl

Save and load data in the HDF5 file format from Julia
https://juliaio.github.io/HDF5.jl
MIT License
380 stars 138 forks source link

Add fallback for missing H5Pget_dxpl_mpio #1121

Closed mkitti closed 9 months ago

mkitti commented 9 months ago

When trying to iterate through properties, one finds the xfer property of a HDF5.Dataset. This in turn discovers the property dxpl_mpio which may fail if H5Pget_dxpl_mpio does not exist.

The commit is a temporary fix, but may need be reworked perhaps at a higher level in properties.jl.

cc: @simonbyrne

julia> h5ds.xfer.dxpl_mpio
ERROR: could not load symbol "H5Pget_dxpl_mpio":
The specified procedure could not be found.
Stacktrace:
 [1] h5p_get_dxpl_mpio(dxpl_id::HDF5.DatasetTransferProperties, xfer_mode::Base.RefValue{Int32})
   @ HDF5.API C:\Users\kittisopikulm\.julia\packages\HDF5\ttJRb\src\api\functions.jl:3130
 [2] h5p_get_dxpl_mpio(dxpl_id::HDF5.DatasetTransferProperties)
   @ HDF5.API C:\Users\kittisopikulm\.julia\packages\HDF5\ttJRb\src\api\helpers.jl:677
 [3] get_dxpl_mpio(p::HDF5.DatasetTransferProperties)
   @ HDF5 C:\Users\kittisopikulm\.julia\packages\HDF5\ttJRb\src\properties.jl:192
 [4] class_getproperty(#unused#::Type{HDF5.DatasetTransferProperties}, p::HDF5.DatasetTransferProperties, name::Symbol)
   @ HDF5 C:\Users\kittisopikulm\.julia\packages\HDF5\ttJRb\src\properties.jl:882
 [5] getproperty(p::HDF5.DatasetTransferProperties, name::Symbol)
   @ HDF5 C:\Users\kittisopikulm\.julia\packages\HDF5\ttJRb\src\properties.jl:51
 [6] top-level scope
   @ REPL[175]:1
mkitti commented 9 months ago

On second thought this is probably not a good idea. The error should be handled at the application level.