[Numpy-discussion] Compiling Numpy with Intel MKL9.1 on SUSE10.2 (Solved!)

rex rex@nosyntax....
Sat Jun 9 14:08:15 CDT 2007


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



More information about the Numpy-discussion mailing list