[Numpy-svn] r3859 - trunk/numpy/distutils/fcompiler

numpy-svn@scip... numpy-svn@scip...
Tue Jun 5 05:41:49 CDT 2007


Author: pearu
Date: 2007-06-05 05:41:43 -0500 (Tue, 05 Jun 2007)
New Revision: 3859

Modified:
   trunk/numpy/distutils/fcompiler/intel.py
Log:
Updated intel compiler arch flags -- intel compiler users should recheck these options.

Modified: trunk/numpy/distutils/fcompiler/intel.py
===================================================================
--- trunk/numpy/distutils/fcompiler/intel.py	2007-06-03 04:26:22 UTC (rev 3858)
+++ trunk/numpy/distutils/fcompiler/intel.py	2007-06-05 10:41:43 UTC (rev 3859)
@@ -52,6 +52,7 @@
         return ['-O3','-unroll']
 
     def get_flags_arch(self):
+        v = self.get_version()
         opt = []
         if cpu.has_fdiv_bug():
             opt.append('-fdiv_check')
@@ -65,8 +66,25 @@
             opt.append('-tpp5')
         elif cpu.is_PentiumIV() or cpu.is_Xeon():
             opt.extend(['-tpp7','-xW'])
-        if cpu.has_mmx() and not cpu.is_Xeon():
-            opt.append('-xM')
+        if v and v <= '7.1':
+            if cpu.has_mmx() and (cpu.is_PentiumII() or cpu.is_PentiumIII()):
+                opt.append('-xM')
+        elif v and v >= '8.0':
+            if cpu.is_PentiumIII():
+                opt.append('-xK')
+                if cpu.has_sse3():
+                    opt.extend(['-xP'])
+            elif cpu.is_PentiumIV():
+                opt.append('-xW')
+                if cpu.has_sse2():
+                    opt.append('-xN')
+            elif cpu.is_PentiumM():
+                opt.extend(['-xB'])
+            if (cpu.is_Xeon() or cpu.is_Core2() or cpu.is_Core2Extreme()) and cpu.getNCPUs()==2:
+                opt.extend(['-xT'])
+            if cpu.has_sse3() and (cpu.is_PentiumIV() or cpu.is_CoreDuo() or cpu.is_CoreSolo()):
+                opt.extend(['-xP'])
+
         if cpu.has_sse2():
             opt.append('-arch SSE2')
         elif cpu.has_sse():



More information about the Numpy-svn mailing list