SciML / LinearSolve.jl

LinearSolve.jl: High-Performance Unified Interface for Linear Solvers in Julia. Easily switch between factorization and Krylov methods, add preconditioners, and all in one interface.
https://docs.sciml.ai/LinearSolve/stable/
Other
241 stars 52 forks source link

Precompilation fails everytime julia v1.10 is restarted. #461

Closed montyvesselinov closed 7 months ago

montyvesselinov commented 7 months ago

Precompilation fails everytime julia v1.10 is restarted.

✗ LinearSolve ✗ LinearSolve → LinearSolveIterativeSolversExt ✗ LinearSolve → LinearSolveFastAlmostBandedMatricesExt ✗ LinearSolve → LinearSolveKernelAbstractionsExt ✗ LinearSolve → LinearSolveBandedMatricesExt ✗ LinearSolve → LinearSolveRecursiveArrayToolsExt ✗ NonlinearSolve ✗ NonlinearSolve → NonlinearSolveZygoteExt ✗ NonlinearSolve → NonlinearSolveBandedMatricesExt ✗ NonlinearSolve → NonlinearSolveNLsolveExt

ChrisRackauckas commented 7 months ago

Please post the whole stack trace for using LinearSolve.

montyvesselinov commented 7 months ago
┌ Warning: attempting to remove probably stale pidfile
│   path = "C:\\Users\\monty\\.julia\\compiled\\v1.10\\LinearSolve\\WR6RC_EgZJk.ji.pidfile"
└ @ FileWatching.Pidfile C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:244
Precompiling LinearSolve
        Info Given LinearSolve was explicitly requested, output will be shown live
ERROR: LoadError: InitError: could not load library "C:\Users\monty\.julia\artifacts\627190b3418f9b1cfbbf9b16afba530328670386\bin\mkl_core.2.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\monty\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ MKL_jll C:\Users\monty\.julia\packages\MKL_jll\GxRJ5\src\wrappers\x86_64-w64-mingw32.jl:10
  [5] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [11] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [14] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [17] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [20] top-level scope
    @ C:\Users\monty\.julia\packages\Preferences\TTEAN\src\Preferences.jl:46
 [21] include
    @ Base .\Base.jl:495 [inlined]
 [22] 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)olve
    @ Base .\loading.jl:2216
 [23] top-level scope
    @ stdin:3
during initialization of module MKL_jll
in expression starting at C:\Users\monty\.julia\packages\LinearSolve\Dqpre\src\LinearSolve.jl:1
in expression starting at stdin:3
  ✗ LinearSolve
  0 dependencies successfully precompiled in 7 seconds. 137 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae]

Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to "C:\\Users\\monty\\.julia\\compiled\\v1.10\\LinearSolve\\jl_8F9E.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\monty\.julia\artifacts\627190b3418f9b1cfbbf9b16afba530328670386\bin\mkl_core.2.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\monty\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ MKL_jll C:\Users\monty\.julia\packages\MKL_jll\GxRJ5\src\wrappers\x86_64-w64-mingw32.jl:10
  [5] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [11] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [14] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [17] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [20] top-level scope
    @ C:\Users\monty\.julia\packages\Preferences\TTEAN\src\Preferences.jl:46
 [21] include
    @ Base .\Base.jl:495 [inlined]
 [22] 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:2216
 [23] top-level scope
    @ stdin:3
during initialization of module MKL_jll
in expression starting at C:\Users\monty\.julia\packages\LinearSolve\Dqpre\src\LinearSolve.jl:1
in expression starting at stdin:
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Types.jl:70
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:1656
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [4] precompile
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:147 [inlined]
  [5] #precompile#114
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:146 [inlined]
  [6] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [7] invokelatest
    @ Base .\essentials.jl:884 [inlined]
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1957
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [10] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [11] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [13] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [14] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [16] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [17] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [19] eval
    @ .\boot.jl:385 [inlined]
 [20] eval
    @ .\Base.jl:88 [inlined]
 [21] repleval(m::Module, code::Expr, ::String)
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:229
 [22] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:192
 [23] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:515
 [24] with_logger
    @ .\logging.jl:627 [inlined]
 [25] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:193
 [26] #invokelatest#2
    @ Base .\essentials.jl:887 [inlined]
 [27] invokelatest(::Any)
    @ Base .\essentials.jl:884
 [28] (::VSCodeServer.var"#62#63")()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\eval.jl:34
Some type information was truncated. Use `show(err)` to see complete types.

here it is

ChrisRackauckas commented 7 months ago

Is this 32-bit Julia?

ChrisRackauckas commented 7 months ago

What happens if you ]add MKL_jll and ]build MKL_jll?

montyvesselinov commented 7 months ago
Precompiling LinearSolve
        Info Given LinearSolve was explicitly requested, output will be shown live
ERROR: LoadError: InitError: could not load library "C:\Users\monty\.julia\artifacts\627190b3418f9b1cfbbf9b16afba530328670386\bin\mkl_core.2.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\monty\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ MKL_jll C:\Users\monty\.julia\packages\MKL_jll\GxRJ5\src\wrappers\x86_64-w64-mingw32.jl:10
  [5] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [11] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [14] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747                                                                                                                                    
 [17] #invoke_in_world#3                                                                                                                                        
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [20] top-level scope
    @ C:\Users\monty\.julia\packages\Preferences\TTEAN\src\Preferences.jl:46
 [21] include
    @ Base .\Base.jl:495 [inlined]
 [22] 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:2216
 [23] top-level scope
    @ stdin:3
during initialization of module MKL_jll
in expression starting at C:\Users\monty\.julia\packages\LinearSolve\Dqpre\src\LinearSolve.jl:1
in expression starting at stdin:3
  ✗ LinearSolve
  0 dependencies successfully precompiled in 6 seconds. 137 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae]

Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to "C:\\Users\\monty\\.julia\\compiled\\v1.10\\LinearSolve\\jl_D7F.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\monty\.julia\artifacts\627190b3418f9b1cfbbf9b16afba530328670386\bin\mkl_core.2.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\monty\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ MKL_jll C:\Users\monty\.julia\packages\MKL_jll\GxRJ5\src\wrappers\x86_64-w64-mingw32.jl:10
  [5] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [11] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [14] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [17] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [20] top-level scope
    @ C:\Users\monty\.julia\packages\Preferences\TTEAN\src\Preferences.jl:46
 [21] include
    @ Base .\Base.jl:495 [inlined]
 [22] 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:2216
 [23] top-level scope
    @ stdin:3
during initialization of module MKL_jll
in expression starting at C:\Users\monty\.julia\packages\LinearSolve\Dqpre\src\LinearSolve.jl:1
in expression starting at stdin:
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Types.jl:70
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:1656
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [4] precompile
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:147 [inlined]
  [5] #precompile#114
    @ Pkg.API C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:146 [inlined]
  [6] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [7] invokelatest
    @ Base .\essentials.jl:884 [inlined]
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1957
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [10] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [11] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [13] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [14] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [16] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [17] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [19] eval
    @ .\boot.jl:385 [inlined]
 [20] eval
    @ .\Base.jl:88 [inlined]
 [21] repleval(m::Module, code::Expr, ::String)
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:229
 [22] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:192
 [23] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:515
 [24] with_logger
    @ .\logging.jl:627 [inlined]
 [25] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\repl.jl:193
 [26] #invokelatest#2
    @ Base .\essentials.jl:887 [inlined]
 [27] invokelatest(::Any)
    @ Base .\essentials.jl:884
 [28] (::VSCodeServer.var"#62#63")()
    @ VSCodeServer c:\Users\monty\.vscode-insiders\extensions\julialang.language-julia-1.66.2\scripts\packages\VSCodeServer\src\eval.jl:34
Some type information was truncated. Use `show(err)` to see complete types.
montyvesselinov commented 7 months ago

Above is after ]add MKL_jll and ]build MKL_jll ...

Their execution did not produce any errors.

giordano commented 7 months ago

@montyvesselinov just as a sanity check, do you have the file C:\Users\monty\.julia\artifacts\627190b3418f9b1cfbbf9b16afba530328670386\bin\mkl_core.2.dll on disk? But in general these error messages are extremely frustrating because they're very unclear and they come directly from your operating system, we can't get more information out of it than the next-to-nothing that it's telling us.

montyvesselinov commented 7 months ago

No. The file is missing.

montyvesselinov commented 7 months ago

I have been struggling with artifacts in the past and I know how frustrating is it. there should be a way to fix these problems. last time I had to rebuild everything.

montyvesselinov commented 7 months ago

it is solved now; the steps are: