Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6740 Discussions

How to add MKL with TBB threading to application that uses TBB under Visual Studio?

ronhartley
Beginner
806 Views

I have installed IntelSWTools 2017.4:
c:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows

My application uses TBB:
Release(/MD): tbb\lib\intel64\vc12\tbb.lib       -> redist\intel64\tbb\vc12\tbb.dll
Debug(/MDd):  tbb\lib\intel64\vc12\tbb_debug.lib -> redist\intel64\tbb\vc12\tbb_debug.dll

How to add MKL with TBB threading (so that there would be only one TBB instance) to application that uses TBB?

The problem is that mkl_tbb_thread_dll.dll (as I understand) linked with:
tbb\lib\intel64\vc_mt\tbb.lib -> redist\intel64\tbb\vc_mt\tbb.dll
which is different from what my application uses.

Is redist\intel64\tbb\vc_mt\tbb.dll for mkl_tbb_thread_dll.dll can be changed to redist\intel64\tbb\vc12\tbb.dll ?
If yes how to be with Debug build (somehow rename redist\intel64\tbb\vc12\tbb_debug.dll to tbb.dll)?

 

0 Kudos
2 Replies
Ying_H_Intel
Employee
806 Views

Hi

It seems there were discussion about the issue. As i recalled,  you should be able to link the wanted tbb library with mkl_tbb_thread.lib .

vc_mt folder contains dlls which are statically linked to VC runtime.  If you want to use the other tbb tied with MSVS version and runtime library., please try ,

if with Release(/MD)

  • Under Configuration Properties > linker  > General Additional Directory. add the wanted tbb path  :   tbb\lib\intel64\vc12
  • add redist\intel64\tbb\vc12\ in your system environment variable PATH.
  • reopen your MSVS and recompiled your exe.

Here i assume you are link MKL manually.    If you are link MKL Automatically. (please switch it ) and follow the instruction in manually parts.

https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-compiling-and-linking-with-microsoft-visual-cc/

and please let us know if any issues.

Best Regards,

Ying

ronhartley
Beginner
806 Views

Thanks for help,
link with mkl_tbb_thread.lib (instead of mkl_tbb_thread_dll.lib) solves my issue.

 

 

Reply