Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Guang
x-cigale
Commits
51c93b5e
Commit
51c93b5e
authored
Aug 13, 2019
by
Médéric Boquien
Browse files
Disable threading for OpenMP too.
parent
23c937d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/analysis_modules/utils.py
View file @
51c93b5e
...
...
@@ -27,6 +27,15 @@ def nothreading():
None
"""
for
basename
in
[
'iomp'
,
'gomp'
,
'omp'
,
'vcomp'
]:
try
:
# Disable threading for OpenMP
name
=
find_library
(
basename
)
if
name
:
lib
=
ctypes
.
cdll
.
LoadLibrary
(
name
)
lib
.
omp_set_num_threads
(
ctypes
.
c_int
(
1
))
except
:
continue
try
:
# Disable threading for MKL
name
=
find_library
(
'mkl_rt'
)
if
name
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment