[Numpy-discussion] Installing numpy with MKL
Tue Aug 3 09:55:12 CDT 2010
I realize that this e-mail has been written a lot of times before. I
have, however, not been able to make it work even though I have looked
through a lot of e-mails on the mailinglist. I apologize if the solution
is written neatly somewhere.
As many others I would like to install numpy with MKL support on a
cluster. The cluster contains dual core AMD Opteron machines. The reason
for doing this is to enable me to perform multi-threaded
matrix-operations (matrix-multiplications and singular value
decompositions primarily). Additionally I need to integrate some Fortran
code also using Intel MKL into numpy using f2py. I think I need to use
MKL for this, but correct me if I am wrong.
I have tried to follow the guide at
I have compiled my own python and installed it locally using the
LD_RUN_PATH suggested there using gcc (I only have access to the intel
9.1 compilers which seems to have a bug preventing me from compiling
python with it (see http://bugs.python.org/issue1689617)). This works
without any problems.
I have access to Intel MKL 10.2.5.035 and have the following site.cfg
for numpy 1.4.1:
library_dirs = /home/sgamark/usr/lib # for python is installed
with prefix $HOME/usr
include_dirs = /home/sgamark/usr/include
library_dirs = /com/intel/mkl/10.2.5.035/lib/em64t
include_dirs = /com/intel/mkl/10.2.5.035/include
lapack_libs = mkl_lapack
mkl_libs = mkl_intel_lp64, mkl_intel_thread, mkl_core, iomp5, pthread,
and have changes numpy/distutils/intelcompiler.py according to
but with cc_exe = 'icc -fPIC -openmp -fomit-frame-pointer -O2 -g'. I
have include openmp since I believe it is necessary for using the
threading features of MKL (correct me if I am wrong).
I have also tried modifiying numpy/distutils/system_info.py as described
but without any effect.
However, executing "python setup.py config" shows that the setup-script
is unable to find any of the libraries I have (see attached file). If I
try to compile anyway MKL is not used and setting OMP_NUM_THREADS have
At this point I am a bit frustrated, since it seems that it should not
be too difficult to get to work since it appears that other people have
no problems. Indeed, several people I work with have no problem doing
this with intel 10.1 compilers, MKL 11.1 on Intel Itanium machines. I am
not particularly experienced with this sort of thing but I usually have
few problems compiling a stand-alone Fortran or C/C++ program that uses MKL.
I would greatly appreciate it if anyone could help with this.
P.s: The operating system is Linux/CentOS 4.4, x86_64
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the NumPy-Discussion