diff options
Diffstat (limited to 'numpy/distutils/intelccompiler.py')
-rw-r--r-- | numpy/distutils/intelccompiler.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/distutils/intelccompiler.py b/numpy/distutils/intelccompiler.py index 902f19b67..3b7756b59 100644 --- a/numpy/distutils/intelccompiler.py +++ b/numpy/distutils/intelccompiler.py @@ -17,9 +17,13 @@ class IntelCCompiler(UnixCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): UnixCCompiler.__init__(self, verbose, dry_run, force) + + v = self.get_version() + mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp' self.cc_exe = ('icc -fPIC -fp-model strict -O3 ' - '-fomit-frame-pointer -openmp') + '-fomit-frame-pointer -{}').format(mpopt) compiler = self.cc_exe + if platform.system() == 'Darwin': shared_flag = '-Wl,-undefined,dynamic_lookup' else: @@ -53,9 +57,13 @@ class IntelEM64TCCompiler(UnixCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): UnixCCompiler.__init__(self, verbose, dry_run, force) + + v = self.get_version() + mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp' self.cc_exe = ('icc -m64 -fPIC -fp-model strict -O3 ' - '-fomit-frame-pointer -openmp') + '-fomit-frame-pointer -{}').format(mpopt) compiler = self.cc_exe + if platform.system() == 'Darwin': shared_flag = '-Wl,-undefined,dynamic_lookup' else: |