[Numpy-discussion] numpy with icc/MKL
rex
rex@nosyntax....
Mon May 19 09:35:06 CDT 2008
> Please follow exactly my instruction, otherwise, we cannot compare what
> we are doing: use exactly the same site.cfg as me.
OK, I used the same MKL version you did (10.0.1.014), the same
site.cfg, and set .bashrc to do:
source /opt/intel/mkl/10.0.1.014/tools/environment/mklvars32.sh
and compiled 1.1.0rc1 with:
python setup.py config build_clib build_ext install \
prefix=/usr/local/ > buildXX
Then I ran:
# python
Python 2.5 (release25-maint, Dec 9 2006, 14:35:53)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.test()
Numpy is installed in /usr/local/lib/python2.5/site-packages/numpy
Numpy version 1.1.0rc1
Python version 2.5 (release25-maint, Dec 9 2006, 14:35:53) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)]
Found 18/18 tests for numpy.core.defmatrix
Found 3/3 tests for numpy.core.memmap
Found 283/283 tests for numpy.core.multiarray
Found 70/70 tests for numpy.core.numeric
Found 36/36 tests for numpy.core.numerictypes
Found 12/12 tests for numpy.core.records
Found 0/0 tests for numpy.lib.format
Found 53/53 tests for numpy.lib.function_base
Found 5/5 tests for numpy.lib.getlimits
Found 6/6 tests for numpy.lib.index_tricks
Found 15/15 tests for numpy.lib.io
Found 1/1 tests for numpy.lib.machar
Found 4/4 tests for numpy.lib.polynomial
Found 49/49 tests for numpy.lib.shape_base
Found 15/15 tests for numpy.lib.twodim_base
Found 43/43 tests for numpy.lib.type_check
Found 1/1 tests for numpy.lib.ufunclike
Found 89/89 tests for numpy.linalg
Found 94/94 tests for numpy.ma.core
Found 15/15 tests for numpy.ma.extras
Found 7/7 tests for numpy.random
Found 16/16 tests for numpy.testing.utils
Found 0/0 tests for __main__
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 1004 tests in 1.429s
OK
<unittest._TextTestResult run=1004 errors=0 failures=0>
>>>
So it works. :)
ldd /usr/local/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so
linux-gate.so.1 => (0xffffe000)
libmkl_lapack.so => /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so (0xb7a53000)
/opt/intel/mkl/10.0.1.014/lib/32/libmkl_intel.so (0xb791f000)
/opt/intel/mkl/10.0.1.014/lib/32/libmkl_intel_thread.so (0xb7735000)
/opt/intel/mkl/10.0.1.014/lib/32/libmkl_core.so (0xb76d9000)
libguide.so => /opt/intel/mkl/10.0.1.014/lib/32/libguide.so (0xb767f000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7653000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7522000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb751e000)
/lib/ld-linux.so.2 (0x80000000)
No more links to icc libs.
>> ldd /usr/local/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so
>> linux-gate.so.1 => (0xffffe000)
>> libmkl_lapack.so => /opt/intel/mkl/10.0.3.020/lib/32/libmkl_lapack.so (0xb7a48000)
>> /opt/intel/mkl/10.0.3.020/lib/32/libmkl_intel.so (0xb790a000)
>> /opt/intel/mkl/10.0.3.020/lib/32/libmkl_intel_thread.so (0xb770d000)
>> /opt/intel/mkl/10.0.3.020/lib/32/libmkl_core.so (0xb76a9000)
>> libmkl_vml_p4m.so => /opt/intel/mkl/10.0.3.020/lib/32/libmkl_vml_p4m.so (0xb73bd000)
>> libguide.so => /opt/intel/mkl/10.0.3.020/lib/32/libguide.so (0xb735a000)
>> libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb732f000)
>> libimf.so => /opt/intel/fc/10.1.015/lib/libimf.so (0xb70ff000)
>> libintlc.so.5 => /opt/intel/fc/10.1.015/lib/libintlc.so.5 (0xb708c000)
> You still have libraries linked to intel compilers (libintlc, libimf).
> If you remove both the build directory and installed numpy, I don't why
> those are used. As a last resort, can you put aside /opt/intel/fc
> temporally ?
They are linked because that build was with the Intel compiler. As
you can see from the new ldd above, those links are not there when
I build with gcc.
> You are not using the free version, right ? The problem is that the MKL
> error has no clear meaning, and google did not return anything
> meaningful. Maybe your environment is corrupted in some way, because
> something is likely to influence how MKL is initialized. But what
> exactly, I have no idea.
AFAIK, there is one MKL version for each release. The only
difference is the licensing.
Next step is to try icc instead of gcc, and if that works, try
the latest MKL (10.0.3.020).
Thanks,
-rex
--
I almost stole another tagline. I'm so ashamed.
More information about the Numpy-discussion
mailing list