omp_set_max_active_levels (GNU libgomp)

#### 3.1.15 `omp_set_max_active_levels` – Limits the number of active parallel regions ¶

Description:

  This function limits the maximum allowed number of nested, active parallel regions. max_levels must be less or equal to the value returned by `omp_get_supported_active_levels`.

C/C++

  Prototype: | `void omp_set_max_active_levels(int max_levels);`

Fortran:

  Interface: | `subroutine omp_set_max_active_levels(max_levels)`
  | `integer max_levels`

See also:

  `omp_get_max_active_levels` – Current maximum number of active regions, `omp_get_active_level` – Number of parallel regions, `omp_get_supported_active_levels` – Maximum number of active regions supported

Reference:

  OpenMP specification v4.5, Section 3.2.15.