[Numpy-discussion] Compiling numpy using icc gets missing library error
Sun Mar 27 14:21:09 CDT 2011
Thanks for the thorough description of getting everything to work.
On Sat, Mar 26, 2011 at 12:14 AM, Hoyt Koepke
> 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:
> -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
> 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
More information about the NumPy-Discussion