diff options
author | Dmitry Zagorny <dmitry.zagorny@intel.com> | 2015-09-14 13:03:38 -0500 |
---|---|---|
committer | Dmitry Zagorny <dmitry.zagorny@intel.com> | 2015-09-15 14:34:43 +0300 |
commit | 72753bbdf8736a13f1cb60c25cf8683608f46e29 (patch) | |
tree | 5a0f17e10c88a02e4b9d6438ad88a447172f5174 /numpy/distutils/fcompiler/intel.py | |
parent | 44c9b2aba51f73e50c17b7f990a054d0d4804269 (diff) | |
download | numpy-72753bbdf8736a13f1cb60c25cf8683608f46e29.tar.gz |
MSVCCompiler overwrite 'lib' and 'include' environment variables. This
behavior affect at least python 3.5 and SciPy build and build failed.
During initialization <python>.distutils.MSVCCompiler replace Intel
environment('include' and 'lib' paths). This fix decorate 'initialize'
function in MSVCCompiler and extend 'lib' and 'include' environment
variables. Changed compilation keys: generate optimized code
specialized for Intel processors with SSE4.2 support.
Diffstat (limited to 'numpy/distutils/fcompiler/intel.py')
-rw-r--r-- | numpy/distutils/fcompiler/intel.py | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/numpy/distutils/fcompiler/intel.py b/numpy/distutils/fcompiler/intel.py index ef0bcc30b..28624918d 100644 --- a/numpy/distutils/fcompiler/intel.py +++ b/numpy/distutils/fcompiler/intel.py @@ -10,6 +10,7 @@ compilers = ['IntelFCompiler', 'IntelVisualFCompiler', 'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler', 'IntelEM64VisualFCompiler', 'IntelEM64TFCompiler'] + def intel_version_match(type): # Match against the important stuff in the version string return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,)) @@ -45,17 +46,16 @@ class IntelFCompiler(BaseIntelFCompiler): } pic_flags = ['-fPIC'] - module_dir_switch = '-module ' # Don't remove ending space! + module_dir_switch = '-module ' # Don't remove ending space! module_include_switch = '-I' def get_flags_free(self): - return ["-FR"] + return ['-FR'] def get_flags(self): return ['-fPIC'] def get_flags_opt(self): - #return ['-i8 -xhost -openmp -fp-model strict'] return ['-xhost -openmp -fp-model strict'] def get_flags_arch(self): @@ -120,11 +120,10 @@ class IntelEM64TFCompiler(IntelFCompiler): return ['-fPIC'] def get_flags_opt(self): - #return ['-i8 -xhost -openmp -fp-model strict'] - return ['-xhost -openmp -fp-model strict'] + return ['-openmp -fp-model strict'] def get_flags_arch(self): - return [] + return ['-xSSE4.2'] # Is there no difference in the version string between the above compilers # and the Visual compilers? @@ -145,18 +144,18 @@ class IntelVisualFCompiler(BaseIntelFCompiler): executables = { 'version_cmd' : None, - 'compiler_f77' : [None, "-FI", "-w90", "-w95"], - 'compiler_fix' : [None, "-FI", "-4L72", "-w"], + 'compiler_f77' : [None], + 'compiler_fix' : [None], 'compiler_f90' : [None], - 'linker_so' : ['<F90>', "-shared"], + 'linker_so' : [None], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } compile_switch = '/c ' - object_switch = '/Fo' #No space after /Fo! - library_switch = '/OUT:' #No space after /OUT:! - module_dir_switch = '/module:' #No space after /module: + object_switch = '/Fo' # No space after /Fo! + library_switch = '/OUT:' # No space after /OUT:! + module_dir_switch = '/module:' # No space after /module: module_include_switch = '/I' def get_flags(self): @@ -164,7 +163,7 @@ class IntelVisualFCompiler(BaseIntelFCompiler): return opt def get_flags_free(self): - return ["-FR"] + return [] def get_flags_debug(self): return ['/4Yb', '/d2'] @@ -185,7 +184,7 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler): version_match = intel_version_match('Itanium') - possible_executables = ['efl'] # XXX this is a wild guess + possible_executables = ['efl'] # XXX this is a wild guess ar_exe = IntelVisualFCompiler.ar_exe executables = { @@ -206,7 +205,7 @@ class IntelEM64VisualFCompiler(IntelVisualFCompiler): version_match = simple_version_match(start='Intel\(R\).*?64,') def get_flags_arch(self): - return ["/arch:SSE2"] + return ['/QxSSE4.2'] if __name__ == '__main__': |