- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Description
Just bought my new Visual Studio 2017 and I wanted to give it a shot with the new Intel MKL v2018 update 1. Although, I followed "precisely" the instructions for automatically setting MKL v2018 to work along side with Visual Studio 2017 as shown in the thread : "Compiling and Linking Intel Math Kernel Libray with MicrosoftVisual Studio C++". I have unresolved linkage issues. I even tried to repair my MKL v2018 update 1 installation but the issues still remain. I get a strange warning that my intuition tells that some environmental variable wasn't set right or something during the installation process went wrong (emphasis mine):
Questions
Is this a bug of Intel MKL v2018 update 1 or Visual Studio 2017, or is it an omission of mine? Either way, is there a work around or a way to fix this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have not looked into your source files in detail, but one error message from the build process is notable -- the one regarding %MKL_PRODUCT_DIR% not being defined. A consequence of this environmental variable not being defined may be that the CBLAS library is not found during linking.
It would help if you attached the buildlog.htm file from the failed build attempt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dimitrios,
For the Warning Could not expand MKLProductDir variable error, you probably not install/integrated MKL correctly.
1. Firstly, please check your environmental variable "Path" in any command window through "set" command, watch if you have already set MKL product Dir, the path normally like "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_<your_version>\windows\redist\intel64\mkl". If it is not been set, run script file "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_<your_version>\windows\bin\compilvars.sh intel64".
2. Check if the "property" of your project -> "configuration Properties" -> "General" -> "Platform Toolset" is set to "Intel C++ Compiler 18.0"? Also select "Tools" -> "Options" -> "Intel Compilers and Tools", check the version of Intel compiler and Performance Libraries you are using.
3. If above suggestions still no help, you probably install MKL incorrectly, please try to reinstall. And send me your installation log file under %tmp%\pset_tmp_PSXE2018_<your_username>\<date_installed_mkl>\
For the unresolved external symbol error, you probably not link to MKL libs correctly:
1. The cblas_sswap symbol is defined in "mkl_intel_lp64.<lib|dll>" for static/dynamic linkage, and "mkl_rt.dll" for single dynamic. check your linked MKL libraries. Normally, if your MKL Product Dir is not set correctly, VS could not find proper libraries for MKL, even could not link correctly.
Best regards,
Fiona
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for the reply and time.
- Yes my environmental variables aren't set. Running "compilvar.sh intel64" in my command prompt seems to set them, but this doesn't really help, problem still remains (Shouldn't these variables being set automatically with the installation of MKL? Why do I have to do this manually? Even if this was the solution, I'd had to run "compilevar.sh" everytime windows boot or I'd had to set the .bat file to run everytime windows boot).
- I don't have an Intel compiler installed. I run with Clang though, that comes with visual studio 2017, but this didn't helped either.
- Reinstalled Intel MKL 2018 update1. Reinstallation screwed up my installation of visual studio 2017. Now Visual studio 2017 doesn't have icons on its buttons and apart from this, reinstallation didn't solve the problem.
Really frustrated here.
(thinking out loud) I guess I'll have to wait for a more mature update of MKL, if considering installing MKL at all in the future". Going to the phycologist now, after all these I surely need an extra session...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OK back from the phycologist, this really helped... not...
Uninstalling MKL 2018 brought back the icons of visual studio,
(thinking loud) "thank God!".
Assuming that update 1 is screwed up. I installed MKL 2018 initial release.
- Installing MKL 2018 initial release.
- Created an empty Visual C++ project.
- Created in the empty project a "main.cpp" file.
- Created in the "main.cpp" a main function (see code below).
- Build OK!
- Project > Properties > Intel Performance Libraries > Set Intel MKL "Parallel"
- Project > Properties > C/C++ > Code Generation > Runtime Library > set Multi-Threaded /MT
- Build FAILED!
Error:
int main() {}
(Thinking out loud) I guess people over Intel didn't expect malicious users like me. That would install MKL 2018 update 1, after seeing that it screws up visual studio would uninstall it and then install MKL 2018 initial update to see if this works. Maybe Kerbal Space Program has to do something with it :P, maybe I should uninstall it as well.
P.S Environmental variables in %Path% aren't set with the initial release as well.
Now let's go for another experiment, install update 1 on top of initial release. Following the same drill (OK this time the icons of visual studio are OK):
- Created an empty Visual C++ project.
- Created in the empty project a "main.cpp" file.
- Created in the "main.cpp" a main function (see code below).
- Build OK!
- Project > Properties > Intel Performance Libraries > Set Intel MKL "Parallel"
- Project > Properties > C/C++ > Code Generation > Runtime Library > set Multi-Threaded /MT
- Build OK!
- #include "mkl.h" (code below)
- Boom! 2 Errors and 6 warning (see pictures bellow).
- Checking for environmental variable and not found them. In command prompt C:\>cd C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\bin\
- Issuing command "C:\>mklvars.bat intel64"
- Issuing command "C:\> echo %Path%"
- Result seems OK (emphasis mine):
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\redist\intel64_win\tbb\vc_mt;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\redist\intel64_win\mkl;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\redist\intel64_win\compiler;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\Users\bouza\AppData\Local\Microsoft\WindowsApps; - Opening Visual Studio Again.
- Opening same application.
- Build same application.
- Nothing changed same errors.
- Build log: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(37,5): warning : Could not expand MKLProductDir variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(38,5): warning : Could not expand MKLMajorVersion variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(39,5): warning : Could not expand MKLMinorVersion variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(40,5): warning : Could not expand MKLIncludeDir variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(41,5): warning : Could not expand MKLLibDir variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\ImportAfter\Intel.Libs.MKL.v141.targets(42,5): warning : Could not expand OmpLibDir variable. Corresponding version of Intel(R) MKL is not installed or the registry information may be incorrect.
main.cpp
c:\users\bouza\source\repos\mklsandbox2\mklsandbox2\main.cpp(1): fatal error C1083: Cannot open include file: 'mkl.h': No such file or directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also found this related thread:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
the Step : Configuration Properties > Intel Performance Libraries > Intel (R) Math Kernel Library > Use Intel (R) MKL > Parallel|Sequential
originally, the step should be fine to link all mkl into your project.
But maybe there is integration error, between MKL and MSVS 2017. please see integration to MVSC 2017.
So you may switch off the step , then try manually link your application with mkl follow by this KB article recipe, i hope this help.
Attach one solution , which have manual mkl setting in project property. for your reference.
thanks,
Ying

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page