Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
25 Views

linking with two versions of mkl (multi threaded and single threaded) in one application

Hi,

Is it possible to use both the single threaded version of mkl library and the multi threaded version of mkl in one application?

I need the single threaded version to use with PLASMA library, yet at some other part of my code, I need use mkl PARDISO, for which I need the multi threaded version.

Any help will be greatly appreciated.

Cheers

Michal

 

Tags (1)
0 Kudos
3 Replies
Highlighted
Beginner
25 Views

I forgot to say that my operating system is Linux, debian wheezy.

 

0 Kudos
Highlighted
Beginner
25 Views

I was able to fix the problem, by lining PLASMA with the multi threaded mkl. The crucial thing was to set

call kmp_set_defaults("KMP_AFFINITY=disabled")

which makes PLASMA with multi threaded mkl only 2% slower than PLASMA with single threaded mkl. Without this option it is 3 times slower.

It means that I do not need to link to the single threaded library anymore. 

 

0 Kudos
Highlighted
25 Views

If each is establishing its own thread pool, then experiment with KMP_BLOCKTIME environment variable settings or KMP_SET_BLOCKTIME function.

Jim Dempsey

 

0 Kudos