Visible to Intel only — GUID: GUID-25C06475-A097-4292-804C-F2F9A21AE5D9
Visible to Intel only — GUID: GUID-25C06475-A097-4292-804C-F2F9A21AE5D9
mkl_domain_get_max_threads
Gets the number of OpenMP* threads targeted for parallelism for a particular function domain.
nt = mkl_domain_get_max_threads( domain )
- Include file: mkl.fi
- Module (compiled): mkl_service.mod
- Module (source): mkl_service.f90
Name |
Type |
Description |
---|---|---|
domain |
INTEGER |
The named constant that defines the targeted domain. |
Computational functions of the Intel® oneAPI Math Kernel Library function domain defined by thedomain parameter use the value returned by this function as a limit of the number of OpenMP threads they should request for parallel computations. The mkl_domain_get_max_threads function returns the thread-local number of threads or, if that value is zero or not set, the global number of threads. To determine this number, the function inspects the environment settings and return values of the function calls below in the order they are listed until it finds a non-zero value:
A call to mkl_set_num_threads_local
The last of the calls to mkl_set_num_threads or mkl_domain_set_num_threads( …, MKL_DOMAIN_ALL)
A call to mkl_domain_set_num_threads( …, domain)
The MKL_DOMAIN_NUM_THREADS environment variable with the MKL_DOMAIN_ALL tag
The MKL_DOMAIN_NUM_THREADS environment variable (with the specific domain tag)
The MKL_NUM_THREADS environment variable
A call to omp_set_num_threads
The OMP_NUM_THREADS environment variable
Actual number of threads used by the Intel® oneAPI Math Kernel Library computational functions may vary depending on the problem size and on whether dynamic adjustment of the number of threads is enabled (see the description ofmkl_set_dynamic). For a list of supported values of the domain argument, see Table "Intel MKL Function Domains".
Name |
Type |
Description |
---|---|---|
nt |
INTEGER*4 |
The maximum number of threads for Intel® oneAPI Math Kernel Library functions from a given domain to use in internal parallel regions. If an invalid value of domain is supplied, the function returns the number of threads for MKL_DOMAIN_ALL |
use mkl_service … if (1 < mkl_domain_get_max_threads(MKL_DOMAIN_BLAS)) then print *, "Intel MKL BLAS functions employ threading" end if