# mkl_set_dynamic

Enables Intel MKL to dynamically change the number of threads.

## Syntax

Fortran:

call mkl_set_dynamic( boolean_var )

C:

void mkl_set_dynamic( int boolean_var );

## Input Parameters

Name | Type | Description
--- | --- | ---
boolean_var | FORTRAN: INTEGER C: int | The parameter that determines whether dynamic adjustment of the number of threads is enabled or disabled.

## Description

This function indicates whether or not Intel MKL can dynamically change the number of threads. The default for this is true, regardless of how the OMP_DYNAMIC variable is set. This will also hold precedent over the OMP_DYNAMIC variable.

A value of false does not guarantee that the user’s requested number of threads will be used. But it means that 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.

Parent topic: Threading Control Functions