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

MKL 2020.1, VS2019 linking bug

Usievich__Boris
Beginner
3,213 Views

I updated to version 2020.1 and got the following error recompiling my dll

Error	MSB3073	The command "mkl_link_tool.exe -libs -c ms_c -a intel64 -l static 2> NUL" exited with code 9009.	LNM_Lapack	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\v142\ImportBefore\Intel.Libs.MKL.v142.targets	64	

line 64 in the Intel.Libs.MKL.v142.targets file corresponds to

<Exec ConsoleToMSBuild="true" EchoOff="true" StandardOutputImportance="low" Command="mkl_link_tool.exe $(MKLArguments) 2&gt; NUL" WorkingDirectory="$(MKLProductDir)\mkl\tools">
    <Output TaskParameter="ConsoleOutput" ItemName="_MKLLibraries" />
</Exec>

So VS is trying to start mkl_link_tool in the directory "$(MKLProductDir)\mkl\tools". The problem is that there is no such file in the directory. mkl_link_tool is located in the bin\ directory. Making a copy of the executable in the tool\ solves the problem.

 

0 Kudos
6 Replies
Gennady_F_Intel
Moderator
3,213 Views

It's not a bug. The mkl_link_tool was moved to another folder only. We are sorry w/o notification the changes we did. 

Usievich__Boris
Beginner
3,213 Views

But the file Intel.Libs.MKL.v142.targets is a part of Intel-supplied integration with VS, I suppose it is the Intel responsibility to change it according to the new placement of the link tool.

0 Kudos
Dietrich__Alexander
3,213 Views

Any fixes/workarounds? Unlucky day to start trying to work with MKL.

0 Kudos
West__Phil
Beginner
3,213 Views

Possible Quick Fix

If you need a quick fix, here is what worked for me.  Change the file Intel.Libs.MKL.v142.targets in your visual studio install (my path was under \Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\v142\ImportBefore).

On line 64, find the WorkingDirectory attribute:

WorkingDirectory="$(MKLProductDir)\mkl\tools"

and change it to:

WorkingDirectory="$(MKLProductDir)\mkl\bin"

0 Kudos
Siv__Ratha
Beginner
3,213 Views

Me, lazy fix:

Copy everything in:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\mkl\bin

And paste in:

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\mkl\tools

 

0 Kudos
Eric_P_Intel
Employee
3,213 Views

@Ratha, +1, that fixed the issue for me, thanks.

It's a bug, IMO.

0 Kudos
Reply