omp_set_max_active_levels

Purpose

Sets the value of the max-active-levels-var internal control variable to the value in the argument. If the number of parallel levels requested exceeds the number of the supported levels of parallelism, the value of max-active-levels-var is set to the number of parallel levels supported by the run time. If the number of parallel levels requested is not a positive integer, this routine call is ignored.

When nested parallelism is turned off, this routine has no effect and the value of max-active-levels-var remains 1. max-active-levels-var can also be set with the OMP_MAX_ACTIVE_LEVELS environment variable. To retrieve the value for max-active-levels-var, use the omp_get_max_active_levels function.

Use omp_set_max_active_levels only in serial regions of a program. This routine has no effect in parallel regions of a program.

Prototype

void omp_set_max_active_levels(int max_levels);

Parameter

max_levels
An integer that specifies the maximum number of nested, active parallel regions.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us