I keep getting this error at the end of the Build. Please note that my code have been developed so far using VS2010 and was automatically converted to V14 toolset.
Severity Code Description Project File Line Source Suppression State Error MSB6003 The specified task executable "cmd.exe" could not be run. The working directory "\mkl\tools" does not exist. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\ImportBefore \Intel.Libs.MKL.v140.targets
The "mkl/tools" is however available from:
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl
Do you have any suggestions how could I fix it?
It looks like a setting issue in Visual Studio. Did you just update to MKL 2016 Update 3? Did it run in VS 2010 with MKL 2016 Update 3? Could you make sure the default directory in VS 2015 is pointing at "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows"? Thanks!
No i did not just update. I've isntalled entire Parallel Studio 2016 - but w/o additional tools like IntelAdvisor, etc.
Using VS2010 also produces the same error :( although the Toolset is set to V10. Before installing Parallel Studio 2016 everything worked fine.
The relative message for VS2010 is:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\ImportBefore\Intel.Libs.MKL.v100.targets(55,5):
Note that I've also ran mklvars.bat with arguments ia32 vs2010, but I do not know if that should be importatnt for this issue.
Regarding "default directory", can you please explain what you exactly mean by this?
One more thing, after isntalling PS2016 I noticed that inside Visual Studio there are some changes in the GUI:
a) In my main C-project properties there is additional section "Intel Performance LIbraries". Do I have to Enable MKL here if I use it only in Fortran part of the code?
A small update.
I have "debugged" (using <Message Text="$(Variable)" Importance="high"/>) the Intel.Libs.MKL.v100.targets file, and concluded that this is the line that causes problem:
<Exec EchoOff="true" Command="mkl_link_tool.exe $(MKLArguments) 2>NUL 1>"$(TempMklToolFile)"" WorkingDirectory="$(MKLProductDir)\mkl\tools" />
The MKLArguments gives -libs -c ms_c -a ia-32
The TempMklToolFile gives C:\Users\HIRT\AppData\Local\Temp\tmp64BF.tmp
However, asking for value of MKLProductDir gives nothing !!!
All right, so what I did and what worked for me was commenting out this part:
<!-- <Exec EchoOff="true" Command="mkl_link_tool.exe $(MKLArguments) 2>NUL 1>"$(TempMklToolFile)"" WorkingDirectory="$(MKLProductDir)\mkl\tools" /> -->
in the following file, which by the way has already been mentioned here:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\ImportBefore\Intel.Libs.MKL.v100.targets
Still, I would really appreciate any comments on why such situation takes place.
There's a quick way to check if VS defined the macro of "MKLProductDir", you could check with program properties. first select use MKL in VS, in "VC++ Directories" option, select "Include Directories" to edit, select "Macro" and search $MKLProductDir.
If there's no this macro, go to VS IDE, select "View"-> "Other windows"->"Property Manager", in the window of Property manager, double click on "Microsoft.Cpp.Win32.user" within your project, select "User Macro", add a new macro $MKLProductDir. Hope it would be useful to you. Thanks.
The steps you suggested helped to get forward, so thanks you, but another error appears now:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100 \ImportBefore\Intel.Libs.MKL.v100.targets(55,5): error MSB3073: The command "mkl_link_tool.exe -libs -c ms_c -a ia-32 2>NUL 1>"C:\Users\HIRT\AppData\Local\Temp\tmp5134.tmp"" exited with code 1.
The MKLProductDir variable points to: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows
Do you have any further suggestions? :)
The mkl_link_tool.exe is used for generating link lines according to your system environment & compiler situation. The reason you get null return is that you give it wrong command input. There's no architecture(-a) call ia-32, it should be ia32, please modify command to
mkl_link_tool.exe -libs -c ms_c -a ia32
In Intel.Libs.MKL.v100.targets, from line 38-51, describes how VS IDE set commands for mkl_link_tool.exe. And you may notice the 41& 42 lines:
<_MKLArgPlatform Condition="$(MKLMNewArgFormat) == 1">ia32</_MKLArgPlatform>
The arch is set as ia-32 by default, but if the macro $(MKLMNewArgFormat) equals to 1, it would be set as ia32. I think you may lack of that macro.... For your problem, seems your VS2010 lost all macro relevant to MKL, I am not sure if you fixed this problem, how many other problem caused by macro would appear. My advice is, you may could uninstall the whole software, and try to install latest IPS windows package integrated on VS IDE.