Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

mkl_get_dynamic

Determines whether
Intel® oneAPI Math Kernel Library
is enabled to dynamically change the number of OpenMP* threads.

Syntax

int mkl_get_dynamic
(
void
)
;
Include Files
  • mkl.h
Description
This function returns the status of dynamic adjustment of the number of OpenMP* threads. To determine this status, the function inspects the return value of the following function call and if it is undefined, inspects the environment setting below:
Dynamic adjustment of the number of threads is enabled by default.
The dynamic adjustment works as follows. Suppose that the mkl_get_max_threads function returns the number of threads equal to
N
. If dynamic adjustment is enabled,
Intel® oneAPI Math Kernel Library
may request up to
N
threads, depending on the size of the problem. If dynamic adjustment is disabled,
Intel® oneAPI Math Kernel Library
requests exactly
N
threads for internal parallel regions (provided it uses a threaded algorithm with at least
N
computations that can be done in parallel). However, the OpenMP* run-time library may be configured to supply fewer threads than
Intel® oneAPI Math Kernel Library
requests, depending on the OpenMP* setting of dynamic adjustment.
Return Values
Name
Type
Description
ret
int
0 - Dynamic adjustment of the number of threads is disabled.
1 - Dynamic adjustment of the number of threads is enabled.

Example

#include "mkl.h" … int nt = mkl_get_max_threads(); if (1 == mkl_get_dynamic()) printf("Intel MKL may use less than %i threads for a large problem", nt); else printf("Intel MKL should use %i threads for a large problem", nt);

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804