WSL: Anaconda's scipy.test() fails with "OMP: Error #100: Fatal system error detected

  • A brief description

SciPy is a python package for scientific computing. Normally it’s installed with Anaconda distribution, that also ships Intel’s MKL library (with LAPACK and BLAS routines).

  • Expected results

Executing scipy.test() from within python completes with the report on all errors and failures discovered.

  • Actual results (with terminal output if applicable)

scipy.test() doesn’t complete and terminates python with the following error:

OMP: Error #100: Fatal system error detected.
OMP: System error #22: Invalid argument
Aborted (core dumped)
  • Your Windows build number

Microsoft Windows [Version 10.0.14393]

  • Steps / commands required to reproduce the error

Run from terminal:

python -c 'import scipy; scipy.test()'
  • Strace of the failing command

https://gist.github.com/Evfro/2d0d83745a92d3f6e2f52ce3675a273d

The last thing before error there is the following line: sched_getaffinity(0, 4, 0x7fc7757a7e00) = -1 EINVAL (Invalid argument)

  • Required packages and commands to install

Install latest miniconda (Python 2.7):

wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda*.sh

Update apt-get (prevents some errors):

sudo apt-get update -qq

Install scipy, numpy and nose (for running tests):

conda install numpy scipy nose

This will additionally install MKL and libgfortran-3. Note: test doesn’t fail if nomkl versions of numpy and scipy are installed, however, MKL (especially its LAPACK and BLAS) is required for some other packages, so it’s not really an option.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 6
  • Comments: 19

Most upvoted comments

Have you tried setting KMP_AFFINITY=disabled? Does it really kills performance? I haven’t tested yet, would be interesting to see.

Sorry, my last comment was wrong. TTpy packages doesn’t fail at compile time, but it fails when some functions are called (for example, tt.tensor).

What I’ve found is that setting environmental variable KMP_AFFINITY=disabled resolves the problem. However, I have no idea what implications it might have and not sure whether it’s a proper workaround.

And it actually means, that the problem is not with MKL itself, but with OpenMP becoming faulty with any other value of KMP_AFFINITY (I tried all).