Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce9fea2

Browse files
author
rgommers
committed
BUG: fix 64-bit Intel Fortran compiler detection. Closes #1448.
1 parent f432234 commit ce9fea2

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

numpy/distutils/fcompiler/intel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ class IntelItaniumFCompiler(IntelFCompiler):
136136
class IntelEM64TFCompiler(IntelFCompiler):
137137
compiler_type = 'intelem'
138138
compiler_aliases = ()
139-
description = 'Intel Fortran Compiler for EM64T-based apps'
139+
description = 'Intel Fortran Compiler for 64-bit apps'
140140

141-
version_match = intel_version_match('EM64T-based|Intel\\(R\\) 64')
141+
version_match = intel_version_match('EM64T-based|Intel\\(R\\) 64|64|IA-64|64-bit')
142142

143143
possible_executables = ['ifort', 'efort', 'efc']
144144

@@ -165,9 +165,9 @@ class IntelVisualFCompiler(BaseIntelFCompiler):
165165
compiler_type = 'intelv'
166166
description = 'Intel Visual Fortran Compiler for 32-bit apps'
167167
version_match = intel_version_match('32-bit|IA-32')
168-
168+
169169
def update_executables(self):
170-
f = dummy_fortran_file()
170+
f = dummy_fortran_file()
171171
self.executables['version_cmd'] = ['<F77>', '/FI', '/c',
172172
f + '.f', '/o', f + '.o']
173173

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from numpy.testing import *
2+
3+
import numpy.distutils.fcompiler
4+
5+
intel_32bit_version_strings = [
6+
("Intel(R) Fortran Intel(R) 32-bit Compiler Professional for applications"\
7+
"running on Intel(R) 32, Version 11.1", '11.1'),
8+
]
9+
10+
intel_64bit_version_strings = [
11+
("Intel(R) Fortran IA-64 Compiler Professional for applications"\
12+
"running on IA-64, Version 11.0", '11.0'),
13+
("Intel(R) Fortran Intel(R) 64 Compiler Professional for applications"\
14+
"running on Intel(R) 64, Version 11.1", '11.1')
15+
]
16+
17+
class TestIntelFCompilerVersions(TestCase):
18+
def test_32bit_version(self):
19+
fc = numpy.distutils.fcompiler.new_fcompiler(compiler='intel')
20+
for vs, version in intel_32bit_version_strings:
21+
v = fc.version_match(vs)
22+
assert_(v == version)
23+
24+
25+
class TestIntelEM64TFCompilerVersions(TestCase):
26+
def test_64bit_version(self):
27+
fc = numpy.distutils.fcompiler.new_fcompiler(compiler='intelem')
28+
for vs, version in intel_64bit_version_strings:
29+
v = fc.version_match(vs)
30+
assert_(v == version)
31+
32+
33+
if __name__ == '__main__':
34+
run_module_suite()

0 commit comments

Comments
 (0)