- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not sure if this is the correct forum for this, so bear with me!
I am using MKL (2019.1) installed via Miniconda (4.6.8) on macOS (10.14.2). The open source code I develop (gprMax - https://github.com/gprMax/gprMax) is written in Python, uses NumPy, and has modules that are Cythonized and use OpenMP. The conda environment that I use is relatively simple - https://github.com/gprMax/gprMax/blob/master/conda_env.yml On Linux and Windows the simulation software behaves normally, however, on macOS the simulations become unstable. This has only started happening recently when I updated the conda environment. Interestingly, if I set the simulation to use a single thread on macOS it behaves normally and is stable. Also if I use OpenBLAS instead of MKL, by specifying blas=*=openblas in my conda environment file, I have no problems with stability and using multiple threads.
I am interested to know if anyone else has experience similar problems, and also how I might further debug the issue.
Kind regards,
Craig
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So a workaround seems to be setting MKL_THREADING_LAYER=sequential before launching Python. Setting it within the Python application does not work, as I assume it is only being applied to child processes, and whatever module is using MKL has already been loaded.
Craig

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page