diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-04-19 14:18:54 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-04-19 15:17:17 -0600 |
commit | 3a429d1034c480e574a10367c399728bfe5eb935 (patch) | |
tree | 8a9f404266a9547f3635f859b756bad16b70bf73 /numpy/distutils/intelccompiler.py | |
parent | c853b93c1823711b7a9bf3992c63ab55ac27fc38 (diff) | |
download | numpy-3a429d1034c480e574a10367c399728bfe5eb935.tar.gz |
MAINT: Update Intel compiler options.
The '-openmp' option was deprecated in Intel version 15 and removed
in version 18. The replacement is '-qopenmp'.
Closes #8941.
[skip ci]
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: |