Add workaround for bug with Windows Subsystem for Linux, by setting KMP_AFFINITY to disabled when detected.

这个提交包含在:
Craig Warren
2017-02-28 13:23:13 +00:00
父节点 7716d02a59
当前提交 c3a3a455f1

查看文件

@@ -71,6 +71,10 @@ def process_singlecmds(singlecmds, G):
os.environ['OMP_PROC_BIND'] = 'spread' # Bind threads to physical cores
# os.environ['OMP_DISPLAY_ENV'] = 'TRUE' # Prints OMP version and environment variables (useful for debug)
# Catch bug with Windows Subsystem for Linux (https://github.com/gprMax/gprMax/issues/95)
if 'Microsoft' in hostinfo['osversion']:
os.environ['KMP_AFFINITY'] = 'disabled'
if singlecmds[cmd] != 'None':
tmp = tuple(int(x) for x in singlecmds[cmd].split())
if len(tmp) != 1: