# mkl_get_dynamic

Returns current value of MKL_DYNAMIC variable.

## Syntax

Fortran:

ret = mkl_get_dynamic()

C:

int mkl_get_dynamic();

## Description

This function returns the current value of the MKL_DYNAMIC variable. This variable can be changed by manipulating the MKL_DYNAMIC environment variable before the MKL run is launched, or by calling mkl_set_dynamic(). Doing the latter has precedence over the former.

The function returns a value of 0 or 1. 1 indicates that MKL_DYNAMIC is true. 0 indicates that MKL_DYNAMIC is false. This variable indicates whether or not Intel MKL can dynamically change the number of threads. A value of false does not guarantee that the user’s requested number of threads will be used. But it means that Intel MKL will attempt to use that value. This routine takes precedence over the environment variable MKL_DYNAMIC.

Note that if MKL is called from within a parallel region, MKL may not thread unless MKL_DYNAMIC is set to false, either with the environment variable or by this routine call.

See Intel MKL User’s Guide for implementation details.

## Return Values

1

  Indicates MKL_DYNAMIC is true.

0

  Indicates MKL_DYNAMIC is false.

Parent topic: Threading Control Functions