The function omp_set_dynamic is one of the two ways to enable / disable dynamic adjustment. The other one is the environment variable OMP_DYNAMIC. Dynamic adjustment is the feature that allows the runtime system to provide fewer threads than requested for a parallel region. In codes with recursively nested parallel regions for instance, the total number of threads to spawn may generate a high oversubscription, dynamic adjustement allows the runtime system to handle that growth. One can check if dynamic adjustment is enabled or disabled using the function omp_get_dynamic.
void omp_set_dynamic(int state);