# Support Functions

Intel® MKL support functions are used to:

- retrieve information about the current Intel MKL version

- additionally control the number of threads

- handle errors

- test characters and character strings for equality

- measure user time for a process and elapsed CPU time

- set and measure CPU frequency

- free memory allocated by Intel MKL memory management software

Functions described below are subdivided according to their purpose into the following groups:

Version Information Functions

Threading Control Functions

Error Handling Functions

Equality Test Functions

Timing Functions

Memory Functions

Table “Intel MKL Support Functions” contains the list of support functions common for Intel MKL.

Intel MKL Support Functions
Function Name | Operation
--- | ---
Version Information Functions
MKLGetVersion | Returns information about the active library version.
MKLGetVersionString | Returns information about the library version string.
Threading Control Functions
mkl_set_num_threads | Suggests the number of threads to use.
mkl_domain_set_num_threads | Suggests the number of threads for a particular function domain.
mkl_set_dynamic | Enables Intel MKL to dynamically change the number of threads.
mkl_get_max_threads | Inquires about the number of threads targeted for parallelism.
mkl_domain_get_max_threads | Inquires about the number of threads targeted for parallelism in different domains.
mkl_get_dynamic | Returns the current value of the MKL_DYNAMIC variable.
Error Handling Functions
xerbla | Handles error conditions for the BLAS, LAPACK, VML routines.
pxerbla | Handles error conditions for the ScaLAPACK routines.
Equality Test Functions
lsame | Tests two characters for equality regardless of the case.
lsamen | Tests two character strings for equality regardless of the case.
Timing Functions
second/dsecnd | Returns user time for a process.
getcpuclocks | Returns full precision elapsed CPU clocks.
getcpufrequency | Returns CPU frequency value in GHz.
setcpufrequency | Sets CPU frequency value in GHz.
Memory Functions
MKL_FreeBuffers | Frees memory buffers.
MKL_MemStat | Reports an amount of memory utilized by MKL Memory Manager.
MKL_malloc | Allocates the aligned memory buffer.
MKL_free | Frees the aligned memory buffer allocated by MKL_malloc.