Workaround for MKL threading bug on macOS.

这个提交包含在:
Craig Warren
2019-07-05 11:44:25 +01:00
父节点 6602a7bc81
当前提交 153b0dd532
共有 3 个文件被更改,包括 7 次插入23 次删除

查看文件

@@ -25,6 +25,12 @@ import sys
from enum import Enum
# There is a bug with threading and MKL on macOS
# (https://github.com/gprMax/gprMax/issues/195) . Setting the MKL threading
# layer to sequential solves it, but must be done before numpy is imported.
if sys.platform == 'darwin':
os.environ["MKL_THREADING_LAYER"] = 'sequential'
import h5py
import numpy as np