Skip to content

Commit

Permalink
Apply ifort.patch from ticket numpy#1372 to allow Intel Fortran Compi…
Browse files Browse the repository at this point in the history
…ler 11.1 to be called by numpy.distutils.
  • Loading branch information
teoliphant committed Jan 24, 2010
1 parent 889d1e2 commit 786f775
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion numpy/distutils/fcompiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ def _environment_hook(self, name, hook_name):

_default_compilers = (
# sys.platform mappings
('win32', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')),
('win32', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95',
'intelvem', 'intelem')),
('cygwin.*', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')),
('linux.*', ('gnu','intel','lahey','pg','absoft','nag','vast','compaq',
'intele','intelem','gnu95','g95')),
Expand Down
18 changes: 15 additions & 3 deletions numpy/distutils/fcompiler/intel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

compilers = ['IntelFCompiler', 'IntelVisualFCompiler',
'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler',
'IntelEM64TFCompiler']
'IntelEM64VisualFCompiler', 'IntelEM64TFCompiler']

def intel_version_match(type):
# Match against the important stuff in the version string
Expand Down Expand Up @@ -165,9 +165,14 @@ class IntelVisualFCompiler(BaseIntelFCompiler):
compiler_type = 'intelv'
description = 'Intel Visual Fortran Compiler for 32-bit apps'
version_match = intel_version_match('32-bit|IA-32')

def update_executables(self):
f = dummy_fortran_file()
self.executables['version_cmd'] = ['<F77>', '/FI', '/c',
f + '.f', '/o', f + '.o']

ar_exe = 'lib.exe'
possible_executables = ['ifl']
possible_executables = ['ifort', 'ifl']

executables = {
'version_cmd' : None,
Expand Down Expand Up @@ -196,7 +201,7 @@ def get_flags_debug(self):
return ['/4Yb','/d2']

def get_flags_opt(self):
return ['/O3','/Qip','/Qipo','/Qipo_obj']
return ['/O3','/Qip']

def get_flags_arch(self):
opt = []
Expand Down Expand Up @@ -231,6 +236,13 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler):
'ranlib' : None
}

class IntelEM64VisualFCompiler(IntelVisualFCompiler):
compiler_type = 'intelvem'
description = 'Intel Visual Fortran Compiler for 64-bit apps'

version_match = simple_version_match(start='Intel\(R\).*?64,')


if __name__ == '__main__':
from distutils import log
log.set_verbosity(2)
Expand Down

0 comments on commit 786f775

Please sign in to comment.