[SciPy-dev] Building newcore with the intel compilers on Itanium2...

Fernando Perez Fernando.Perez at colorado.edu
Thu Nov 3 00:23:33 EST 2005


Hi all,

Andrew Docherty (who recently posted) and I have been pounding on the problem 
of getting newcore to build/link correctly with the intel compilers on an 
Itanium2 architecture.

While things are _almost_ working, the link steps are not being done 
correctly, and this leads to failed imports (unresolved symbols).

Once we figure it all out, I'll write up and commit some notes and probably 
apply a few small patches here and there, but right now I'm needing a bit of help.

The gist of the problem seems to be to convince distutils to link with icc, 
and  NOT with gcc.  I'm building with an environment where

CC=icc

and with the following build command:

python setup.py config_fc --fcompiler=intele build

While this picks up the correct fortran Itanium2 compiler (ifort), and the C 
sources are actually also compiled with icc, the actual link steps are still 
being done with gcc, for some reason.  From the build log:

gcc -pthread -shared 
build/temp.linux-ia64-2.3/scipy/base/src/multiarraymodule.o -o build\
/lib.linux-ia64-2.3/scipy/base/multiarray.so

While the build completes successfully, this leads to an import error:

phillips[~]> python -c 'import scipy'
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File 
"/home/phillips/student/fperez/usr/local/lib/python2.3/site-packages/scipy/__init__.py", 
line 30, in ?
     from scipy.base import *
   File 
"/home/phillips/student/fperez/usr/local/lib/python2.3/site-packages/scipy/base/__init__.py", 
line 5, in ?
     import multiarray
ImportError: 
/home/phillips/student/fperez/usr/local/lib/python2.3/site-packages/scipy/base/multiarray.so: 
undefined symbol: ?1__serial_memmove

That undefined symbol is part of the intel libraries, and it would get picked 
up if the link step was done with icc, I think (or at least one could ask it 
to link against the needed library).

Or is it in fact correct to link using gcc (since that's what python itself 
was built with) and should we just try to get gcc to pick up the intel 
libraries in the final link step?  I'll try to get that to work as well, in 
teh meantime...

Any help would be much appreciated at this point.

Cheers,

f




More information about the SciPy-Dev mailing list