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

Dynamically linking MKL

Rob_R_1
Beginner
366 Views

Hi is it possible to dynamically link MKL? In particular I want a drop in replacement for blas and lapack on my system. With ATLAS I am able to just create symlinks to the appropriate libraries for libblas.so and liblapack.so and most applications will work correctly. Is this possible with any of the MKL libraries? Thanks.

0 Kudos
4 Replies
SergeyKostrov
Valued Contributor II
366 Views
Please tell us what platform are you using? >>... Is this possible with any of the MKL libraries?.. Here is a very generic answer on your question: Yes, MKL libraries could be dynamically linked.
0 Kudos
TimP
Honored Contributor III
366 Views

Dynamic link is what you get with the plain -mkl option with Intel compilers.  It's probably possible to switch among ATLAS and MKL simply by adjusting LD_LIBRARY_PATH, if you limit yourself to the basics.

0 Kudos
Rob_R_1
Beginner
366 Views

My apologies, I should have been more specific. I am on an intel64 platform. 

I was able to get things to work by symlinking libblas.so -> libmkl_rt.so and liblapack.so.3 -> libmkl_rt.so. I also needed to make sure that I source mklvars.sh. Things seem to perform quite well and I haven't come across any issues yet. 

0 Kudos
SergeyKostrov
Valued Contributor II
366 Views
>>My apologies, I should have been more specific. I am on an intel64 platform. >> >>I was able to get things to work by symlinking libblas.so -> libmkl_rt.so and liblapack.so.3 -> libmkl_rt.so. I also needed to >>make sure that I source mklvars.sh. Things seem to perform quite well and I haven't come across any issues yet. That's OK and thanks for the feedback.
0 Kudos
Reply