MKL_DYNAMIC
The
to dynamically change the number of threads.
MKL_DYNAMIC
environment variable enables Intel® oneAPI Math Kernel Library
The
default value of
MKL_DYNAMIC
is
TRUE
, regardless of
OMP_DYNAMIC
, whose
default value may be
FALSE
.
When
may use fewer OpenMP threads than the maximum number you specify.
MKL_DYNAMIC
is
TRUE,
Intel® oneAPI Math Kernel Library
For
example,
MKL_DYNAMIC
set to
TRUE
enables optimal
choice of the number of threads in the following cases:
- If the requested number of threads exceeds the number of physical cores (perhaps because of using the Intel® Hyper-Threading Technology),scales down the number of OpenMP threads to the number of physical cores.Intel® oneAPI Math Kernel Library
- If you are able to detect the presence of a message-passing interface (MPI), but cannot determine whether it has been called in a thread-safe mode,runs one OpenMP thread.Intel® oneAPI Math Kernel Library
When
uses the suggested number of OpenMP threads whenever the underlying algorithms permit.For
example, if you attempt to do a size one matrix-matrix multiply across eight
threads, the library may instead choose to use only one thread because it is
impractical to use eight threads in this event.
MKL_DYNAMIC
is
FALSE
, Intel® oneAPI Math Kernel Library
If is called from an OpenMP parallel region in your program, uses only one thread by default. If you want to go parallel in such a call, link your program against an OpenMP threading RTL supported by and set the environment variables:
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
- OMP_NESTEDtoTRUE
- OMP_DYNAMICandMKL_DYNAMICtoFALSE
- MKL_NUM_THREADSto some reasonable value
With these settings, uses
Intel® oneAPI Math Kernel Library
MKL_NUM_THREADS
threads when it is called from the
OpenMP parallel region in your program.
In
general, set
is unable to detect, for example, to use nested parallelism where the library is already called from a parallel section.
MKL_DYNAMIC
to
FALSE
only under circumstances that Intel® oneAPI Math Kernel Library
Product and Performance Information
|
---|
Performance varies by use, configuration and other factors. Learn more at
www.Intel.com/PerformanceIndex.
Notice revision #20201201
|