MCPcopy Create free account
hub / github.com/numpy/numpy / IntelFCompiler

Class IntelFCompiler

numpy/distutils/fcompiler/intel.py:30–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30class IntelFCompiler(BaseIntelFCompiler):
31
32 compiler_type = 'intel'
33 compiler_aliases = ('ifort',)
34 description = 'Intel Fortran Compiler for 32-bit apps'
35 version_match = intel_version_match('32-bit|IA-32')
36
37 possible_executables = ['ifort', 'ifc']
38
39 executables = {
40 'version_cmd' : None, # set by update_executables
41 'compiler_f77' : [None, "-72", "-w90", "-w95"],
42 'compiler_f90' : [None],
43 'compiler_fix' : [None, "-FI"],
44 'linker_so' : ["<F90>", "-shared"],
45 'archiver' : ["ar", "-cr"],
46 'ranlib' : ["ranlib"]
47 }
48
49 pic_flags = ['-fPIC']
50 module_dir_switch = '-module ' # Don't remove ending space!
51 module_include_switch = '-I'
52
53 def get_flags_free(self):
54 return ['-FR']
55
56 def get_flags(self):
57 return ['-fPIC']
58
59 def get_flags_opt(self): # Scipy test failures with -O2
60 v = self.get_version()
61 mpopt = 'openmp' if v and v < '15' else 'qopenmp'
62 return ['-fp-model', 'strict', '-O1',
63 '-assume', 'minus0', '-{}'.format(mpopt)]
64
65 def get_flags_arch(self):
66 return []
67
68 def get_flags_linker_so(self):
69 opt = FCompiler.get_flags_linker_so(self)
70 v = self.get_version()
71 if v and v >= '8.0':
72 opt.append('-nofor_main')
73 if sys.platform == 'darwin':
74 # Here, it's -dynamiclib
75 try:
76 idx = opt.index('-shared')
77 opt.remove('-shared')
78 except ValueError:
79 idx = 0
80 opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup']
81 return opt
82
83
84class IntelItaniumFCompiler(IntelFCompiler):

Callers

nothing calls this directly

Calls 1

intel_version_matchFunction · 0.85

Tested by

no test coverage detected