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

Compiling PARDISO under windows

Balamurugan_R_
Beginner
531 Views

Hi,

Iam trying to compile thepardiso sample codesgiven in the distribution. But i get the following error during linking

par1.obj : error LNK2001: unresolved external symbol "int __cdecl omp_get_max_threads(void)" (?omp_get_max_threads@@YAHXZ)
par1.obj : error LNK2001: unresolved external symbol "int __cdecl PARDISO(void *,int *,int *,int *,int *,int *,double *,int *,int
*,int *,int *,int *,int *,double *,double *,int *)" (?PARDISO@@YAHPAXPAH1111PAN111111221@Z)
par1.exe : fatal error LNK1120: 2 unresolved externals

I am using intel C++ compiler version 8.0 for compiling and linking the codes.

This is how i compile it

icl /D _WIN32 par1.cpp "c:Program FilesIntelCMKL8.1.1ia32libmkl_solver.lib" "c:Program F
ilesIntelCMKL8.1.1ia32libmkl_c.lib" "c:Program FilesIntelCMKL8.1.1ia32libmkl_ia32.lib"

Can you suggest me what could be wrong.

Thanks

Bala

0 Kudos
3 Replies
gogetaxr4
Beginner
531 Views

Mmm looks like you're missing the parameter for OpenMP. Try passing -openmp to icl.

Regards.

0 Kudos
klasha
Beginner
531 Views

I get the exact same errors when compiling "Example C-9 Example pardiso_unsym.c for Unsymmetric Linear Systems" from the manual using Microsoft Visual Studio 2005.

Have you figured out a solution Bala?

/Klas

0 Kudos
TimP
Honored Contributor III
531 Views

If you mean that you're using Visual Studio without an Intel compiler, missing references to OpenMP functions called by MKL would mean that you haven't successfully included MKL libguide.lib in your library list.
As the previous poster suggested, passing the option /Qopenmp would take care of it when you use an Intel compiler. The Microsoft compiler OpenMP option would not be expected to work with MKL.
0 Kudos
Reply