[Numpy-discussion] Need compilations with compilers other than gcc

Pearu Peterson pearu at scipy.org
Tue Feb 7 07:00:05 CST 2006


On Tue, 7 Feb 2006, Arnd Baecker wrote:

> Alright, we might need the asbestos suite thing:
>
> Something ahead: I normally used
>  python numpy/distutils/system_info.py lapack_opt
> to figure out which library numpy is going to use.
> With current svn I get the folloowing error:
>
> Traceback (most recent call last):
>  File "numpy/distutils/system_info.py", line 111, in ?
>    from exec_command import find_executable, exec_command, get_pythonexe
>  File
> "/work/home/baecker/INSTALL_PYTHON5_icc/CompileDir/numpy/numpy/distutils/exec_command.py",
> line 56, in ?
>    from numpy.distutils.misc_util import is_sequence
> ImportError: No module named numpy.distutils.misc_util

This occurs probably because numpy is not installed.

> Concerning icc compilation I used:
>
>  export FC_VENDOR=Intel

This has no effect anymore. Use --fcompiler=intel instead.

>  export F77=ifort
>  export CC=icc
>  export CXX=icc
>  python setup.py config --compiler=intel   install --prefix=$DESTnumpyDIR
> | tee ../build_log_numpy_${nr}.txt

There is no intel compiler. Allowed C compilers are 
unix,msvc,cygwin,mingw32,bcpp,mwerks,emx. Distutils should have given an 
exception when using --compiler=intel.

If you are using IFC compiled blas/lapack libraries then --fcompiler=intel 
might produce importable extension modules (because then ifc is used for 
linking that knows about which intel libraries need be linked to a shared 
library).

> Trying to test the resulting numpy gives:
>
> In [1]: import numpy
> import core -> failed:
> /home/baecker/python2/scipy_icc5_lintst_n_N0/lib/python2.4/site-packages/numpy/core/multiarray.so:
> undefined symbol: ?1__serial_memmove

<snip>

> I already reported this a month ago with a bit more information
> on a possible solution
> http://aspn.activestate.com/ASPN/Mail/Message/scipy-dev/2983903

When Python is compiled with a different compiler than numpy (or any 
extension module) is going to be installed then proper libraries must be 
specified manually. Which libraries and flags are needed exactly, this is 
described in compilers manual.

So, a recommended fix would be to build Python with icc and as a 
result correct libraries will be used for building 3rd party extension 
modules. Otherwise one has to read compilers manual, sections like 
about gcc-compatibility and  linking might be useful. See also
  http://www.scipy.org/Wiki/FAQ#head-8371c35ef08b877875217aaac5489fc747b4aceb

Pearu




More information about the Numpy-discussion mailing list