Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
公告
Important Update: Community Platform Migration​. Learn more​>
7301 讨论

How to include the necessary MKL objects into an executable to be used elsewhere?

Ever
新分销商 I
2,283 次查看

I use VS2019 and Intel oneAPI 2023 to build an application intended to run on a Win 10 machine that has no VS and no oneAPI. If the application would not use MKL, then the executable runs fine on the target machine, but now I need to use MKL. On the target machine I get an error, mklsequential.2.dll not available.

I have never used the command line to link a project, all I know is VS.  On VS, Project > Properties > Fortran > Libraries, Use Intel math Kernel Library: /Qmklsequential, and in Runtime Library: well, I tried all the options, nothing works.

The project runs fine when executed inside VS. In solution explorer picture below, you can see that most of the code is already compiled into and .obj file, and there are the calls to the MKL. Maybe I have to do something special when I compile that code? 

Update: I deleted the .obj file, and brought in all the source code to replace that. I compiled and linked in VS in the usual way: Build, Rebuild Solution. No luck. Double-click on the .exe, get "mklsequential.2.dll not available".

I tried to read the oneAPI documentation, but it blew my mind. I'm just a materials science teacher with Fortran coding experience, no more. What can I do? 

 

configurationManagerFortranLibraries.png

 

solutionExplorerFortranLibraries.png

标签 (1)
0 项奖励
2 回复数
Steve_Lionel
名誉分销商 III
2,267 次查看

This is really an MKL question that could be asked in Intel® oneAPI Math Kernel Library - Intel Community  Basically, what you want is to link to static MKL libraries - it's been a while since I looked at this so don't know if that's still an option. Yes, Intel Fortran has some convenient options to link to MKL, but you don't get much control over which set.

0 项奖励
Ever
新分销商 I
2,145 次查看

Here is how I did it. It works. Basicaly the Runtime Library must ve /libs:static.  

configurationManagerFortranLibrariesRuntimeLibrarySOLVED.png

 

0 项奖励
回复