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
244 stars 52 forks source link

Why does LinearSolve depend on MKL_jll #524

Open ufechner7 opened 1 month ago

ufechner7 commented 1 month ago

Question❓

I would prefer not to use MKL. I only use static arrays, and for static arrays MKL does not have any advantage. Can the dependency on MKL.jll be removed or be made optional?

Furthermore, MKL.jll spits out this warning:

Precompiling project...
  227 dependencies successfully precompiled in 99 seconds
  1 dependency had output during precompilation:
┌ MKL_jll
│   Downloading artifact: MKL
│  
│  [pid 100819] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1906150->0x7358aae8abc0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│  
│  [pid 100819] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1906150->0x7358aae8abc0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
└  
ChrisRackauckas commented 4 weeks ago

If you don't use MKL_jll, then most installations are about 10x slower. So we depend on it by default but allow for preferences to not load it. In theory, Preferences.jl could be supported in Pkg so that you could disable adding a dependency, but for now that's a missing feature in the package manager that would be required to make this leaner. As such we have to make a choice, do we make all code slow by default or do we request a binary even if it may not be used? Currently we do the latter so that you get performance by default, and all of the other tools allow for advanced users to decrease binary size so it doesn't truly effect advanced usage. But I agree it's annoying and we really need new Pkg features to have a better solution here.