Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

Programming with MKL?

Last post 07-15-2008, 4:33 PM by MAD\trosenqu. 4 replies.
Sort Posts: Previous Next
 07-12-2008, 8:28 PM 30258974  

Programming with MKL?

Questions:

  First : If  I have installed MKL 10.0, There is no need for me to use IMSL, is that right?

 Second :  I want to use MKL to solve a linear equation A*x=b,  and this is a general one.  My operation environment is: Windows XP, VS2005 plus Intel Fortran 10.1 plus MKL, and I follow the procedure to configure:

 1 Select Project>Properties>Linker>General

 2 For Additional Library Directories, add the architecture-specific ' lib'  folder,

 3 Select Project>Properties>Linker>Input

 4 In the Additional Dependencies line, insert  mkl_c.lib libguide.lib

5  Select Project>Properties>Fortran>General

6 For Additional Include Directories, add the ' include ' folder

 Is the above procedure right?  Do i need to ' include '  something at the top of my codes? What should it be?

 Thank you for your kind attention!

 

 
 07-13-2008, 4:09 AM 30258979 in reply to 30258974  

Re: Programming with MKL?

This thread might help you with choice of includes: http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30257642.aspx

If you followed the visual studio setup steps in the user guide, I would think that you have the correct references (I’m doing this from memory as I don’t have VS on my phone ... ‘yet’ :P ). If not, then try:

#include "mkl.h"

I would think that you should be able to do everything you need using the mkl. With a reference manual over 3200 pages long I would hope so! :)

FYI: it is the base numerical library for Matlab and the GMP MP libraries that the MKL also includes is the base of Maple (Trust me; you don’t want to try and get the original GMP library compiled for windows from the original source @ http://gmplib.org/). The latter is super useful for pure math as you would do on paper as well as applications such as low level database engines and cryptography.

If you goal is to consume the mkl from MS .Net framework then I would suggest you check out centerspace.net as it wraps the mkl and will make you life ‘very’ easy! (You would only need the core components I would expect) :)

If you want better raw performance than the centerspace mkl wrappers, your only choice is to directly code against the mkl using c, c++, or c++/cli. With the latter; pinning pointer will be your new best friend!  I’m not a FORTRAN user, so my suggestions on that side will be limited as you can probably guess from my previous suggestion of using a ‘c’ variant.

I’m using vs2008 so it’s slightly different. To get started, there is a better version of the manual in the beta of the next version: http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30255857.aspx

My suggestion would be to subscribe to the beta and install it for the userguide in the /doc folder as it has more info for visual studio users. You can then copy said pdf and uninstall the beta.

Make sure that you package the ‘vc++ redistributable’ (if you use C/C++) for any deployment scenarios (visual studio installs this for you and it will save a lot of tears trying to get it to work on a machine without it).



Ben
 
 07-13-2008, 6:22 AM 30258980 in reply to 30258979  

Re: Programming with MKL?

You haven't indicated any requirement for IMSL in your usage; unless you require special IMSL functions, I think we would recommend using MKL directly.

mkl.h is a C include file.  Much of bentomkins advice appears to be predicated on the assumption you will use C++.

For Fortran 77, there are optional include files (for checking call syntax).   For the Fortran 95 interface, the corresponding USE modules from the Fortran include directory are required.
 
 07-14-2008, 2:11 AM 30259020 in reply to 30258979  

Re: Programming with MKL?

Thank you very much! I use Fortran to code.
 
 07-15-2008, 4:33 PM 30259215 in reply to 30259020  

Re: Programming with MKL?

Ben! Thanks for the wealth of information.

liubing84:
As to what you should put at the top of your code, there are many example programs in the examples directory of MKL. Perusing the source files might prove helpful.

Todd
 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...