JuliaIO / HDF5.jl

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

Fix _typed_load fast path for Julia 1.10 (currently nightly) #1075

Closed mkitti closed 1 year ago

mkitti commented 1 year ago

Julia master seems to have removed Base._memcpy!. This is to be expected given that this is a private function.

xref: https://github.com/JuliaLang/julia/pull/49550

mkitti commented 1 year ago

@t-bltg I believe you are responsible for adding this initially. Can you revisit this?

mkitti commented 1 year ago

This should fix nightly. I do want to review this piece of code more carefully though.

ranocha commented 1 year ago

@mkitti It looks like there is no new release of HDF5.jl including this fix? At least we get

  Got exception outside of a @test
  LoadError: UndefVarError: `_memcpy!` not defined
  Stacktrace:
    [1] _generic_read(::HDF5.Dataset, ::HDF5.Datatype, ::Type{Cstring}, ::Nothing)
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/readwrite.jl:197
    [2] generic_read(::HDF5.Dataset, ::HDF5.Datatype, ::Type{Cstring})
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/readwrite.jl:134
    [3] read(obj::HDF5.Dataset)
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/readwrite.jl:39
    [4] (::Trixi.var"#282#299")(file::HDF5.File)
      @ Trixi ~/work/Trixi.jl/Trixi.jl/src/meshes/mesh_io.jl:308
    [5] (::HDF5.var"#17#18"{HDF5.HDF5Context, @Kwargs{}, Trixi.var"#282#299", HDF5.File})()
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/file.jl:98
    [6] task_local_storage(body::HDF5.var"#17#18"{HDF5.HDF5Context, @Kwargs{}, Trixi.var"#282#299", HDF5.File}, key::Symbol, val::HDF5.HDF5Context)
      @ Base ./task.jl:297
    [7] #h5open#16
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/file.jl:93 [inlined]
    [8] h5open(filename::String, mode::String)
      @ HDF5 ~/.julia/packages/HDF5/aiZLs/src/file.jl:91 [inlined]
...

in our CI runs testing Julia v1.10.0-beta2, see https://github.com/trixi-framework/Trixi.jl/actions/runs/5898667882/job/16000054066?pr=1562#step:7:2270 It would be great to be able to use HDF5.jl on Julia v1.10 once it's released

mkitti commented 1 year ago

Sorry. I'm working on a breaking release. Targeting Monday in ~96 hours.

ranocha commented 1 year ago

Great, thanks a lot! I'm looking forward to it

mkitti commented 1 year ago

I'm planning a 0.16.16 release to fix this sooner than 0.17: https://github.com/JuliaIO/HDF5.jl/pull/1098