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

Sparse solver libary?

yhao
Beginner
583 Views

I want to build a program which utilize the MKL sparse solver "pardiso" in a 32-bit windows system, I am confused by the libaries needed in compiling, I have tried to use : mkl_solver.lib, mkl_s.lib and libguide.lib, it can build successfuly with a warning message:

Warning18 warning LNK4078: multiple '_RDATA' sections found with different attributes (40301040)pardiso

but the execute can not run properly. Does somebody know the correct libary needed by pardiso? Thanks a lot.

0 Kudos
2 Replies
Chao_Y_Intel
Moderator
583 Views

Hello,

Could you try to link with mkl_solver.lib, mkl_c.lib and libguide.lib
MKL pardiso uses cdecl interface mkl_c.lib

Thanks,

Chao

0 Kudos
Intel_C_Intel
Employee
583 Views

In the Windows 32-bit environment you should need to link only two MKL libraries: mkl_c.lib and libguide, which is necessary to support the OpenMP threading used in MKL. I didn't indicate the correct name for libguide for a reason. In the /lib directory are two versions of libguide: libguide.lib and libguide40.lib. The first one is a statically linked version of libguide. The second one is a static link to the DLL version of libguide, and is the preferable version to use. You are less likely to run into problems with the latter since it causes libguide40.dll to get loaded at run time, and that dll has all necessary compiler references linked into it.

Since you have also tried mkl_s.lib, let me explain a bit more. MKL on 32-bit Windows supports two interfaces: cdecl with mkl_c.lib and a modified version of stdcall which was used by Compaq Visual Fortran, mkl_s.lib. Unfortunately if you link mkl_s.lib into a program which uses cdecl, it will link, but will not run correctly. (mkl_s.lib has two variants of each function: a decorated name, such as "foo40" and undecorated name, such as "foo". The latter name is identical to that used within mkl_c.lib, but behaves differently)

Both mkl_c.lib and mkl_s.lib have default file names to be used by the linker, namely all the various libraries in /lib such as mkl_ia32.lib (processor-specific code), mkl_lapack.lib (LAPACK code) and mkl_solver (PARDISO/DSS code). libguide is not included as it is important that this be chosen, either through the use of switches on use of the Intel compiler or by explicitly linking in libguide.lib or libguide40.lib.

Bruce

0 Kudos
Reply