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

Arnd Baecker arnd.baecker at web.de
Tue Feb 7 07:27:17 CST 2006


On Tue, 7 Feb 2006, Pearu Peterson wrote:

> 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.

Maybe I am wrong, but I thought that I could run the above
command before any installation to see which
libraries will be used.
My installation notes on this give me the feeling that
this used to work...

> > Concerning icc compilation I used:
> >
> >  export FC_VENDOR=Intel
>
> This has no effect anymore. Use --fcompiler=intel instead.

OK - I have to confess that I am really confused about
which options might work and which not.
Is there a document which describes this?


> >  export F77=ifort
> >  export CC=icc
> >  export CXX=icc

But these are still needed?

> >  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).

For this test I haven't used any blas/lapack. But it is good to know.

> > 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.

This would also mean that all dependent packages will have
to be installed again, right?
I am sorry but then I won't be able to help with icc at the moment
as I am completely swamped with other stuff...

> 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

I thought that supplying ``--libraries="irc"``
might cure the problem, but
(quoting from
http://aspn.activestate.com/ASPN/Mail/Message/scipy-dev/2983903
)
"""
However, in the build log I only found -lirc for
the config_tests but nowhere else.
What should I do instead of the above?
"""

Best, Arnd





More information about the Numpy-discussion mailing list