You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP 2018.0.2 runtime #10060
Linux Mint: 18.3 (Sylvia)
Python: 3.6.3
NumPy: 1.13.3
Cython 0.27.3
I am trying to build numpy and scipy wheels from source using the intel mkl compilers. Numpy compiles just fine, however when I run the test suite, the suite hangs on test_path_type_input within test_einsum.TestEinSumPath (or maybe the test after it? not sure because the last test name visible is this one; see screen cap)
Running the test suite for scipy results in the suite hanging on test_lapack within test_build.TestF77Mismatch
In both cases (numpy and scipy) the tests run and pass fine when run individually, so I'm not sure what else might be the cause.
Any help is greatly appreciated. See screen shot for images of the test suites when they're stuck is included.
@mattip Thank you for the suggestions. I tried compiling with gcc instead of mkl and the tests run fine now and pass, so it's obviously an intel mkl issue (once again, go figure). Closing. Thank you again!
It is an Intel OpenMP issue. A work-around is to either set KMP_INIT_AT_FORK=FALSE prior to launching the NumPy’s test suite, or to use the TBB threading layer, by setting MKL_THREADING_LAYER=TBB prior to launching python, i.e.
Yet another work-around is to use an older version of libiomp5 (get the shared object library for 2018 update 1 from Anaconda's cloud and overwrite what is installed with MKL).
Does this issue also come up in production environments?
We should at least document this somewhere, perhaps in doc/source/dev/development_environment.rst
@oleksandr-pavlyk can you suggest some wording that would maximize the likeleyhood that google will point people in the right direction?
@mattip Yes, hangs can occur in a production environment as well, and afflict problems that do not use MKL, but use Intel OpenMP. It's just that MKL uses Open MP as its default threading layer.
The new title of this issue is a little misleading, I'd say. The hang occurs in the compiler's run-time library, not in the compiler itself.
changed the title [-]intel openmp as used by intel mkl ocmpiler can hang at runtime[/-][+]intel openmp as used by intel mkl compiler can hang at runtime[/+]on Apr 17, 2018
@mattip Please change it to "NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime".
It is important to state that this problem is specific to Intel OpenMP 2018.0.2, and is already fixed in sources, therefore the fix will be available at the next release cadence.
changed the title [-]intel openmp as used by intel mkl compiler can hang at runtime[/-][+]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime[/+]on Apr 17, 2018
changed the title [-]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime[/-][+]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP 2018.0.2 runtime[/+]on Apr 17, 2018
Activity
mattip commentedon Nov 25, 2017
A couple of things to try, since this might be specific to your setup:
jmwoloso commentedon Nov 27, 2017
@mattip Thank you for the suggestions. I tried compiling with gcc instead of mkl and the tests run fine now and pass, so it's obviously an intel mkl issue (once again, go figure). Closing. Thank you again!
oleksandr-pavlyk commentedon Apr 16, 2018
It is an Intel OpenMP issue. A work-around is to either set
KMP_INIT_AT_FORK=FALSEprior to launching the NumPy’s test suite, or to use the TBB threading layer, by settingMKL_THREADING_LAYER=TBBprior to launching python, i.e.Yet another work-around is to use an older version of
libiomp5(get the shared object library for 2018 update 1 from Anaconda's cloud and overwrite what is installed with MKL).mattip commentedon Apr 16, 2018
Does this issue also come up in production environments?
We should at least document this somewhere, perhaps in doc/source/dev/development_environment.rst
@oleksandr-pavlyk can you suggest some wording that would maximize the likeleyhood that google will point people in the right direction?
[-]test_path_type_input hangs when running the test suite[/-][+]intel compiler hangs in openmp[/+]oleksandr-pavlyk commentedon Apr 16, 2018
@mattip Yes, hangs can occur in a production environment as well, and afflict problems that do not use MKL, but use Intel OpenMP. It's just that MKL uses Open MP as its default threading layer.
The new title of this issue is a little misleading, I'd say. The hang occurs in the compiler's run-time library, not in the compiler itself.
[-]intel compiler hangs in openmp[/-][+]intel openmp as used by intel mkl ocmpiler can hang at runtime[/+]mattip commentedon Apr 17, 2018
@oleksandr-pavlyk now is the titile closer to correct?
[-]intel openmp as used by intel mkl ocmpiler can hang at runtime[/-][+]intel openmp as used by intel mkl compiler can hang at runtime[/+]oleksandr-pavlyk commentedon Apr 17, 2018
@mattip Please change it to "NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime".
It is important to state that this problem is specific to Intel OpenMP 2018.0.2, and is already fixed in sources, therefore the fix will be available at the next release cadence.
[-]intel openmp as used by intel mkl compiler can hang at runtime[/-][+]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime[/+][-]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP runtime[/-][+]NumPy with Intel MKL as BLAS/LAPACK hangs in Intel OpenMP 2018.0.2 runtime[/+]mattip commentedon Apr 17, 2018
thanks for the clarification