Dynamically linking MKL

Dynamically linking MKL

Rob R.'s picture

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.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Sergey Kostrov's picture

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.

Tim Prince's picture

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.

Rob R.'s picture

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. 

Sergey Kostrov's picture

>>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.

Login to leave a comment.