Community
cancel
Showing results for 
Search instead for 
Did you mean: 
WSinc
New Contributor I
110 Views

How do I interface Math Kernel Library routines ?

Jump to solution

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
110 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

11 Replies
WSinc
New Contributor I
110 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 ?

 

WSinc
New Contributor I
110 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 ?

mecej4
Black Belt
110 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.

WSinc
New Contributor I
111 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

Steven_L_Intel1
Employee
110 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 

WSinc
New Contributor I
110 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 - - - - 

 

Steven_L_Intel1
Employee
110 Views

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

WSinc
New Contributor I
110 Views

That Worked ! ! !

Whoopie ! ! ! !

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

Maybe it should be, perhaps ?

Steven_L_Intel1
Employee
110 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.

Ying_H_Intel
Employee
110 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

Steven_L_Intel1
Employee
110 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.

Reply