[Numpy-discussion] Compiling numpy using icc gets missing library error

Ralf Gommers ralf.gommers at googlemail.com
Sun Mar 27 15:21:09 EDT 2011


Hi Hoyt,

Thanks for the thorough description of getting everything to work.

On Sat, Mar 26, 2011 at 12:14 AM, Hoyt Koepke
<hoytak at stat.washington.edu> wrote:
> Okay, even better news.  After a little bit of probing around, it
> turns out that some of the errors, namely the one in the interpolator,
> were due to intel's handling of floating point values at higher
> optimization levels.  Thus the two rather important flags, if you wish
> to avoid difficult-to-explain segfaults, are
>
> -fp-model strict  ( disables unsafe fp optimizations)
> -fno-alias (C & C++, not fortran)
>
> Now here's a summary of the other errors:
>
> -ipo -- okay for linker / c++, but not elsewhere.  For C, it causes
> the long_double_representation() function in setup_common() to fail
> (I'll note this on the corresponding ticket), and causes f2py to fail
> to generate correct wrappers.

Would it be enough to put a comment in the intelccompiler.py code not
to use the -ipo flag, or do you think there's something to fix here?
Doesn't seem to be a new problem by the way:
http://cens.ioc.ee/pipermail/f2py-users/2006-January/001229.html

>
> -O3 -- okay for C++ / fortran, but not C.  For C, it causes einsum to hang.

-O3 is the default optimization level, so this is a bug I guess.
There's also another report in #1378 that -O3 doesn't work with numpy
1.4.0 (which does not have einsum). Should it be lowered to -O2 by
default?

> Thus the highest optimization levels I could find in which everything
> compiled and ran were:
>
> Fortran: -static -DMKL_LP64 -mkl -xHOST -O3 -fPIC  -fp-model strict
> C:     -static -DMKL_LP64 -mkl -xHOST -O2 -fno-alias -fPIC -fp-model strict
> C++: -static -DMKL_LP64 -mkl -xHOST -O3 -fno-alias -fPIC -fp-model strict
> Linker: -DMKL_LP64 -mkl -xHOST -O2 -fno-alias -fPIC -fp-model strict
> -openmp -lpthread

I'm not sure which of those flags would be appropriate as a default in
distutils, perhaps only fp-model-strict? If you could help put
together a patch for numpy.distutils, that would be very helpful I
think. The rest of your description could be put at
http://scipy.org/Installing_SciPy/Linux.

Ralf



More information about the NumPy-Discussion mailing list