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

oneAPI MKL manually linking problem in VS2017

di_luca__daniele1
2,993 Views
Hello everybody, 
I'm trying to manually linking the new oneAPI MKL in Visual Studio 2017. 

 

What I did is (x64):

c/c++-->general-->Additional include directories

         C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\include

linker-->general-->Additional library directories         

         C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\lib\intel64

linker-->input-->additional dependencies                   

         mkl_intel_lp64.lib
         mkl_intel_thread.lib
         mkl_core.lib
         libiomp5md.lib

I know I'm missing something, as the VS compiler always returns the following error msg: "LNK1104 cannot open file "libiomp5md.lib", but all additional directories I tried to add failed, so please what other directories should I include/link?

Everything works fine by using the automatic linking option, but I need to make it work this way too.

 

I'm using Visual Studio Community 2017 in Windows 10 (2004).

Thanks in advance. 

0 Kudos
1 Solution
mecej4
Honored Contributor III
2,980 Views

I see 32-bit and 64-bit versions of libiomp5md.lib in

     ...\ONEAPI\compiler\latest\windows\compiler\lib\ia32_win

and

     ...\ONEAPI\compiler\latest\windows\compiler\lib\intel64_win,

but those are directories containing components of the Intel Fortran and C compilers.

The corresponding DLLs are in

     ONEAPI\compiler\latest\windows\redist\ia32_win\compiler

     ONEAPI\compiler\latest\windows\redist\intel64_win\compiler

If you did not install the OneAPI C++ or Fortran compilers, you will probably need to obtain OpenMP libraries (and DLLs?)  from elsewhere, but I have not chosen that route and so I cannot give you specific advice.

View solution in original post

4 Replies
mecej4
Honored Contributor III
2,981 Views

I see 32-bit and 64-bit versions of libiomp5md.lib in

     ...\ONEAPI\compiler\latest\windows\compiler\lib\ia32_win

and

     ...\ONEAPI\compiler\latest\windows\compiler\lib\intel64_win,

but those are directories containing components of the Intel Fortran and C compilers.

The corresponding DLLs are in

     ONEAPI\compiler\latest\windows\redist\ia32_win\compiler

     ONEAPI\compiler\latest\windows\redist\intel64_win\compiler

If you did not install the OneAPI C++ or Fortran compilers, you will probably need to obtain OpenMP libraries (and DLLs?)  from elsewhere, but I have not chosen that route and so I cannot give you specific advice.

di_luca__daniele1
2,971 Views

thank you mecej4, 

as you said, it works that way by using the OneApi C++, but it doesn't when I try to compile it by using VisualC++, I wonder where I might find those OpenMP missing files elsewhere..

0 Kudos
Gennady_F_Intel
Moderator
2,940 Views

There is one problem we detected recently. The standalone version of MKL doesn't contain libiomp5md.lib library (similar to Linux package as well). It might be a reason when Users couldn't build oneMKL based application with OpenMP threading runtime.  

The problem is escalated and we will keep this thread updated when the fix will happen.

As a workaround, the User could take and install oneAPI Base toolkit, install only C/C++ compiler and libiopm5md.lib would be installed on your system.

-Gennady

0 Kudos
Gennady_F_Intel
Moderator
2,369 Views

The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.



0 Kudos
Reply