# Error when using MKLDirectSolver in SCS

**URL:** <https://discourse.julialang.org/t/error-when-using-mkldirectsolver-in-scs/112982>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump, error\
**Created:** [April 15, 2024, 11:04pm UTC](https://discourse.julialang.org/t/error-when-using-mkldirectsolver-in-scs/112982 "2024-04-15T23:04:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charshaw/32/10361_2.png) [@charshaw](https://discourse.julialang.org/u/charshaw)\
**Post date:** [April 15, 2024, 11:04pm UTC](https://discourse.julialang.org/t/error-when-using-mkldirectsolver-in-scs/112982/1 "2024-04-15T23:04:10Z")

</div>

I am using JuMP and calling SCS as a solver. I want to use `SCS.MKLDirectSolver`, as discussed in an [earlier thread](https://discourse.julialang.org/t/multi-core-parallel-support-for-jump-supported-solvers/112392/16). As discussed on the SCS.jl README page, this requires using the package `SCS_MKL_jll`. But, I’m getting an error message, even just loading the packages:

Running the following two lines

```julia
using SCS_MKL_jll
using SCS

```

I get the following error message

```julia
ERROR: LoadError: UndefVarError: `libscsmkl` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ ~/.julia/packages/SCS/mqg7w/ext/SCSSCS_MKL_jllExt.jl:11
 [3] include
   @ ./Base.jl:495 [inlined]
 [4] 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:2222
 [5] top-level scope
   @ stdin:3
in expression starting at /Users/chris/.julia/packages/SCS/mqg7w/ext/SCSSCS_MKL_jllExt.jl:6
in expression starting at stdin:3
  ✗ SCS → SCSSCS_MKL_jllExt
  0 dependencies successfully precompiled in 4 seconds. 49 already precompiled.
[Info: Precompiling SCSSCS_MKL_jllExt [35b951bd-bc4e-5cd9-90c5-f6de5c23ce67]
ERROR: LoadError: UndefVarError: `libscsmkl` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ ~/.julia/packages/SCS/mqg7w/ext/SCSSCS_MKL_jllExt.jl:11
 [3] include
   @ ./Base.jl:495 [inlined]
 [4] 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:2222
 [5] top-level scope
   @ stdin:3
in expression starting at /Users/chris/.julia/packages/SCS/mqg7w/ext/SCSSCS_MKL_jllExt.jl:6
in expression starting at stdin:3
┌ Error: Error during loading of extension SCSSCS_MKL_jllExt of SCS, use `Base.retry_load_extensions()` to retry.
│ exception =
│ 1-element ExceptionStack:
│ Failed to precompile SCSSCS_MKL_jllExt [35b951bd-bc4e-5cd9-90c5-f6de5c23ce67] to "/Users/chris/.julia/compiled/v1.10/SCSSCS_MKL_jllExt/jl_Yy9goV".
│ 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:2468
│ [3] compilecache
│ @ ./loading.jl:2340 [inlined]
│ [4] (::Base.var"#968#969"{Base.PkgId})()
│ @ Base ./loading.jl:1974
│ [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
│ @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
│ [6] #mkpidlock#6
│ @ ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
│ [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
│ @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
│ [8] #invokelatest#2
│ @ ./essentials.jl:894 [inlined]
│ [9] invokelatest
│ @ ./essentials.jl:889 [inlined]
│ [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│ @ Base ./loading.jl:2983
│ [11] maybe_cachefile_lock
│ @ ./loading.jl:2980 [inlined]
│ [12] _require(pkg::Base.PkgId, env::Nothing)
│ @ Base ./loading.jl:1970
│ [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│ @ Base ./loading.jl:1812
│ [14] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [15] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [16] _require_prelocked
│ @ ./loading.jl:1803 [inlined]
│ [17] _require_prelocked
│ @ ./loading.jl:1802 [inlined]
│ [18] run_extension_callbacks(extid::Base.ExtensionId)
│ @ Base ./loading.jl:1295
│ [19] run_extension_callbacks(pkgid::Base.PkgId)
│ @ Base ./loading.jl:1330
│ [20] run_package_callbacks(modkey::Base.PkgId)
│ @ Base ./loading.jl:1164
│ [21] __require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base ./loading.jl:1819
│ [22] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [23] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [24] _require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base ./loading.jl:1803
│ [25] macro expansion
│ @ ./loading.jl:1790 [inlined]
│ [26] macro expansion
│ @ ./lock.jl:267 [inlined]
│ [27] __require(into::Module, mod::Symbol)
│ @ Base ./loading.jl:1753
│ [28] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [29] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [30] require(into::Module, mod::Symbol)
│ @ Base ./loading.jl:1746
│ [31] eval
│ @ ./boot.jl:385 [inlined]
│ [32] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
│ @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:150
│ [33] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
│ @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:246
│ [34] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
│ @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:231
│ [35] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
│ @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:389
│ [36] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│ @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:375
│ [37] (::Base.var"#1013#1015"{Bool, Bool, Bool})(REPL::Module)
│ @ Base ./client.jl:432
│ [38] #invokelatest#2
│ @ ./essentials.jl:892 [inlined]
│ [39] invokelatest
│ @ ./essentials.jl:889 [inlined]
│ [40] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│ @ Base ./client.jl:416
│ [41] exec_options(opts::Base.JLOptions)
│ @ Base ./client.jl:333
│ [42] _start()
│ @ Base ./client.jl:552
└ @ Base loading.jl:1301

```

Is this an error on my end? I’m not quite able to parse the error message. All help is appreciated!

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [April 15, 2024, 11:14pm UTC](https://discourse.julialang.org/t/error-when-using-mkldirectsolver-in-scs/112982/2 "2024-04-15T23:14:33Z")

</div>

Per the documentation, this is available on x86 linux only.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/d/2dde9a33d28da9b64c81f789840564805ae56b83.png)

---

<div class="post-metadata">

**Author:** ![charshaw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charshaw/32/10361_2.png) [@charshaw](https://discourse.julialang.org/u/charshaw)\
**Post date:** [April 15, 2024, 11:20pm UTC](https://discourse.julialang.org/t/error-when-using-mkldirectsolver-in-scs/112982/3 "2024-04-15T23:20:59Z")

</div>

D’oh! That’s totally it.

When I originally saw this in the Documentation, I was thinking about whether my processor was x86\_64. But I realize that it needs a x86\_64 Linux distribution. I’ll try it on a Linux machine. Thanks!
