I have been trying to install numpy-1.7.1
with MKL-10.3
on python-2.7.5
using gcc-4.7.2
on a linux-2.6.18-308.24.1.el5
system for a few days now. I have not long ago successfully compiled R-3.0.1
with MKL
using the same compiler.
I modified the site.cfg
file in numpy-1.7.1
as follows:
[mkl]
library_dirs = /sb/software/libraries/MKL/10.3/lib/intel64
include_dirs = /sb/software/libraries/MKL/10.3/include
mkl_libs = mkl_rt
lapack_libs =
When I call python setup.py install
, it finds the MKL
libraries for BLAS
and LAPACK
. Up until this point, there is no complaint or warning. It breaks down once I try to do something with numpy
.
$ python
Python 2.7.5 (default, Jul 31 2013, 16:54:43)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.test('full')
Running unit tests for numpy
NumPy version 1.7.1
NumPy is installed in /sb/project/mjd-574/ndejay/modules/python-2.7.5/lib/python2.7/site-packages/numpy
Python version 2.7.5 (default, Jul 31 2013, 16:54:43) [GCC 4.7.2]
nose version 1.3.0
.................python: symbol lookup error: /sb/software/libraries/MKL/10.3/lib/intel64/libmkl_intel_thread.so: undefined symbol: omp_get_num_procs
This appears to be a known issue (link to source) whereby libiomp5
is not loaded by libmkl_rt
. When I add the path to libiomp5
to the library_dirs
variable in site.cfg
, numpy
fails to detect all MKL
libraries.
I have even tried the following to force gcc
to use its own openMP
libraries/headers, but to no avail.
CFLAGS='-fopenmp -lgomp' python setup.py install
I would be grateful for any sort of help or advice on this matter. Do not hesitate to let me know I have omitted critical information in this thread.
EDIT: I am running on a x86_64
platform.