Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Karl_Eschberger
Beginner
130 Views

Win32 compile problem

I am compiling a very simple Dll that uses the Intel MKL libraries. I am using Visual studio 2015 Community edition and Intel MKL 2017 (just released). If I compile using X64 there is no problem and the Dll works fine with other code. If I set it to Win32, I get the error message as shown on the attached screenshot. The .target files have entries that are not in the .target files of the X64 version. Any idea where things went wrong? Regards Karl Eschberger

0 Kudos
10 Replies
Alan_Ritchie
Beginner
130 Views

I get this error too, building a 32-bit exe, but not when building the 64-bit version.  Using Visual Studio Professional 2015 Update 3.

I don't have the Intel Compiler, only the Math Kernel Library, so $(SuiteVer) = "[Intel Compiler is not installed]" makes sense.

 

Zhen_Z_Intel
Employee
130 Views

Hi Karl,

Could you please provide a test case, we would like to reproduce and check if the problem caused by some compiler settings, thank you for posting your problem.

Best regards,
Fiona

 

Karl_Eschberger
Beginner
130 Views

Hi Fiona I've attached the solution. As I mentioned it is fine in X64 - only gives a problem with Win32. Thanks and regards Karl

Zhen_Z_Intel
Employee
130 Views

Hi Karl,

I could not reproduce your problem, it seems the problem is caused by compiler option. Normally, if you installed Intel compiler, the $(SuiteVer)=17 (for parallel studio 2017, once you install ICC, whatever you use icl or not). I am not sure, if developer team set some option required Intel compiler, but normally, you could use microsoft compiler, Intel compiler or GNU compiler to compile your program (te intel compiler is not required). I will post your problem to developer team, and they could give a reply soon. Thank you for posting your problem.

Best regards,
Fiona

Zhen_Z_Intel
Employee
130 Views

Hi Karl,

Have you install Intel Compiler 17.0 and integrated into VS both for ia32 & intel64 successfully? Please use a simple HelloWorld program compiling with Intel C++ compiler to see if this problem still remain. Thank you.

Best regards,
Fiona

Karl_Eschberger
Beginner
130 Views

Hi Fiona

I do not have Intel Compiler – it is not part of our subscription and we have never needed it.

We have compiled this Dll for years in Win32 without a problem – it is only now that it has surfaced.

Regards

Karl

 

Zhen_Z_Intel
Employee
130 Views

Hi Karl,

Please try following steps to fix this problem:

edit file:
"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\ImportBefore\Intel.Libs.MKL.v140.targets" 
The line:
      <_MKLArgPlatform Condition="$(SuiteVer) >= 17 OR $(MKLMNewArgFormat) == 1">ia32</_MKLArgPlatform>
replace with the lines:
      <_MKLArgPlatform Condition="'$(SuiteVer)' == '[Intel Compiler is not installed]' AND $(MKLMajorVersion) >= 17">ia32</_MKLArgPlatform>
      <_MKLArgPlatform Condition="'$(SuiteVer)' != '[Intel Compiler is not installed]' AND ($(SuiteVer) >= 17 OR $(MKLMNewArgFormat) == 1)">ia32</_MKLArgPlatform>

And Let me know if this solution could be useful to you. Thank you.

Best regards,
Fiona

 
Karl_Eschberger
Beginner
130 Views

Hi Fiona

​The change to the .targets file did the trick.

I also had to add the path of the libiomp5md.lib file in the VC++ Directories -> Library Directories entry under "Properties".

Thank you very much for the help. Please update the installer in the next version to alter the .targets file as directed.

Best regards

Karl​

 

Zhen_Z_Intel
Employee
130 Views

Hi Karl,

Thanks a lot for your advise, the fix will be available in 2017 Update 1. Please expect for next release. Thank you.

Best regards,
Fiona

LuisGT
Beginner
130 Views

I've a similar problem in 2017 Update 1: I can't compile a Win32 version of my program (in MS Studio 2010). In x64 there is no problem. In previous versions of MKL there is no problem, (x64 nor x32)
The error message is:
"Error 1 error MSB3073: El comando "mkl_link_tool.exe -libs -c ms_c -a ia-32 -l static 2>NUL 1>"C:\Users\lgt\AppData\Local\Temp\tmp92D9.tmp"" salió con el código 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\ImportBefore\Intel.Libs.MKL.v100.targets line 55"
The problem is this line of "Intel.Libs.MKL.v100.targets":
"<_MKLArgPlatform>ia-32</_MKLArgPlatform>​"
The correct one
"<_MKLArgPlatform>ia32</_MKLArgPlatform>​"
I´ve solved temporaly this error modifying the file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\ImportBefore​\Intel.Libs.MKL.v100.targets", changing
"<_MKLArgPlatform>ia-32</_MKLArgPlatform>​
with
"<_MKLArgPlatform>ia32</_MKLArgPlatform>​"
Reply