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

how to link with intel mkl blas

utab
Beginner
1,806 Views
Dear all,
I used MUMPS, sparse direct solver, with GotoBlas2 up to now.

I wanted to compile it with Intel MKL Blas also to see if there is a gain in performance or not. However, I am puzzling with the libraries to be linked at the moment. Is that possible to link only Intel MKL Blas for my specific application? If yes, which libraries should be linked?
Best wishes,
Umut
0 Kudos
3 Replies
Gennady_F_Intel
Moderator
1,806 Views
it's not possible to link only BLAS libraries for your application. Please check the linker adviser to see the list of mkl's libraries required for your particular case.
0 Kudos
barragan_villanueva_
Valued Contributor I
1,806 Views
Hi,

Using MKL custom builder tool you can create one dynamic library with specified set of functions from MKL needed for your application. Please look at MKL doc.
0 Kudos
TimP
Honored Contributor III
1,806 Views
If you refer only to BLAS and not LAPACK functions, the linker will use only the BLAS functions from MKL, plus the functions required to support them. For those MKL are functions which are parallelized, the required support includes OpenMP or OpenMP stubs functions. You could avoid linking those only by compiling the BLAS functions yourself, or, possibly, by linking against a blas library distributed with your OS.
If you have customized LAPACK functions, linking them first would avoid using corresponding functions from MKL. Maybe I don't understand what you are asking.
As another response indicated, you could make a custom library with just the MKL functions you want, but that may be an unnecessary complication.
0 Kudos
Reply