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

No way to reference LAPACK math routines from Visual Studio ?

WSinc
New Contributor I
348 Views

I was told that saying USE MKL libraries is apparently not enough.

Had to reference another set of libraries from Fortran 95 programs.

But I looked in the project properties under Fortran --> Libraries

and could NOT reference any additional libraries besides those.

Apparently, saying USE MKL only points to the Fortran 77 routines,

but does not point to the Fortran 95 routines.

Are those separate routines, or do they just provide an interface

to the F77 routines?

Just wondering if I have to abandon VS entrirely, since no one

has really shown me how to do it from within that environment.....

I could not upload the buildlog.htm, apparently you

do not allow that type of file.

I wanted you to see what kind of errors it generates.

I will try the "messy": interface, see if that can work.....

0 Kudos
7 Replies
WSinc
New Contributor I
348 Views

Had to make the buildlog into a text file,

Here is what it says:

Deleting intermediate files and output files for project 'test14', configuration 'Debug|Win32'. Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [IA-32]... ifort /nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:bounds /check:stack /libs:qwin /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,"C:\Program Files\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\\bin" "D:\William Data\My Documents\Visual Studio 2010\Projects\test14\test14a.f90" Linking... Link /OUT:"Debug\test14.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"d:\william data\my documents\visual studio 2010\Projects\test14\Debug\test14.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"d:\william data\my documents\visual studio 2010\Projects\test14\Debug\test14.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"d:\william data\my documents\visual studio 2010\Projects\test14\Debug\test14.lib" "Debug\test14a.obj" Link: executing 'link' test14a.obj : error LNK2019: unresolved external symbol _DGELS_F95 referenced in function _MAIN__ Debug\test14.exe : fatal error LNK1120: 1 unresolved externals test14 - 2 error(s), 0 warning(s)

0 Kudos
mecej4
Honored Contributor III
348 Views

Here is a small self contained Zip file of a VS project that builds the GELS example from the MKL included with IVF 13.0.1.119. In order to run in VS, I have modified the program to read from the named data file instead of redirecting the file to STDIN, and added PAUSE at the end of the program. Secondly, I added a directive in the source code to link against the MKL_LAPACK95 library.

Unzip into a suitable location, open the solution, build and run.

0 Kudos
WSinc
New Contributor I
348 Views

I looked at all the references to the math libraries, and there is a lot of useful

information, abot Fortran 95 calls, but none of it pertains to calling these routines from a Visual Studio

environment. So I am surmising that they never intended them to be used from there.

Now one would think that if Visual Studio knows it's using a Fortran 95 compiler, it should set

up the library references to be consistent with that. But apparently it was never tested

for that particular instance - at least that's how it appears.

We need an article covering this topic in detail.

0 Kudos
WSinc
New Contributor I
348 Views

I downloaded your test case, and it did run.

I was able to convert the data type to REAL*8 and it ran there also.

Apparently the steps needed to make it work from the VS environment

are much more complicated than the documentation suggests.

But like I said earlier, they really don't go into the VS interface at all.

0 Kudos
Gennady_F_Intel
Moderator
348 Views

Do you check the MKL User's guide "Creating, Configuring, and Running the Intel Visual Fortran Project" ?

is this information not enogh to start working with VS environment? 

0 Kudos
WSinc
New Contributor I
348 Views

No, but I did find a 17 page article about

"Configiring Visual Studio to run with Intel Math Kernel Library"

Very specific information and very compilcated - but interestingly enough

they don't do anything like I saw in the test case MECEJ4 sent me.

Guess there's more than one way to skin a beaver.

0 Kudos
WSinc
New Contributor I
348 Views

I did find a very good article called:

"Developing an Intel MKL based application in Microsoft Visual Studio - a beginner's guide"

Has all the spefiic info I would have LOVED to have earlier.

0 Kudos
Reply