intel MKL的安装和使用

时间:2021-08-30 04:16:46

来源于官方文档地址:https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation/
Intel MKL provides comprehensive functionality support in these major areas of computation:
• BLAS (level 1, 2, and 3) and LAPACK linear algebra routines, offering vector, vector-matrix, and matrixmatrix operations.
• Intel MKL PARDISO (a direct sparse solver based on Parallel Direct Sparse Solver PARDISO*), an iterative sparse solver, and supporting sparse BLAS (level 1, 2, and 3) routines for solving sparse systems of equations, as well as a distributed version of Intel MKL PARDISO solver provided for use on clusters.
• Vector Mathematics (VM) routines for optimized mathematical operations on vectors.
• Vector Statistics (VS) routines, which offer high-performance vectorized random number generators (RNG) for several probability distributions, convolution and correlation routines, and summary statistics functions.
• Data Fitting Library, which provides capabilities for spline-based approximation of functions, derivatives and integrals of functions, and search.
• Deep Neural Network (DNN) primitive functions with C language interface.
很丰富的支持。

intel MKL的安装和使用

get started

After installing the Intel® Math Kernel Library (Intel® MKL), verify that the library is properly installed and configured:
1. Intel MKL installs in the directory. Check that the subdirectory of referred to as was created. Check that subdirectories for Intel MKL redistributable DLLs redist\ia32_win\mkl and redist \intel64_win\mkl were created in the directory (See redist.txt in the Intel MKL documentation directory for a list of files that can be redistributed.)
2. If you want to keep multiple versions of Intel MKL installed on your system, update your build scripts to point to the correct Intel MKL version.
3. Check that the mklvars.bat file appears in the \bin directory. Use this file to assign Intel MKL-specific values to several environment variables, as explained in Scripts to Set Environment Variables Setting Environment Variables .
4. To understand how the Intel MKL directories are structured, see Structure of the Intel® Math Kernel Library.
5. To make sure that Intel MKL runs on your system, launch an Intel MKL example, as explained in Using Code Examples.

配置环境变量

intel MKL的安装和使用

运行范例

The Intel MKL package includes code examples, located in the examples subdirectory of the installation directory. Use the examples to determine:
• Whether Intel MKL is working on your system
• How you should call the library

intel MKL的安装和使用

intel MKL的安装和使用

Automatically Linking Your Microsoft Visual C/C++* Project with Intel® MKL

Configure your Microsoft Visual C/C++* project for automatic linking with Intel MKL as follows: 1. Go to Project>Properties>Configuration Properties>Intel Performance Libraries.
2. Change the Use MKL property setting by selecting Parallel, Sequential, or Cluster as appropriate. Specific Intel MKL libraries that link with your application may depend on more project settings. For details, see the documentation for Intel®Parallel Studio XE Composer Edition for C++.

Using the Single Dynamic Library

You can simplify your link line through the use of the Intel MKL Single Dynamic Library (SDL).
To use SDL, place mkl_rt.lib on your link line.
For example: icl.exe application.c mkl_rt.lib

mkl_rt.lib is the import library for mkl_rt.dll.
SDL enables you to select the interface and threading library for Intel MKL at run time. By default, linking with SDL provides:
• Intel LP64 interface on systems based on the Intel® 64 architecture
• Intel threading To use other interfaces or change threading preferences, including use of the sequential version of Intel MKL, you need to specify your choices using functions or environment variables as explained in section Dynamically Selecting the Interface and Threading Layer.

getting help and support

Intel provides a support web site that contains a rich repository of self help information, including getting started tips, known product issues, product errata, license information, user forums, and more. Visit the Intel MKL support website at http://www.intel.com/software/products/support/. You can get context-sensitive help when editing your code in the Microsoft Visual Studio* integrated development environment (IDE). See Getting Assistance for Programming in the Microsoft Visual Studio* IDE for details.