Compiling Numpy with Intel MKL9.1 on SUSE10.2

I changed the cc_exe line in numpy-1.0.3/numpy/distutils/intelccompiler.py to: cc_exe = 'icc -msse3 -xP -fast' #Core 2 Duo
From the numpy-1.03 directory executed:
python setup.py config --compiler=intel build_clib --compiler=intel build_ext --compiler=intel install --prefix=/usr/local/ [much snipped] compiling C sources C compiler: icc -msse3 -xP -fast creating build/temp.linux-i686-2.5/numpy/fft compile options: '-Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 +-c' icc: numpy/fft/fftpack.c icc: numpy/fft/fftpack_litemodule.c creating build/lib.linux-i686-2.5/numpy/fft icc -msse3 -xP -fast -shared build/temp.linux-i686-2.5/numpy/fft/fftpack_litemodule.o build/temp.linux-i686-2.5/numpy/fft/fftpack.o +-L/usr/lib/python2.5/config -lpython2.5 -o build/lib.linux-i686-2.5/numpy/fft/fftpack_lite.so ipo: remark #11000: performing multi-file optimizations ipo: remark #11005: generating object file /tmp/ipo_iccdXKswc.o numpy/fft/fftpack.c(1203): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(293): (col. 9) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(336): (col. 7) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(350): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1313): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1440): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(813): (col. 7) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(875): (col. 7) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(912): (col. 7) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(917): (col. 9) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1447): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(986): (col. 9) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1072): (col. 7) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1110): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1496): (col. 5) remark: LOOP WAS VECTORIZED. numpy/fft/fftpack.c(1433): (col. 5) remark: LOOP WAS VECTORIZED. building 'numpy.linalg.lapack_lite' extension compiling C sources building 'numpy.linalg.lapack_lite' extension compiling C sources C compiler: icc -msse3 -xP -fast creating build/temp.linux-i686-2.5/numpy/linalg compile options: '-DSCIPY_MKL_H -I/opt/intel/mkl/9.1/include -Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 -c' icc: numpy/linalg/lapack_litemodule.c creating build/lib.linux-i686-2.5/numpy/linalg icc -msse3 -xP -fast -shared build/temp.linux-i686-2.5/numpy/linalg/lapack_litemodule.o -L/opt/intel/mkl/9.1/lib/32 -L/usr/lib/python2.5/config -lmkl_lapack32 -lmkl_lapack64 -lmkl -lvml -lguide -lpthread -lpython2.5 -o build/lib.linux-i686-2.5/numpy/ linalg/lapack_lite.so IPO link: can not find -lmkl_lapack32 icc: error #10014: problem during multi-file optimization compilation (code 1) IPO link: can not find -lmkl_lapack32 icc: error #10014: problem during multi-file optimization compilation (code 1) error: Command "icc -msse3 -xP -fast -shared build/temp.linux-i686-2.5/numpy/linalg/lapack_litemodule.o -L/opt/intel/mkl/9.1/lib/32 -L/usr/lib/python2.5/config -lmkl_lapack32 -lmkl_lapack64 -lmkl -lvml -lguide -lpthread -lpython2.5 -o build/lib.linux-i686-2.5/numpy/linalg/lapack_lite.so" failed with exit status 1 There is no mkl_lapack32 in /opt/intel/mkl/9.1/lib/32 There are only 'libmkl_lapack.a' and 'libmkl_lapack.so' Likewise, there is no mkl_lapack64 in/opt/intel/mkl/9.1/lib/64 I don't understand where the '-lmkl_lapack32' and '-lmkl_lapack64' are coming from. I looked in lapack_litemodule.c, but didn't see anything about lapack. Thanks for any pointers, -rex

rex <rex@nosyntax.com> [2007-06-09 11:02]:
I changed the cc_exe line in numpy-1.0.3/numpy/distutils/intelccompiler.py to:
cc_exe = 'icc -msse3 -xP -fast' #Core 2 Duo
From the numpy-1.03 directory executed:
python setup.py config --compiler=intel build_clib --compiler=intel build_ext --compiler=intel install --prefix=/usr/local/
[much snipped] icc: error #10014: problem during multi-file optimization compilation (code 1) IPO link: can not find -lmkl_lapack32 icc: error #10014: problem during multi-file optimization compilation (code 1) error: Command "icc -msse3 -xP -fast -shared build/temp.linux-i686-2.5/numpy/linalg/lapack_litemodule.o -L/opt/intel/mkl/9.1/lib/32 -L/usr/lib/python2.5/config -lmkl_lapack32 -lmkl_lapack64 -lmkl -lvml -lguide -lpthread -lpython2.5 -o build/lib.linux-i686-2.5/numpy/linalg/lapack_lite.so" failed with exit status 1
There is no mkl_lapack32 in /opt/intel/mkl/9.1/lib/32 There are only 'libmkl_lapack.a' and 'libmkl_lapack.so' Likewise, there is no mkl_lapack64 in/opt/intel/mkl/9.1/lib/64
A recursive grep on /usr revealed that the file: /usr/local/src/numpy-1.0.3/numpy/distutils/system_info.py has sections that looks for 'mkl_lapack32' and 'mkl_lapack64'. I deleleted the references to 'mkl_lapack64' and changed 'mkl_lapack32' to 'mkl_lapack', and voila, numpy compiles! (after removing the 'build' directory in the numpy root -- there will be errors if stuff is there from a prior attempt) Python 2.5 (r25:51908, Nov 27 2006, 19:14:46) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.test() Found 5 tests for numpy.distutils.misc_util Found 3 tests for numpy.lib.getlimits Found 31 tests for numpy.core.numerictypes Found 32 tests for numpy.linalg Found 13 tests for numpy.core.umath Found 4 tests for numpy.core.scalarmath Found 9 tests for numpy.lib.arraysetops Found 42 tests for numpy.lib.type_check Found 188 tests for numpy.core.multiarray Found 3 tests for numpy.fft.helper Found 36 tests for numpy.core.ma Found 1 tests for numpy.lib.ufunclike Found 1 tests for numpy.fft.fftpack Found 12 tests for numpy.lib.twodim_base Found 10 tests for numpy.core.defmatrix Found 4 tests for numpy.ctypeslib Found 41 tests for numpy.lib.function_base Found 2 tests for numpy.lib.polynomial Found 9 tests for numpy.core.records Found 29 tests for numpy.core.numeric Found 4 tests for numpy.lib.index_tricks Found 47 tests for numpy.lib.shape_base Found 0 tests for __main__
---------------------------------------------------------------------- Ran 526 tests in 0.570s OK <unittest.TextTestRunner object at 0x83bb82c> The numpy-1.0.1 RPM version is faster: Ran 526 tests in 0.474s I wonder why that is? -rex
participants (1)
-
rex