Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
49 Views

How do I reference the MKL from Visual studio ?

I cannot figure out what INCLUDE or USE statements to put into my code

 

so it can call a BLAS routine. I want to solve a linear system.

 

I NORMALLY use Visual Studio for my program development and testing,

 

Is there a special trick needed ?

0 Kudos
10 Replies
Highlighted
Black Belt Retired Employee
49 Views

My recollection is that the install automatically adds the paths to MKL's library and include folders to the Fortran lists in Visual Studio. You would need to decide which set of MKL libraries you want to link to and name them on the Linker > Input property page. For more help with MKL, please ask in the Math Kernel Library forum.

0 Kudos
Highlighted
New Contributor I
49 Views

It still wont attach any of the MKL routines.

I looked at all the drop down menus, but cannot find anything about the LINKER option you mentioned.

 

Is that available from the Visual Studio IDE ? Maybe not ? Which menu ?

 

Using the routine is no problem, if I can attach to it.

0 Kudos
Highlighted
Black Belt Retired Employee
49 Views

Please be precise with your problem description. "wont attach any MKL routines" is rather ambiguous. Show exactly what you are doing and exactly (and completely) any error messages.

Screenshot_1.jpg

You may find the property Fortran > Libraries > Use Intel Math Kernel Library also of use, though it may not do everything you want, which is why I suggested naming the desired libraries. 

0 Kudos
Highlighted
New Contributor I
49 Views

here is the program I want to run (greatly simplified):

    program linsol
    parameter n=10
    real(8) A(n,n),B(n)   
    call dgesv( n, nrhs, a, n, ipiv, b, n, info )
    end

It keeps telling me that DGESV cannot be found. That is one of the MKL routines.

I did not see the option to include the MKL library under project properties: "Fortran."

 

I dont see "LINKER" under project properties, just "General" and "Fortran."

 

Is it because I am using an earlier version of Visual studio ?

 

I would be happy to let someone get on my computer and look around, will pay for that.

 

0 Kudos
Highlighted
New Contributor I
49 Views

BTW, I tried using a later version of Visual Studio (2017) which I am licensed for -

but it wont let me add any Fortran source files. It shuts out any use of Fortran source code.

So is this the wrong version of Visual studio?

 

What should I be getting, then ?

 

It appears that I am seeing a different set of properties AFTER I have opened the project for awhile,

than what I see when I FIRST open it. so that only adds to the confusion.

0 Kudos
Highlighted
Black Belt Retired Employee
49 Views

See your other thread for my comments on VS2017.

0 Kudos
Highlighted
New Contributor I
49 Views

I went back to an earlier verrsion of Visual Studio (2010), which brings in source code with no problem.

But it still cannot attach any of the MATH KERNEL LIBRARY routines.

 

Didnt it use to do that by default ?

It cant anymore, for some reason.

 

The LINKER option does not exist, at least not for me. There are no default libraries.

 

Can I get paid support somewhere ? The forum people cant seem to answer this question.

0 Kudos
Highlighted
Black Belt
49 Views

I do not have VS2010 (which is rather old) on this PC, and according to the release notes, Parallel Studio 2018 is not compatible with VS2010 (see  https://software.intel.com/sites/default/files/managed/d6/99/IPSXE_2018_Update_3_Release_Notes.pdf ;).  

I have VS2015 Community (Version 14.0.25431.01 Update 3), and here is the screenshot of the window where one specifies (as Steve mentioned in #4) that MKL is to be used in that version of Visual Studio in combination with Parallel Studio 2018 Update 2.

The impression that I have is that the menus in different versions of Visual Studio can be different, and one has to poke around and find something that seems right -- I am only an occasional user of Visual Studio.

 

0 Kudos
Highlighted
New Contributor I
49 Views

OK, I will try that -

Is that version you have of Visual studio still available somewhere?

Hey if it works, i will be happy to down that - - - -

 

Getting kinda desperate here.

0 Kudos
Highlighted
Black Belt
49 Views

Older versions of Visual Studio are available at https://visualstudio.microsoft.com/vs/older-downloads/; you will need a Microsoft account with which to log in (such as an Outlook e-mail account, a Skype account, etc.). I suggest VS2015 community, unless you have a license for a different edition.

0 Kudos