Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Again linking problem

Jorge_A_
Beginner
990 Views

Hi all,

I am trying to link mkl library to my project.

I whant to use armadillo with mkl.

But I am not able to link properly mkl to my project.

I have my build log attached.

Can anyone help me.

Thanks a lot.

Jorge

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
990 Views

What I can see there - Results   Build log was saved at "file://d:\OPF_2_Novo\Release\BuildLog.htm" OPF_2 - 0 error(s), 31 warning(s). There are references to the mlk's libraries at all.

0 Kudos
Zhang_Z_Intel
Employee
990 Views

Your build log doesn't show any references to MKL. What steps have you taken to try to use MKL?

To build Armadillo with Intel MKL, you need to manually edit include/armadillo_bits/config.hpp to make Armadillo to use MKL libraries instead of the standard BLAS and LAPACK libraries. Here's the quote taken from Armadillo documentation:

  • How can I use high-speed LAPACK and BLAS replacements (eg. Intel MKL, AMD ACML, OpenBLAS, GotoBLAS, ...) ?
    • Simply link with the replacement library instead of standard LAPACK and BLAS. You may need to make minor modifications to "include/armadillo_bits/config.hpp" in order to make sure Armadillo uses the same style of function names as used by MKL or ACML. For example, the function names might be in capitals.
    • For Linux-based systems the automatic installer can figure out that MKL, ACML or ATLAS are installed, and will use them instead of the standard LAPACK and BLAS libraries. See README.txt within the Armadillo archive for more information.
    • If you're getting unresolved symbols during linking, or the automatic installer can't find your installation of MKL or ACML, install Armadillo manually (see README.txt). Then edit include/armadillo_bits/config.hpp and comment out (ie. disable) ARMA_USE_WRAPPER, and uncomment (ie. enable) ARMA_USE_LAPACK and ARMA_USE_BLAS. When compiling Armadillo based programs, link with the relevant MKL or ACML libraries instead of BLAS and LAPACK.

More information can be found here: http://arma.sourceforge.net/faq.html

0 Kudos
Jorge_A_
Beginner
990 Views

Sory guys, I did it.

I have used the integrated component of mkl with Visual Studio instead of manual linking and it worked just fine.

In fact more than fine..it reduced the computation time 40% compared with armadillo only.

Thanks a lot for your reply, Zhang and Gennady Fedorov.

0 Kudos
Jorge_A_
Beginner
990 Views

Hi,

I was able to configure armadillo to use mkl.

I installed the integration component of mkl with Visual Studio and it worked just fine.

In fact it was more than fine, because the execution time of my program dropped 40%.

Thanks a lot Gennady and Zhang for your help.

0 Kudos
Reply