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

"libmkl_rt" on Windows #120

Closed
jkrimmer opened this issue Oct 23, 2019 · 2 comments
Closed

"libmkl_rt" on Windows #120

jkrimmer opened this issue Oct 23, 2019 · 2 comments

Comments

@jkrimmer
Copy link
Contributor

Using FFTW with JULIA_FFTW_PROVIDER = MKL on Windows 10 fails on my system.

ERROR: LoadError: LoadError: could not load library "C:\Users\jonas\.julia\conda\3\Library\bin\libmkl_rt"
The specified module could not be found.

Stacktrace:
 [1] top-level scope at C:\Users\jonas\.julia\packages\FFTW\MJ7kl\src\fft.jl:58
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1094
 [4] include at .\Base.jl:31 [inlined]
 [5] include(::String) at C:\Users\jonas\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:1
 [6] top-level scope at C:\Users\jonas\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:77
 [7] include at .\boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1094
 [9] include(::Module, ::String) at .\Base.jl:31
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:330 [inlined]
 [12] eval(::Expr) at .\client.jl:432
 [13] top-level scope at .\none:3
in expression starting at C:\Users\jonas\.julia\packages\FFTW\MJ7kl\src\fft.jl:58
in expression starting at C:\Users\jonas\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:77
ERROR: Failed to precompile FFTW [7a1cc6ca-52ef-59f5-83cd-3a7055c09341] to C:\Users\jonas\.julia\compiled\v1.2\FFTW\PvIn2.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1253
 [3] _require(::Base.PkgId) at .\loading.jl:1013
 [4] require(::Base.PkgId) at .\loading.jl:911
 [5] require(::Module, ::Symbol) at .\loading.jl:906

However, I've been able to fix the issue by replacing all occurrences of "libmkl_rt" in ".../deps/build.jl" and ".../src/FFTW.jl" with the new variable mkllib

if Sys.iswindows()
    mkllib = "mkl_rt"
else
    mkllib = "libmkl_rt"
end

According to the article A New Linking Model-Single Dynamic Library mkl_rt Since Intel® MKL 10.3, the mkl library has a different name in Windows operating systems.

@senpai-a
Copy link

senpai-a commented Nov 5, 2019

I encounterd the same problem, thank u for your fix.
also I got
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll
and then Julia crashes. I need to add "C:\users\username.julia\conda\3\Library\bin" to Path to fix this.

@ararslan
Copy link
Member

ararslan commented Dec 5, 2019

Fixed by #128.

@ararslan ararslan closed this as completed Dec 5, 2019
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

3 participants