- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure if this is the appropriate place to ask this but I am tired to searching the net.
I want to program in C and use the MKL on a linux system. Would anyone mind telling me the "best" way of doing this. Links to code examples and compiling and installing notes would make me extremely happy.
I have been trying to get CLAPACK and MKL to work together cannot figure out how to do it.
thanks in advance,
Heath
I want to program in C and use the MKL on a linux system. Would anyone mind telling me the "best" way of doing this. Links to code examples and compiling and installing notes would make me extremely happy.
I have been trying to get CLAPACK and MKL to work together cannot figure out how to do it.
thanks in advance,
Heath
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forgot to mention that I want to use the MKL LAPACK and code in C.
Heath
Heath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if you check this.
http://support.intel.com/support/performancetools/libraries/mkl/win/sb/cs-017282.htm
Intel MKL v6.0 with Microsoft* Visual C++* .NET (v7.0)
- Select View >> Solution Explorer (and make sure this window is active).
- Select Tools >> Options >> Projects >> VC++ Directories.
- In the drop down menu titled Show directories for:, select Include Files, and then type in the directory for the Intel MKL include files (e.g. default: C:Program FilesIntelMKL60include).
- In the drop down menu titled Show directories for:, select Library Files, and then type in the directory for the Intel MKL library files (e.g. default: C:Program FilesIntelMKL60ia32lib).
- In the drop down menu titled Show directories for:, select Executable Files, and then type in the directory for the Intel MKL executable files (e.g. default: C:Program FilesIntelMKL60ia32in).
- On the main toolbar select Project >> Properties >> Linker >> Input and in the "Additional Dependencies" line, add the libraries you require (e.g. mkl_c.lib).
Intel MKL v6.0 with Microsoft* Visual C++* (v6.0)
In Project Settings, add the location (path) of Intel MKL sub-library in the link properties, for example, in Microsoft* Visual Studio* / Microsoft Visual C++ (v6.0):
- Select Project >> Settings.
- Select the Link tab.
- In the Category drop-down menu, select Input.
- In the Object/library modules section add mkl_c.lib or mkl_s.lib for static cdecl or CVF (respectively) interface libraries (mkl_c_dll, mkl_s_dll for dynamic interface libraries). The other libraries (LAPACK, BLAS, etc.) are identified as default libraries within the interface library and cause the linker to automatically link appropriately. The processor type is determined at runtime.
- You must also add the library path to the location of these libraries. In the Additional library path section, add the location of the Intel MKL sub-libraries. For example, on an IA32 system, you would add C:Program FilesintelMKL60ia32lib (for the default install location).
Intel MKL v5.2 with Microsoft* Visual C++* (v6.0)
In Project Settings, add the location (path) of Intel MKL sub-library in the link properties, for example, in Microsoft Visual Studio / Microsoft Visual C++ (V6.0) with Intel MKL V5.2:
- Select Project >> Settings.
- Select the Link tab.
- In the Category drop-down menu, select Input.
- In the Object/library modules section add mkl_c.lib or mkl_s.lib, as well as mkl_def.lib, mkl_p3.lib, mkl_p4.lib or mkl_itp.lib for tar
get processor default (Pentium, Pentium Pro, Pentium II), Intel Pentium III processor, Intel Pentium 4 processor, or Itanium processor.
Note: If you need LAPACK support you must also add mkl_lapack library. - You must also add the library path to the location of these libraries. In the Additional library path section, add the location of the Intel MKL sub-libraries. For example, on an IA32 system, you would add C:Program FilesintelMKLia32lib (for the default install location).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use Linux (with either the gcc or icc compilers) not windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Heath,
LAPACK defines a Fortran interface so you have to pay attention to a few details when calling LAPACK functions from a C program:
- Fortran is call-by-reference, C is call-by-value
- Fortran uses column-major ordering, C is row-major
- For best performance,array datapassed to LAPACK must be contiguous in memory.
To compile and link,just include the mkl.h header in your program and link the following libraries:
-lmkl -lmkl_lapack -lvml -lguide -lpthread
Best regards,
Henry

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page