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

MKL linking process is very long in release mode (VS2016)

Konovalov__Pavel
Beginner
293 Views

I have static lib myLib.lib and executable myExe.exe that is using myLib. MKL is enabled for the mylib, the model is "sequential" in the VS Intel Performance Library settings (for exe project I have tried to build both with and without enabled MKL, looks like doesn't matters ).  In debug all building fast(with or without mkl). In release without of MKL - build is fast, and with enabled MKL linking process of myExe.exe is very-very long - something like 15 minutes(without using mkl all build time is 1 min). I have tried both MS C++ compiler and linker and Intel Compiler and linker. How "to fix" this? 

0 Kudos
1 Reply
Jing_Xu
Employee
293 Views

Hi,

Could you please tell more about your usage model and what MKL function list?  The reason of long time mainly is about the long processing of MSVS lib.exe package all MKL static libraries to your static library.  Basically, we don't encourage to package MKL static library (or any third-party static library) to  one small self library.  

For fix the long time issue, please remove static MKL link in your static project. 

Then when produce exe, link your small static library + MKL static or dynamic library A

​or mkl provide custom dll based on the function you listed, please see the custom dll tools under MKL install folder.  
https://software.intel.com/en-us/mkl-windows-developer-guide-building-a-custom-dynamic-link-library-in-the-visual-studio-development-system ;

Best Regards
Jing
https://msdn.microsoft.com/en-us/library/7ykb2k5f.aspx

 

 

 

0 Kudos
Reply