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

How do I interface Math Kernel Library routines ?

WSinc
New Contributor I
794 Views

I looked at the documentation, but the INCLUDE file they say to use does not work.

INCLUDE "mkl_lapack.fi" is what they give there.

It still cannot find the entry point to the MKL routine I want to use.

Would be nice to provide at least ONE WORKING example, but the documentation does not

clearly spell out how to find those.

0 Kudos
1 Solution
WSinc
New Contributor I
794 Views

That page does nothing at all -

When I click on those links NOTHING happens......

Can I get some help on this ?

 

The documentation is a god-awful confused mess,

and is no help for vS users.

View solution in original post

0 Kudos
11 Replies
WSinc
New Contributor I
794 Views

Are the routines downloaded into my current library directory on my P C ?

 

The example have a USE statement, but I get an error #7002 when I try to use that.

 

Do we have an example that works ?

 

0 Kudos
WSinc
New Contributor I
794 Views

I looked at the fortran examples where they actually CALL the routine, but NONE OF THEM give a clue about

any USE or INCLUDE statement that I have to put into my source code, to find the entry point in the LAPACK library.

So, how do I connect my CODE to the LAPACK routines ?

0 Kudos
mecej4
Honored Contributor III
794 Views

Go through the instructions in https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-2017-getting-started step-by-step. That may help.

If you build from the command line, all that you have to do is to add /Qmkl as an option to the compiler. 

If you build from within Visual Studio, you have to specify that your project requires the use of MKL. Details of this are in the documentation.

0 Kudos
WSinc
New Contributor I
795 Views

That page does nothing at all -

When I click on those links NOTHING happens......

Can I get some help on this ?

 

The documentation is a god-awful confused mess,

and is no help for vS users.

0 Kudos
Steven_L_Intel1
Employee
794 Views

The INCLUDE 'mkl_lapack.fi' just declares the LAPACK routines. You also need to specify which set of MKL libraries you want to use.

You're right that the links on that page don't work. They're supposed to be going to sections further down the page, so just scroll down.

You may find https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation/ to be of more use, and specifically, https://software.intel.com/en-us/mkl-for-windows-userguide 

0 Kudos
WSinc
New Contributor I
794 Views

Well, I looked at those examples a couple of days ago, but they dont compile.

I get error #7002 for both USE statements.

USE f95_precision, ONLY: WP => SP
USE lapack95, ONLY: GESV

So, what are the correct USE statements ?

Apparently, the documenation does not have a clue - - - - 

 

0 Kudos
Steven_L_Intel1
Employee
794 Views

Right click on your project, select Properties. Go to Fortran > Libraries. Set "Use Intel Math Kernel Library" to "Parallel".

0 Kudos
WSinc
New Contributor I
794 Views

That Worked ! ! !

Whoopie ! ! ! !

Now, is that step mentioned in the startup user docs ?

Maybe it should be, perhaps ?

0 Kudos
Steven_L_Intel1
Employee
794 Views

I agree with you that the MKL documentation leave a lot to be desired in this area. I had a look at the section that should be the most appropriate, Configuring Intel® Visual Fortran to Link with Intel MKL, but it contained out-of-date, incomplete and incorrect information. I'll suggest to the MKL team that this be improved.

I'll also note that the path to the  MKL DLLs are not added to the system PATH environment variable by default, so you'll need to do that yourself. I can't locate instructions in the MKL documentation for that - I'll add them here in the morning.

0 Kudos
Ying_H_Intel
Employee
794 Views

Dear all, 

Thanks for the discussion here.  Right, we will improve them, 

the MKL developer guide have the section Configuring the Microsoft Visual C/C++* Development System to Link with Intel® MKL  and only one discription :  If you installed the integration component, see Automatically Linking Your Intel® Visual Fortran Project with Intel® MKL.

Seems image illustration may help.  

I modified one on-line article, which as complement of MKL documentation: 

https://software.intel.com/en-us/how-to-build-mkl-application-in-intel-visual-fotran-msvs

for your reference. 

Best Regards,

Ying

0 Kudos
Steven_L_Intel1
Employee
794 Views

To add the MKL DLLs to path, add the following strings to the system environment variable PATH:

%IFORT_COMPILER17%redist\intel64_win\mkl;%IFORT_COMPILER17%redist\ia32_win\mkl;

If your compiler version is not 17, adjust accordingly. For some reason, the MKLROOT environment variable didn't get updated with Update 1 - not sure why that is.

0 Kudos
Reply