I have a question regarding the use of Armadillo with MKL. Now I have a program written in c++ using Armadillo library. In my computer, I have MKL (can be viewed as the replacement of lapack and blas) installed and I believe Armadillo had detected the MKL when the Armadillo was installed. Now I wrapped the c++ code in python via cython. But when I imported the module, I got the following error: "undefined symbol : dgesvx_". I searched the Internet and found that dgesvx is related to lapack library. Probably I missed something about the linking, but cannot figure it out. Can someone give me some advice? Thanks.
Here is the my setup.py for wrapping c++.
setup(name='example',
version='0.1',
packages=['example'],
package_dir={'example': 'example'},
description='Wrapper to Armadillo',
#package_data={'cyarma': ['*.pyx','*.pxd']},
cmdclass = {'build_ext': build_ext},
ext_modules = [Extension("example",
["example/example.pyx", "example/Test.cpp"],
include_dirs = [get_include(), '/usr/include',
'/usr/local/include',
cyarma.include_dir,
"/Users/armadillo-9.900.1/include"],
library_dirs = ['/usr/lib', '/usr/local/lib/include"],
extra_compile_args = ['-lmkl']
language='c++',
),
]
)
It worked fine on my another computer with lapack and blas installed.