HDF5 error: MPIExt cannot find libmpi_usempif08.40.dylib


Missing /.julia/artifacts/69e85a392db842d919cf5759941f8f3e8a0e569e/lib/libhdf5_fortran.so"
libmpi_usempif08.so.40: cannot open shared object file: No such file or directory
? Any idea what that is about?

The missing library was found for a different artifact:


So there is such a library in circulation, but for some reason MPIExt fails to install/ find it?

What operating system and platform is this? The output of versioninfo() should suffice.

This happens both on a Mac and on Linux. Julia 1.10.0 (Mac) and 1.10.3 (Linux).

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 24 × Apple M2 Ultra
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 on 16 virtual cores

Now upgraded to 1.10.4, erased the depot. Still the same error.

julia> err
PkgPrecompileError: The following 7 direct dependencies failed to precompile:

FinEtoolsHeatDiff [972d1c22-8bdd-11e9-11cf-cdcb7577b041]

Failed to precompile FinEtoolsHeatDiff [972d1c22-8bdd-11e9-11cf-cdcb7577b041] to "/Users/pkrysl/.julia/compiled/v1.10/FinEtoolsHeatDiff/jl_GN5XKf".
ERROR: LoadError: InitError: could not load library "/Users/pkrysl/.julia/artifacts/1ca9a5d2ef01daeca735b28c3ce62406fc87e2ab/lib/libhdf5_fortran.310.dylib"
dlopen(/Users/pkrysl/.julia/artifacts/1ca9a5d2ef01daeca735b28c3ce62406fc87e2ab/lib/libhdf5_fortran.310.dylib, 0x0001): Library not loaded: @rpath/libmpi_usempif08.40.dylib
  Referenced from: <2DED3716-8217-3BFA-898A-DB658BC608DA> /Users/pkrysl/.julia/artifacts/1ca9a5d2ef01daeca735b28c3ce62406fc87e2ab/lib/libhdf5_fortran.310.dylib
  Reason: tried: '/Users/pkrysl/.julia/artifacts/1ca9a5d2ef01daeca735b28c3ce62406fc87e2ab/lib/./libmpi_usempif08.40.dylib' (no such file), '/Users/pkrysl/.julia/artifacts/1ca9a5d2ef01daeca735b28c3ce62406fc87e2ab/lib/./libmpi_usempif08.40.dylib' (no such file), '/Users/pkrysl/julia-1.10.4/lib/julia/libmpi_usempif08.40.dylib' (no such file), '/Users/pkrysl/julia-1.10.4/lib/julia/../libmpi_usempif08.40.dylib' (no such file), '/Users/pkrysl/julia-1.10.4/lib/libmpi_usempif08.40.dylib' (no such file), '/usr/local/lib/libmpi_usempif08.40.dylib' (no such file), '/usr/lib/libmpi_usempif08.40.dylib' (no such file, not in dyld cache)
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:116
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/pG9bm/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ HDF5_jll ~/.julia/packages/HDF5_jll/pjOXH/src/wrappers/aarch64-apple-darwin-libgfortran5-mpi+openmpi.jl:48
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1134
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1122
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1067
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1581
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1938
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1812
 [11] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [12] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1803
 [14] macro expansion
    @ ./loading.jl:1790 [inlined]
 [15] macro expansion
    @ ./lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1753
 [17] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1746
 [20] top-level scope
    @ ~/.julia/packages/HDF5/Z859u/src/api/api.jl:11
 [21] include(mod::Module, _path::String)
    @ Base ./Base.jl:495
 [22] include(x::String)
    @ HDF5 ~/.julia/packages/HDF5/Z859u/src/HDF5.jl:1
 [23] top-level scope
    @ ~/.julia/packages/HDF5/Z859u/src/HDF5.jl:68
 [24] include
    @ ./Base.jl:495 [inlined]
 [25] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2222
 [26] top-level scope
    @ stdin:3
during initialization of module HDF5_jll
in expression starting at /Users/pkrysl/.julia/packages/HDF5/Z859u/src/api/api.jl:1
in expression starting at /Users/pkrysl/.julia/packages/HDF5/Z859u/src/HDF5.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to "/Users/pkrysl/.julia/compiled/v1.10/HDF5/jl_hVlw7e".

I can’t find any mention of this lib in MPIExt, so perhaps MPI.jl is at fault?

It was MPIPreferences. I had it in the environment, I removed it and the errors went away.

I see. Perhaps you got caught in a transition to package extensions with regard to MPI and HDF5?