‎11-06-2012 08:59 PM
I would like to use the Intel Math Kernel Libraries (MKL) in LabWindows. However, I keep getting a linker error (undefined symbol when I try to call an MKL function). The functions I want are the FFT libraries (DFTI). I included the "mkl.h" and "mkl_dfti.h" files, and added them to my project as well. I also tried adding the /Qmkl compiler flag when compiling using the Intel compiler. This has become really frustrating, I don't know what's not added / included / not being linked.
Has anyone use the MKL successfully in LabWindows?? What libraries did you add? Thanks!
Solved! Go to Solution.
‎11-09-2012 02:56 PM
Which symbols are missing at the link time? Would you please provide the whole link error message?
If you can provide more information then we can help you better. For example, do you link dynamically or statically? Do you use the sequential or the parallel MKL library? Is your code Fortran or C/C++?
Here is an example of linking with MKL, assuming you are using Intel C++ compiler, 64-bit system, dynamic linking, and the parallel MKL library with Intel OpenMP:
If you have more MKL questions, please consider post them on the "Intel MKL Forum" (http://software.intel.com/en-us/forums/intel-math-kernel-library). You will get more timely responses to your questions.
Thanks,
Intel MKL
‎11-10-2012 12:21 PM
‎11-10-2012 12:40 PM
‎11-10-2012 01:05 PM
Wow - sorry about the lack of formatting in the previous post. Here it is again:
I am working on a 64-bit installation of Win7, but I am making a 32-bit project. I am using LabWindows as an integrated development environment and project builder. I have tried using both its native compiler and the Intel C compiler. In both configuration the linker is LabWindows.
I am so far still only trying to use one function from the MKL, to test whether I have everything included and linked properly:
DftiCreateDescriptor()
I am including the following two header files:
#include mkl.h
#include mkl_dfti.h
I added the following to my include paths:
c:\Program Files (x86)\Intel\Compiler\11.1\054\
‎11-15-2012 01:19 PM
Hi Tom,
I have never used MKL before, so I am certainly not an expert it in it. But I was able to get a CVI project to build referencing the DftiCreateDescriptor function (after much headache with the undefined symbol errors you got). I had more success using the 64-bit .lib files and found that I only needed mkl_core.lib and mkl_rt.lib to get it to compile (maybe this article helps explain what mkl_rt.lib is for). Of course I am using a 64-bit configuration, but I did have success with the CVI compiler.
‎11-16-2012 01:43 PM
‎11-20-2012 01:05 PM
I'm still having linker problems. Compiling works just fine, so the included headers are getting found and compiled in. The only MKL function I am calling is "DftiCreateDescriptor()".
The following symbols are not being found by the linker:
__kmpc_begin, __kmpc_end in my C source code
omp_in_parallel, omp_get_max_threads, __kmps_for_static_init_4, __kmpc_for_static_fini and a whole bunch of others in "mkl_intel_thread.lib"
What library am I missing that defines these? What's wrong??
Current configuration:
Intel Compiler version 11.1
LabWindows linker (C code and C linker)
Static linking, 64bit build target
I am including the following static libraries in my project via "Add File To Project":
mkl_core.lib
mkl_intel_ilp64.lib
mkl_intel_thread.lib
All three are the 64-bit version of the libraries found at:
C:\Program Files(x86)\Intel\Compiler\11.1\054\mkl\em64t\lib
I am including the following two header files:
mkl.h
mkl_dfti.h
I am using the following compiler flags for the icl:
/Qvc7.1 /Qopenmp -I%MKLROOT%/include /Qmkl
However icl isn't the linker here, so how do I direct LabWindows to properly link in whatever libraries these are coming from??
‎11-20-2012 01:18 PM
Just a quick reply saying I tried switching the "mkl_intel_lp64.lib" in for "mkl_intel_ipl64.lib" and I still had the same problems.
Source for which libraries to include:
By the way, could this be a problem with linking the libraries out of order with each other?
‎11-20-2012 04:39 PM
Do you know what version of MKL you are using? Please try this tool to figure out the proper link line: http://software.intel.com/sites/products/mkl/
Many of the missing symbols are from Intel OpenMP library. If you are not using icc as the linker (as you indicuated), then you need to add libiomp5md.lib to your link line.
It also seems that a big part of the problem is about how to compile and link under LabWindows. Unfortunately, I've never used LabWindows before. Again, please ask your questions on http://software.intel.com/en-us/forums/intel-math-kernel-library. You'll get more prompt response and some users there may have expeirence with LabWindows to help you out.