environment variable suggests the number of OpenMP threads for a particular function domain.
accepts a string value
, which must have the following format:
In the syntax above, values of
indicate function domains as follows:
For example, you could set the
environment variable to any of the following string variants, in this case, defining three specific domain variables internal to
The global variables
MKL_DOMAIN_ALL, MKL_DOMAIN_BLAS, MKL_DOMAIN_FFT, MKL_DOMAIN_VML,
, as well as the interface for the
threading control functions, can be found in the
This table illustrates how values of
Be aware that the domain-specific settings take precedence over the overall ones. For example, the "
" value of
suggests trying four OpenMP threads for BLAS, regardless of later setting
and a function call "
mkl_domain_set_num_threads ( 4, MKL_DOMAIN_BLAS );
" suggests the same, regardless of later calls to
However, a function call with input "
", such as "
mkl_domain_set_num_threads (4, MKL_DOMAIN_ALL);
" is equivalent to "
", and thus it will be overwritten by later calls to
. Similarly, the environment setting of
" will be overwritten with
environment variable enables you set several variables at once, for example,
, the corresponding function does not take string syntax. So, to do the same with the function calls, you may need to make several calls, which in this example are as follows: