Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28995 Discussions

Is PARDISO available in 32-bit? Linker issue.

StephaneSES
Novice
782 Views

setup:

- Visual Studio 2017
- Intel Parallel Studio 2018 (I made sure I had installed both 32 and 64-bit components)
- Intel Fortran Compiler Classic

Visual Studio solution contains two projects:

- Project A, has a subroutine "1" which calls MKL Pardiso
- Project B, a unit test project that calls subroutine "1"

Solution builds fine in Debug/64-bit, but Project B has a linker error in Debug/x86:

error LNK2019: unresolved external symbol _PARDISO@68 referenced in function "1"

I reference all of the MKL libs in Project B, for both platforms. I used the Intel Link Line Advisor.

Question: what am I missing?

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
759 Views

FIrst of all, this is not the MKL forum. Second, it looks as if you have built your project with /iface:cvf or other options that change the default calling convention to STDCALL. If I recall correctly, MKL dropped its "CVF-compatible" STDCALL library years ago.

Look over your project options and change Fortran > External Procedures > Calling Convention to Default.

View solution in original post

3 Replies
Steve_Lionel
Honored Contributor III
760 Views

FIrst of all, this is not the MKL forum. Second, it looks as if you have built your project with /iface:cvf or other options that change the default calling convention to STDCALL. If I recall correctly, MKL dropped its "CVF-compatible" STDCALL library years ago.

Look over your project options and change Fortran > External Procedures > Calling Convention to Default.

StephaneSES
Novice
757 Views

Hello Steve,

 

thank you for your answer. Sorry if I haven't posted my question in the right place. The Intel Fortran Compiler is giving me this error when linking, so I thought this would be the correct place, although the problem is indeed with Intel MKL.

 

And you are of course right about the calling convention issue. Setting it to default, the linker error is gone. Should it be set to default for the 64-bit platform as well? What is the general guideline about this? Where could I learn more about it?

 

Thank you,

Stephane

0 Kudos
Steve_Lionel
Honored Contributor III
722 Views

I would recommend Default always. You don't see the problem on 64-bit because there is no STDCALL convention there. If you find you need to call a procedure with a different convention, declare it with an interface block and use the !DEC$ ATTRIBUTES directive. But typically you will not need this, especially with the Fortran 2003 (and 2018) C interoperability features.

People would use the CVF convention when they were calling 32-bit libraries built to be linked with Compaq Visual Fortran. Intel Fortran, which superseded CVF, chose to switch to the more common "C" convention.

0 Kudos
Reply