-
Notifications
You must be signed in to change notification settings - Fork 32
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
Disable use of multi-threaded MKL on mac #98
Comments
I wonder if Line 18 in 238a4bb
|
Disabling multithreading in MKL kills most of the benefit of the package versus OpenBLAS. I don't think that's a good approach. JuliaLang/LinearAlgebra.jl#845 is only an issue if one uses SpecialFunctions. Not sure about JuliaLang/LinearAlgebra.jl#896, but wouldn't it be better to try to understand where the bug in threading is instead of simply disabling it? (Apologies if I misunderstood the issue here) |
It is not just SpecialFunctions. It is possibly triggered through any fortran library. The bug is not in Julia's threading - it is that Intel OpenMP that MKL uses is incompatible with gcc libgomp (loaded by almost any fortran library). On linux, Intel provides a version that will use libgomp - but not on mac. Can you try the TBB option to see if that works reliably and also can use threads? |
See JuliaLang/LinearAlgebra.jl#896 for another potential case that does not use SpecialFunctions. |
No luck:
|
A better solution is what is discussed in JuliaPackaging/BinaryBuilder.jl#700 |
We may have to disable MKL multi-threading on mac - it is quite problematic: #104 (comment) Issues have been reported in 1.7 as well. |
Perhaps, since the future of Macs seems to be decoupled from Intel hardware, disabling multithreading in MKL on mac may not be such an issue going forward (correctness always comes before performance). But it does place a higher priority to get the Accelerate API to work with LBT. My 2c. |
The Accelerate API already works with LBT. The missing piece is LAPACK (since Apple ships a 10 year old LAPACK and we use some of the nice new capabilities like |
I have seen too many issues with MKL on mac - that I don't feel it is right to give people something that is highly likely to give the wrong answer. I'm going to make single threaded the default here and people can always change that through the API to enable threading. |
Based on the discussions in
JuliaLang/LinearAlgebra.jl#845
JuliaLang/LinearAlgebra.jl#896
It seems the simplest thing may be to not allow multi-threaded MKL on the mac. What would be the easiest way to achieve this?
The text was updated successfully, but these errors were encountered: