[SciPy-user] numpy and fcompiler

Eric Zollars zollars at caltech.edu
Mon Jan 16 12:32:15 CST 2006


> Change the line
> 
>    compiler = new_fcompiler(compiler='ibm')
> 
> to
> 
>    compiler = IbmFCompiler()
> 
> Also, what are the values
> 
>    os.name
>    sys.platform
> 
> in your system? Currently ibm compiler is enabled only for aix platforms, 
> see _default_compilers dictionary in 
> numpy/distutils/fcompiler/__init__.py.
> 
> Pearu

os.name = posix
sys.platform = linux2

I added ibm to _default_compilers for linux.* in __init__.py.  But I was 
still getting 'None' for compiler.get_version().  In the def 
get_version() in ibm.py there is this code:

l = [d for d in l if os.path.isfile(os.path.join(xlf_dir,d,'xlf.cfg'))]
if not l:
     from distutils.version import LooseVersion
     self.version = version = LooseVersion(l[0])

However 'l' is defined in this case ['8.1'], so I added the else statement

else:
     version = l[0]

Now the ibm compiler is detected correctly.

However the build is failing with cannot find 'bundle1.o'.  This appears 
to be added to the xlf.cfg in ibm.py in the get_flags_linker_so() 
function.  I am not sure what this does.  Let me know if this is AIX 
specific.  Also, in the same function '-bshared' is added as an option 
for the linker.  As far as I can tell there is no such option for the 
8.1 (or 9.1) versions of the compiler for Linux.

Continuing..
Eric



More information about the SciPy-user mailing list