From 3a429d1034c480e574a10367c399728bfe5eb935 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 19 Apr 2017 14:18:54 -0600 Subject: 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] --- numpy/distutils/intelccompiler.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'numpy/distutils/intelccompiler.py') 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: -- cgit v1.2.1