diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-08-03 14:42:37 -0400 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-08-03 14:42:37 -0400 |
commit | 00c1f7c27b6687eeb701a14d9a2210cfc4a68081 (patch) | |
tree | 5b5e8805d9cd285f1739efbc0125c47b63071d42 | |
parent | 0d294c15be17109d683eec01cf588dc8a5aea1d9 (diff) | |
parent | 4091facf55e03d356a5d7ce219ae0c0494920df3 (diff) | |
download | numpy-00c1f7c27b6687eeb701a14d9a2210cfc4a68081.tar.gz |
Merge pull request #6152 from charris/update-gh-6143
BLD: fixes for Intel compilers fixes to gh-6143
-rw-r--r-- | numpy/core/src/npymath/npy_math_private.h | 9 | ||||
-rw-r--r-- | numpy/core/src/private/npy_config.h | 9 | ||||
-rw-r--r-- | numpy/distutils/command/build_ext.py | 2 | ||||
-rw-r--r-- | numpy/distutils/command/config.py | 3 | ||||
-rw-r--r-- | numpy/distutils/intelccompiler.py | 12 |
5 files changed, 27 insertions, 8 deletions
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h index cf54d2bd9..6c44d0ba2 100644 --- a/numpy/core/src/npymath/npy_math_private.h +++ b/numpy/core/src/npymath/npy_math_private.h @@ -486,8 +486,12 @@ do { \ */ #ifdef NPY_USE_C99_COMPLEX -/* Microsoft C defines _MSC_VER */ -#if defined(_MSC_VER) && (_MSC_VER < 1900) +/* + * Microsoft C defines _MSC_VER + * Intel compiler does not use MSVC complex types, but defines _MSC_VER by + * default. + */ +#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(__INTEL_COMPILER) typedef union { npy_cdouble npy_z; _Dcomplex c99_z; @@ -536,4 +540,5 @@ typedef union { } __npy_clongdouble_to_c99_cast; #endif /* !NPY_USE_C99_COMPLEX */ + #endif /* !_NPY_MATH_PRIVATE_H_ */ diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h index 3b369f2e4..fa20eb4f3 100644 --- a/numpy/core/src/private/npy_config.h +++ b/numpy/core/src/private/npy_config.h @@ -61,6 +61,15 @@ #endif + +/* Intel C for Windows uses POW for 64 bits longdouble*/ +#if defined(_MSC_VER) && defined(__INTEL_COMPILER) +#if defined(HAVE_POWL) && (NPY_SIZEOF_LONGDOUBLE == 8) +#undef HAVE_POWL +#endif +#endif /* defined(_MSC_VER) && defined(__INTEL_COMPILER) */ + + /* Disable broken gnu trig functions on linux */ #if defined(__linux__) && defined(__GNUC__) diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py index d95faf5e1..0fa52a281 100644 --- a/numpy/distutils/command/build_ext.py +++ b/numpy/distutils/command/build_ext.py @@ -420,7 +420,7 @@ class build_ext (old_build_ext): linker = self.compiler.link_shared_object # Always use system linker when using MSVC compiler. - if self.compiler.compiler_type=='msvc': + if self.compiler.compiler_type in ('msvc', 'intelw', 'intelemw'): # expand libraries with fcompiler libraries as we are # not using fcompiler linker self._libs_with_msvc_and_fortran(fcompiler, libraries, library_dirs) diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py index 47dc17df3..4f20fc0de 100644 --- a/numpy/distutils/command/config.py +++ b/numpy/distutils/command/config.py @@ -39,7 +39,8 @@ class config(old_config): old_config._check_compiler(self) from numpy.distutils.fcompiler import FCompiler, new_fcompiler - if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc': + if sys.platform == 'win32' and (self.compiler.compiler_type in + ('msvc', 'intelw', 'intelemw')): # XXX: hack to circumvent a python 2.6 bug with msvc9compiler: # initialize call query_vcvarsall, which throws an IOError, and # causes an error along the way without much information. We try to diff --git a/numpy/distutils/intelccompiler.py b/numpy/distutils/intelccompiler.py index aed652ee6..3f062f33b 100644 --- a/numpy/distutils/intelccompiler.py +++ b/numpy/distutils/intelccompiler.py @@ -2,7 +2,7 @@ from __future__ import division, absolute_import, print_function from distutils.unixccompiler import UnixCCompiler from numpy.distutils.exec_command import find_executable -from numpy.distutils.msvc9compiler import MSVCCompiler +from distutils.msvc9compiler import MSVCCompiler from numpy.distutils.ccompiler import simple_version_match @@ -19,6 +19,7 @@ class IntelCCompiler(UnixCCompiler): self.set_executables(compiler=compiler, compiler_so=compiler, compiler_cxx=compiler, + archiver='xiar' + ' cru', linker_exe=compiler, linker_so=compiler + ' -shared') @@ -40,6 +41,7 @@ class IntelEM64TCCompiler(UnixCCompiler): compiler_type = 'intelem' cc_exe = 'icc -m64 -fPIC' cc_args = "-fPIC" + def __init__(self, verbose=0, dry_run=0, force=0): UnixCCompiler.__init__(self, verbose, dry_run, force) self.cc_exe = 'icc -m64 -fPIC' @@ -47,6 +49,7 @@ class IntelEM64TCCompiler(UnixCCompiler): self.set_executables(compiler=compiler, compiler_so=compiler, compiler_cxx=compiler, + archiver='xiar' + ' cru', linker_exe=compiler, linker_so=compiler + ' -shared') @@ -65,10 +68,11 @@ class IntelCCompilerW(MSVCCompiler): def initialize(self, plat_name=None): MSVCCompiler.initialize(self, plat_name) self.cc = self.find_exe("icl.exe") + self.lib = self.find_exe("xilib") self.linker = self.find_exe("xilink") - self.compile_options = ['/nologo', '/O3', '/MD', '/W3'] - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/Z7', - '/D_DEBUG'] + self.compile_options = ['/nologo', '/O3', '/MD', '/W3', '/Qstd=c99'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', + '/Qstd=c99', '/Z7', '/D_DEBUG'] class IntelEM64TCCompilerW(IntelCCompilerW): |