Verbose Mode Supported in Intel® MKL 11.2

Introduction:

We Introduced a special verbose mode support feature in the latest Intel® Math Kernel Library (MKL) 11.2 or BLAS and LAPACK domains.This feature enables developers to better understand Intel MKL function usage in their programs. Verbose mode support provides the ability to extract information related to the version of Intel MKL used, the Intel MKL functions called and the parameters passed to them, and the amount of time spent in each function call

Using Intel® MKL Verbose Mode

To enable the Intel MKL Verbose mode for an application, do one of the following:

•  Set the environment variable MKL_VERBOSE  to 1.

•  Call the support function mkl_verbose(1).

By default the verbose mode is disabled. When it is on, every call of a verbose-enabled function finishes with printing verbose log, including the list of version Information, the name of function, values of the arguments, time taken by the function and others.

Example

The following is an example of calling MKL dgemm() function in C. (Please see the source code in MKL User Guide )

 The version information line:

MKL_VERBOSE Intel(R) MKL 11.2 build 20140312 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors, Lnx 2.70GHz lp64 intel_thread NMICDev:0

The information indicates that the current MKL version is 11.2 , the type of processor is Intel(R) AVX enabled , Operating System is Linux , CPU Frequency is 2.70GHz, it is using lp64 interface and thread MKL library,  and not using a Co Processor

And call description line:

MKL_VERBOSE DGEMM(N,N,1000,1000,1000,0x7fff10ff6560,0x7f9d09f20010,1000,0x7f9d0a6c2010,1000,0x7fff10ff6568,0x7f9d0977e010,1000) 15.79ms CNR:OFF Dyn:1 FastMM:1 TID:0  NThr:16 WDiv:HOST:+0.000

The line show, the program is using DGEMM with the input parameter: N,N,1000,1000,1000,0x7fff10ff6560,0x7f9d09f20010,1000,0x7f9d0a6c2010,1000,0x7fff10ff6568,0x7f9d0977e010,1000.  It takes 15.79ms. The environment MKL_CBWR is OFF and MKL_DYNAMIC and FastMemory Manager is on. The print thread ID is 0. And the total used 16 threads. Ignore the WDiv:HOST:+0.000 as it is for coprocessor.

Some Limitation

Because every call to a verbose-enabled function requires an output operation, the performance of the application may degrade with the verbose mode enabled.

Besides of this, MKL Verbose mode has the following limitations:

• Input values of parameters passed by reference are not printed if the values were changed by the function.

For example, if a LAPACK function is called with a workspace query, that is, the value of the lwork parameter equals -1 on input, the call description line prints the result of the query and not -1.

• Return values of functions are not printed.

For example, the value returned by the function ilaenv is not printed.

• Floating-point scalars passed by reference are not printed.

Please see the MKL user guide for more details about the verbose mode of MKL.

Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.