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

Linker Warnings, Library Selection

Jens_D_
Beginner
840 Views
Hi everyone,

we use MS Visual Studio 2008 and want to link the Intel MKL (version 10.0.5.025)statically. The Link line advisor generates the following link line (if we assume that the Visual studio comiler is an intel compatible one):

mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib -Qopenmp

if we use these instructions (and skip the-Qopenmp instruction), we have a lot of warnings (total numer: 145) like the following one:

mkl_intel_c.lib(_get_proc_pardiso.obj) : warning LNK4006: _get_proc_pardiso already defined in mkl_solver.lib(getenv.obj); second definition ignored

1>mkl_core.lib(vsl_p8_wh_tables.obj) : warning LNK4006: __vsl_WH_A already defined in mkl_core.lib(vsl_ax_wh_tables.obj); second definition ignored

1>mkl_core.lib(vsl_p8_wh_tables.obj) : warning LNK4006: __vsl_WH_M already defined in mkl_core.lib(vsl_ax_wh_tables.obj); second definition ignored

1>mkl_core.lib(vsl_p8_wh_tables.obj) : warning LNK4006: __vsldWH_IM_Tab already defined in mkl_core.lib(vsl_ax_wh_tables.obj); second definition ignored

1>mkl_core.lib(vsl_p8_wh_tables.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible

Is there a way toget rid of these warnings(among to switch them of)?

Another question: the MKL User's Guide states on p. 5-6 that we should use the mkl_sequential.lib instead of mkl_intel_thread.lib, which is ot consistent with the link line advisor generated link line. Which one should we use?

Best Regards,

Jens Decker
Hendrik Woehrle

0 Kudos
2 Replies
TimP
Honored Contributor III
840 Views
"mkl_solver.lib" acts as as script invoking the dll counterparts of the static .lib files you have chosen, so you have a direct conflict.
When you don't want MKL to generate its own OpenMP threads, you would use the mkl_sequential, (which doesn't require -Qopenmp), but that also would conflict with the mkl_thread dll version invoked by mkl_solver.
0 Kudos
Gennady_F_Intel
Moderator
840 Views
Hello,
I could misunderstood, but If you will statically link mkls functions, say pardiso, and skip libiomp5md.lib
For example:
mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib

you will have linking errors, something like
error LNK2001: unresolved external symbol ___kmpc_global_thread_num

which must be resolved by linking libguide40.lib ( dont forget we are talking about version 10.0) or
libiomp5md.lib
--Gennady

0 Kudos
Reply