[SciPy-user] F2PY stopped working with new scipy

Neilen Marais nmarais at sun.ac.za
Thu Apr 20 12:36:15 CDT 2006


Hi

On Mon, 10 Apr 2006 11:45:32 -0500, Robert Kern wrote:

> Neilen Marais wrote:
>> Hi Robert
>> 
>> On Fri, 07 Apr 2006 10:50:47 -0500, Robert Kern wrote:
>> 

> Well, according to the error message, it was looking for efort and efc for some
> reason. Looking at the code (numpy/distutils/fcompiler/intel.py), it appears
> that the IntelItaniamFCompiler class looks for efort and efc; however, that
> compiler is supposed to be specified by intele, not intel.

It seems to be confused by the fact that I'm using the EM64T version of the
intel compilers.  The version string printed by my compiler is:

Intel(R) Fortran Compiler for Intel(R) EM64T-based applications, Version 9.0
Build 20050430 Package ID: l_fc_p_9.0.021

>> 
>> How can I obtain this test string? It did work with the older version
>> of scipy/f2py, so this may be some sort of regression.
> 
> The regexes are the version_pattern class attributes in the file intel.py given
> above.

I updated this regex, and also commented out some options that aren't valid for
the EM64T compiler. A diff on intel.py from today's svn reveals:

--- intel.py~   2006-04-12 18:34:30.000000000 +0200
+++ intel.py    2006-04-20 12:39:01.000000000 +0200
@@ -10,7 +10,7 @@
 class IntelFCompiler(FCompiler):

     compiler_type = 'intel'
-    version_pattern = r'Intel\(R\) Fortran Compiler for 32-bit '\
+    version_pattern = r'Intel\(R\) Fortran Compiler for .* '\
                       'applications, Version (?P<version>[^\s*]*)'

     for fc_exe in map(find_executable,['ifort','ifc']):
@@ -56,12 +56,12 @@
             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 cpu.has_sse2():
-            opt.append('-arch SSE2')
-        elif cpu.has_sse():
-            opt.append('-arch SSE')
+#         if cpu.has_mmx() and not cpu.is_Xeon():
+#             opt.append('-xM')
+#         if cpu.has_sse2():
+#             opt.append('-arch SSE2')
+#         elif cpu.has_sse():
+#             opt.append('-arch SSE')
         return opt

     def get_flags_linker_so(self):

This gets the compiler to run, and builds the extension module. The
resulting module doesn't quite work right though. I'll make a separate
post about that though.

Of course these changes may break things for 32-bit platforms.

Cheers
Neilen

-- 
you know its kind of tragic 
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)



More information about the SciPy-user mailing list