Skip to content

Commit ca9b6d8

Browse files
committed
python_version OpenMP conflict robust
1 parent 9bfc4f8 commit ca9b6d8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

+stdlib/python_version.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@
3636
% glitchy Python load can error on shell.version_info
3737
% if pyenv() hasn't ever been configured, may get uncatchable error
3838
% bad lexical cast: source type value could not be interpreted as target
39+
old = getenv('KMP_DUPLICATE_LIB_OK');
40+
setenv('KMP_DUPLICATE_LIB_OK', 'TRUE')
3941
try
4042
v = pvt_python_version();
4143
catch e
4244
msg = e.message;
4345
end
46+
setenv('KMP_DUPLICATE_LIB_OK', old)
4447

4548
% cache the result - even if empty -- because the check takes up to 1000 ms say on HPC
4649
stdlib_py_version = v;

0 commit comments

Comments
 (0)