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

LoadError during precompilation of DifferentialEquations on 1.9.3 #990

Closed
qtoloza opened this issue Oct 12, 2023 · 8 comments
Closed

LoadError during precompilation of DifferentialEquations on 1.9.3 #990

qtoloza opened this issue Oct 12, 2023 · 8 comments

Comments

@qtoloza
Copy link

qtoloza commented Oct 12, 2023

I ]updated yesterday for the first time in a couple weeks and ran into a precompile error. The machine in question is running Windows 11 and I've been installing Julia using the official binaries. I've tested on three other Windows and Linux machines and have not been able to replicate - DifferentialEquations precompiles just fine on them.

Things I've tried:

  1. Deleting ~/.julia or ~/.julia/artifacts and re-adding DifferentialEquations
  2. A fresh install of 1.9.3
  3. Changing Julia versions to 1.8.5 and 1.10.0-beta3
  4. Running ]add MKL_jll before ]add DifferentialEquations (MKL_jll still fails to precompile)
  5. Copying what seems to be the offending file ("~/.julia/artifacts/0ca2685c24303902e65e0866846d3b5404e2c9c6/bin/libiomp5md.dll") from another machine that precompiles successfully
  6. A fresh install of Windows 11 on the offending machine

None of the above have resolved the issue.

I get this at the end of ]add DifferentialEquations on a fresh install:

Precompiling project...
  ✗ MKL_jll
  ✗ LinearSolve
  ✗ NonlinearSolve
  ✗ BoundaryValueDiffEq
  ✗ OrdinaryDiffEq
  ✗ StochasticDiffEq
  ✗ DelayDiffEq
  ✗ DifferentialEquations
  155 dependencies successfully precompiled in 68 seconds. 7 already precompiled.
  8 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

I get this on ]precompile:

ERROR: The following 1 direct dependency failed to precompile:

DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to "C:\\Users\\quiqu\\.julia\\compiled\\v1.9\\DifferentialEquations\\jl_A5DA.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\quiqu\.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin\libiomp5md.dll"
The specified module could not be found.
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
    @ C:\Users\quiqu\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ IntelOpenMP_jll C:\Users\quiqu\.julia\packages\IntelOpenMP_jll\dsBo4\src\wrappers\x86_64-w64-mingw32.jl:8
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1115
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1506
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1783
  [9] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
 [10] macro expansion
    @ .\loading.jl:1648 [inlined]
 [11] macro expansion
    @ .\lock.jl:267 [inlined]
 [12] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
 [13] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
 [14] top-level scope
    @ C:\Users\quiqu\.julia\packages\JLLWrappers\pG9bm\src\toplevel_generators.jl:192
 [15] include
    @ .\Base.jl:457 [inlined]
 [16] 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:2049
 [17] top-level scope
    @ stdin:3
during initialization of module IntelOpenMP_jll
in expression starting at C:\Users\quiqu\.julia\packages\MKL_jll\8Hu7G\src\wrappers\x86_64-w64-mingw32.jl:4
in expression starting at C:\Users\quiqu\.julia\packages\MKL_jll\8Hu7G\src\MKL_jll.jl:2
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7] to "C:\\Users\\quiqu\\.julia\\compiled\\v1.9\\MKL_jll\\jl_BA70.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] top-level scope
    @ C:\Users\quiqu\.julia\packages\LinearSolve\tPdfJ\src\LinearSolve.jl:44
 [10] top-level scope
    @ C:\Users\quiqu\.julia\packages\LinearSolve\tPdfJ\src\LinearSolve.jl:9
 [11] include
    @ .\Base.jl:457 [inlined]
 [12] 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:2049
 [13] top-level scope
    @ stdin:3
in expression starting at C:\Users\quiqu\.julia\packages\LinearSolve\tPdfJ\src\LinearSolve.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to "C:\\Users\\quiqu\\.julia\\compiled\\v1.9\\LinearSolve\\jl_B494.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] include
    @ .\Base.jl:457 [inlined]
 [10] 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:2049
 [11] top-level scope
    @ stdin:3
in expression starting at C:\Users\quiqu\.julia\packages\OrdinaryDiffEq\yppG9\src\OrdinaryDiffEq.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to "C:\\Users\\quiqu\\.julia\\compiled\\v1.9\\OrdinaryDiffEq\\jl_AE3B.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] include
    @ .\Base.jl:457 [inlined]
 [10] 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:2049
 [11] top-level scope
    @ stdin:3
in expression starting at C:\Users\quiqu\.julia\packages\StochasticDiffEq\4xxaL\src\StochasticDiffEq.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile StochasticDiffEq [789caeaf-c7a9-5a7d-9973-96adeb23e2a0] to "C:\\Users\\quiqu\\.julia\\compiled\\v1.9\\StochasticDiffEq\\jl_A9E6.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] include
    @ .\Base.jl:457 [inlined]
 [10] 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::Nothing)
    @ Base .\loading.jl:2049
 [11] top-level scope
    @ stdin:3
in expression starting at C:\Users\quiqu\.julia\packages\DifferentialEquations\Tu7HS\src\DifferentialEquations.jl:1
in expression starting at stdin:3

This is my ]st -m:

(@v1.9) pkg> st -m
Status `C:\Users\quiqu\.julia\environments\v1.9\Manifest.toml`
  [47edcb42] ADTypes v0.2.4
  [79e6a3ab] Adapt v3.6.2
  [ec485272] ArnoldiMethod v0.2.0
  [4fba245c] ArrayInterface v7.4.11
  [30b0a656] ArrayInterfaceCore v0.1.29
  [62783981] BitTwiddlingConvenienceFunctions v0.1.5
  [764a87c0] BoundaryValueDiffEq v5.1.0
⌅ [fa961155] CEnum v0.4.2
  [2a0fbf3d] CPUSummary v0.2.4
  [49dc2e85] Calculus v0.5.1
  [d360d2e6] ChainRulesCore v1.16.0
  [fb6a15b2] CloseOpenIntervals v0.1.12
  [38540f10] CommonSolve v0.2.4
  [bbf7d656] CommonSubexpressions v0.3.0
  [34da2185] Compat v4.10.0
  [2569d6c7] ConcreteStructs v0.2.3
  [187b0558] ConstructionBase v1.5.4
  [adafc99b] CpuId v0.3.1
  [9a962f9c] DataAPI v1.15.0
  [864edb3b] DataStructures v0.18.15
  [e2d170a0] DataValueInterfaces v1.0.0
  [bcd4f6db] DelayDiffEq v5.43.1
  [2b5f629d] DiffEqBase v6.133.1
  [459566f4] DiffEqCallbacks v2.33.0
  [77a26b50] DiffEqNoiseProcess v5.19.0
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
  [0c46a032] DifferentialEquations v7.11.0
  [b4f34e82] Distances v0.10.10
  [31c24e10] Distributions v0.25.102
  [ffbed154] DocStringExtensions v0.9.3
  [fa6b7ba4] DualNumbers v0.6.8
  [4e289a0a] EnumX v1.0.4
  [f151be2c] EnzymeCore v0.6.1
  [d4d017d3] ExponentialUtilities v1.25.0
  [e2ba6199] ExprTools v0.1.10
  [7034ab61] FastBroadcast v0.2.7
  [9aa1b823] FastClosures v0.3.2
  [29a986be] FastLapackInterface v2.0.0
  [1a297f60] FillArrays v1.6.1
  [6a86dc24] FiniteDiff v2.21.1
  [f6369f11] ForwardDiff v0.10.36
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v0.1.3
  [d9f16b24] Functors v0.4.5
  [46192b85] GPUArraysCore v0.1.5
  [c145ed77] GenericSchur v0.5.3
  [86223c79] Graphs v1.9.0
  [3e5b6fbb] HostCPUFeatures v0.1.16
  [34004b35] HypergeometricFunctions v0.3.23
  [615f187c] IfElse v0.1.1
  [d25df0c9] Inflate v0.1.4
  [92d709cd] IrrationalConstants v0.2.2
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.5.0
  [ccbc3e58] JumpProcesses v9.8.0
  [ef3ab10e] KLU v0.4.1
  [ba0b0d4f] Krylov v0.9.4
  [10f19ff3] LayoutPointers v0.1.14
  [50d2b5c4] Lazy v0.15.1
  [2d8b4e74] LevyArea v1.0.0
  [d3d80556] LineSearches v7.2.0
  [7ed4a6bd] LinearSolve v2.9.2
  [2ab3a3ac] LogExpFunctions v0.3.26
  [bdcacae8] LoopVectorization v0.12.165
  [1914dd2f] MacroTools v0.5.11
  [d125e4d3] ManualMemory v0.1.8
  [e1d29d7a] Missings v1.1.0
  [46d2c3a1] MuladdMacro v0.2.4
  [d41bc354] NLSolversBase v7.8.3
  [2774e3e8] NLsolve v4.5.1
  [77ba4419] NaNMath v1.0.2
  [8913a72c] NonlinearSolve v2.2.1
  [6fe1bfb0] OffsetArrays v1.12.10
  [429524aa] Optim v1.7.8
  [bac558e1] OrderedCollections v1.6.2
  [1dea7af3] OrdinaryDiffEq v6.58.0
  [90014a1f] PDMats v0.11.25
  [65ce6f38] PackageExtensionCompat v1.0.2
  [d96e819e] Parameters v0.12.3
  [e409e4f3] PoissonRandom v0.4.4
  [f517fe37] Polyester v0.7.8
  [1d0040c9] PolyesterWeave v0.2.1
  [85a6dd25] PositiveFactorizations v0.2.4
  [d236fae5] PreallocationTools v0.4.12
  [aea7be01] PrecompileTools v1.2.0
  [21216c6a] Preferences v1.4.1
  [1fd47b50] QuadGK v2.9.1
  [74087812] Random123 v1.6.1
  [e6cf234a] RandomNumbers v1.5.3
  [3cdcf5f2] RecipesBase v1.3.4
  [731186ca] RecursiveArrayTools v2.39.0
  [f2c3362d] RecursiveFactorization v0.2.20
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.0
  [ae5879a3] ResettableStacks v1.1.1
  [79098fc4] Rmath v0.7.1
  [7e49a35a] RuntimeGeneratedFunctions v0.5.12
  [94e857df] SIMDTypes v0.1.0
  [476501e8] SLEEFPirates v0.6.39
  [0bca4576] SciMLBase v2.4.0
  [e9a6253c] SciMLNLSolve v0.1.9
  [c0aeaf25] SciMLOperators v0.3.6
  [efcf1570] Setfield v1.1.1
  [727e6d20] SimpleNonlinearSolve v0.1.20
  [699a6c99] SimpleTraits v0.9.4
  [ce78b400] SimpleUnPack v1.1.0
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.1
  [47a9eef4] SparseDiffTools v2.8.0
  [e56a9233] Sparspak v0.3.9
  [276daf66] SpecialFunctions v2.3.1
  [aedffcd0] Static v0.8.8
  [0d7ed370] StaticArrayInterface v1.4.1
  [90137ffa] StaticArrays v1.6.5
  [1e83bf80] StaticArraysCore v1.4.2
  [82ae8749] StatsAPI v1.7.0
  [2913bbd2] StatsBase v0.34.2
  [4c63d2b9] StatsFuns v1.3.0
  [9672c7b4] SteadyStateDiffEq v1.16.1
  [789caeaf] StochasticDiffEq v6.63.0
⌅ [7792a7ef] StrideArraysCore v0.4.17
  [c3572dad] Sundials v4.20.0
  [2efcf032] SymbolicIndexingInterface v0.2.2
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.11.0
  [8290d209] ThreadingUtilities v0.5.2
  [a2a6695c] TreeViews v0.3.0
  [d5829a12] TriangularSolve v0.1.19
  [410a4b4d] Tricks v0.1.8
  [781d530d] TruncatedStacktraces v1.4.0
  [3a884ed6] UnPack v1.0.2
  [3d5dd08c] VectorizationBase v0.21.64
  [19fa3120] VertexSafeGraphs v0.2.0
  [700de1a5] ZygoteRules v0.2.3
  [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0
  [856f044c] MKL_jll v2023.2.0+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [f50d1b31] Rmath_jll v0.4.0+0
⌅ [fb77eaff] Sundials_jll v5.2.1+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [4af54fe1] LazyArtifacts
  [b27032c2] LibCURL v0.6.3
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.9.2
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics v1.9.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.0.5+0
  [deac9b47] LibCURL_jll v7.84.0+0
  [29816b5a] LibSSH2_jll v1.10.2+0
  [c8ffd9c3] MbedTLS_jll v2.28.2+0
  [14a3606d] MozillaCACerts_jll v2022.10.11
  [4536629a] OpenBLAS_jll v0.3.21+4
  [05823500] OpenLibm_jll v0.8.1+0
  [bea87d4a] SuiteSparse_jll v5.10.1+6
  [83775a58] Zlib_jll v1.2.13+0
  [8e850b90] libblastrampoline_jll v5.8.0+0
  [8e850ede] nghttp2_jll v1.48.0+0
  [3f19e933] p7zip_jll v17.4.0+0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

Any help would be greatly appreciated!

@devmotion devmotion assigned devmotion and unassigned devmotion Oct 12, 2023
@ChrisRackauckas
Copy link
Member

Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to "C:\Users\quiqu\.julia\compiled\v1.9\DifferentialEquations\jl_A5DA.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\quiqu.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin\libiomp5md.dll"
The specified module could not be found.

That just means the binary didn't install.

Deleting ~/.julia or ~/.julia/artifacts and re-adding DifferentialEquations

That should be all that's needed to reset the artifact downloading.

@staticfloat or @giordano have things to share here? This isn't really a DifferentialEquations.jl issue as much as it's a binary server issue. I would've thought telling people to just run ]build DiffferentialEquations would rerun the process of downloading binaries and fix corruption, but I noticed recently that it doesn't so I don't have a suggestion beyond wiping .julia.

@giordano
Copy link

IntelOpenMP isn't an open source package we compile from source, it's a binary blob from Intel we just repackage. If you have any problems with it, you have to direct them to Intel directly, there's nothing we can possibly do about it.

For the record, libiomp5md.dll depends on the following system libraries:

sandbox:${WORKSPACE} # x86_64-w64-mingw32-objdump -x libiomp5md.dll | grep "DLL Name"
        DLL Name: KERNEL32.dll
        DLL Name: VCRUNTIME140.dll
        DLL Name: api-ms-win-crt-string-l1-1-0.dll
        DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
        DLL Name: api-ms-win-crt-heap-l1-1-0.dll
        DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
        DLL Name: api-ms-win-crt-convert-l1-1-0.dll
        DLL Name: api-ms-win-crt-environment-l1-1-0.dll
        DLL Name: api-ms-win-crt-utility-l1-1-0.dll
        DLL Name: api-ms-win-crt-filesystem-l1-1-0.dll

@ChrisRackauckas
Copy link
Member

But isn't this an issue with the package manager not giving the binary? This is supposed to just be shipped as part of MKL_jll if I'm not mistaken, and the error is that it wasn't

@giordano
Copy link

As far as I understand the awful error message thrown by the Windows dynamic loader, the problem is that one of the modules (== libraries) required by C:\Users\quiqu.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin\libiomp5md.dll can't be found. If C:\Users\quiqu.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin\libiomp5md.dll wasn't there, the error message would be different, I think. I guess @qtoloza can clarify whether the mentioned file is there, but point 5 of the OP suggests that was the case.

@raju-bitter
Copy link

@qtoloza What I read is that the libiomp5md.dll library was present on the Windows machine giving the compile error, and even a version of that file over from other machines, placing it in the same location did not resolve the problem. That doesn't sound like a problem with the library file not downloading, but that specific machine not being able to load the DLL. Do you use the same antivirus software on the Windows machines?

Can you open the DLL from Julia using Libc.Libdl.dlopen? Any errors for that? You could compare the checksum for the file with the machines where it's working.

julia> Libc.Libdl.dlopen("C:\\Users\\rajub\\.julia\\artifacts\\0ca2685c24303902e65e0866846d3b5404e2c9c6\\bin\\libiomp5md.dll")
Ptr{Nothing} @0x00007ff8f94c0000

@qtoloza
Copy link
Author

qtoloza commented Oct 16, 2023

Thanks everyone for weighing in!

This PC is currently just running Microsoft Defender, which at least one other Windows PC I've tested on is also running.

@giordano @raju-bitter, I can confirm that libiomp5md.dll appears in the correct directory:

PS C:\Users\quiqu\.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin> dir


    Directory: C:\Users\quiqu\.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        10/13/2023   1:00 PM        2062976 libiomp5md.dll
-a----        10/13/2023   1:00 PM        4567040 libiomp5md.pdb
-a----        10/13/2023   1:00 PM          41600 libiompstubs5md.dll
-a----        10/13/2023   1:00 PM          14680 libomp-fallback-cstring.spv
-a----        10/13/2023   1:00 PM         784000 omptarget.dll
-a----        10/13/2023   1:00 PM        1335936 omptarget.rtl.level0.dll
-a----        10/13/2023   1:00 PM        1271936 omptarget.rtl.opencl.dll
-a----        10/13/2023   1:00 PM          72832 omptarget.sycl.wrap.dll

But, as @raju-bitter suspected, I get an error when trying to load the library directly.

julia> Libc.Libdl.dlopen("C:\\Users\\quiqu\\.julia\\artifacts\\0ca2685c24303902e65e0866846d3b5404e2c9c6\\bin\\libiomp5md.dll")
ERROR: could not load library "C:\Users\quiqu\.julia\artifacts\0ca2685c24303902e65e0866846d3b5404e2c9c6\bin\libiomp5md.dll"
The specified module could not be found.
Stacktrace:
 [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
   @ Base.Libc.Libdl .\libdl.jl:117
 [2] dlopen
   @ .\libdl.jl:116 [inlined]
 [3] dlopen(s::String)
   @ Base.Libc.Libdl .\libdl.jl:116
 [4] top-level scope
   @ REPL[1]:1

I'm not sure if this is additionally helpful at all, but for the record:

julia> isfile("C:\\Users\\quiqu\\.julia\\artifacts\\0ca2685c24303902e65e0866846d3b5404e2c9c6\\bin\\libiomp5md.dll")
true

I fully agree that this must be a problem with the specific configuration of my PC and not with DifferentialEquations overall.

@qtoloza
Copy link
Author

qtoloza commented Oct 16, 2023

IntelOpenMP isn't an open source package we compile from source, it's a binary blob from Intel we just repackage. If you have any problems with it, you have to direct them to Intel directly, there's nothing we can possibly do about it.

For the record, libiomp5md.dll depends on the following system libraries:

sandbox:${WORKSPACE} # x86_64-w64-mingw32-objdump -x libiomp5md.dll | grep "DLL Name"
        DLL Name: KERNEL32.dll
        DLL Name: VCRUNTIME140.dll
        DLL Name: api-ms-win-crt-string-l1-1-0.dll
        DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
        DLL Name: api-ms-win-crt-heap-l1-1-0.dll
        DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
        DLL Name: api-ms-win-crt-convert-l1-1-0.dll
        DLL Name: api-ms-win-crt-environment-l1-1-0.dll
        DLL Name: api-ms-win-crt-utility-l1-1-0.dll
        DLL Name: api-ms-win-crt-filesystem-l1-1-0.dll

Ah, I misunderstood you at first. You're right:

quiqu@Gorgara MINGW64 ~/.julia/artifacts/0ca2685c24303902e65e0866846d3b5404e2c9c6/bin
$ ldd libiomp5md.dll
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffd7fc90000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffd7ef00000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffd7d360000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffd7dd80000)
        libiomp5md.dll => /c/Users/quiqu/.julia/artifacts/0ca2685c24303902e65e0866846d3b5404e2c9c6/bin/libiomp5md.dll (0x7ffd360b0000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffd7d0d0000)
        VCRUNTIME140.dll => not found
        api-ms-win-crt-string-l1-1-0.dll => not found
        api-ms-win-crt-runtime-l1-1-0.dll => not found
        api-ms-win-crt-heap-l1-1-0.dll => not found
        api-ms-win-crt-stdio-l1-1-0.dll => not found
        api-ms-win-crt-convert-l1-1-0.dll => not found
        api-ms-win-crt-environment-l1-1-0.dll => not found
        api-ms-win-crt-utility-l1-1-0.dll => not found
        api-ms-win-crt-filesystem-l1-1-0.dll => not found

Off to figure out why I'm missing these!

@qtoloza
Copy link
Author

qtoloza commented Oct 16, 2023

The answer in the end was that I needed to re-install the relevant Visual C++ redist. Everything is precompiling as expected now. Thank you everyone for the help!!

@qtoloza qtoloza closed this as completed Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants