-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Possible threading bug with MKL on macOS using Julia 1.7.0 #896
Comments
This is still present in 1.7.1 and MKL. OpenBLAS works for any number of threads. |
is this our fault or mkl's |
This rings a bell. I remember @staticfloat saying this is a conflict between Intel's openmp and GCC's. Perhaps similar to or the same as #845 |
Out of curiosity, can you try on Linux and Windows? |
On Linux, the code runs for any number of threads and x1 and x2 follow the same impulse response. I don't have access to a Windows machine, so cannot test. |
After
And see if that works as expected? |
How about |
Does |
That is right. GNU does not work if you set it in MKL.jl as I found out too. SEQUENTIAL will set MKL BLAS threads to 1. |
We're now defaulting to single threaded MKL on mac because of too many issues. JuliaLinearAlgebra/MKL.jl#98 I'm closing because this is not a Julia bug. |
I encountered a possible MKL threading bug in Julia 1.7.0 on macOS but don't know if it is the same as the OpenBLAS threading issue (e.g. #890 ), so please close if this is a duplicate.
The following code is a simplified version of code that generates impulse response functions from a state-space model. It works with 1 BLAS thread but the matrix based iteration x2 explodes with any higher thread number, even though the relevant row of the matrix only has one non-zero entry of 0.9 and should give the same path as x1, which is essentially an AR1. On Linux, the code runs for any number of threads and x1 and x2 follow the same impulse response.
With 1 thread

With 2 or more threads (might look different due to random

LOMstate
matrix)My system:
I'm happy to provide more information.
The text was updated successfully, but these errors were encountered: