omp_set_nested(enable_expr)

Purpose

The omp_set_nested subroutine enables or disables nested parallelism.

If you call the subroutine with a scalar_logical_expression that evaluates to .FALSE., nested parallelism is disabled. Nested parallel regions are serialized, and they are executed by the current thread. This is the default setting.

If you call the subroutine with a scalar_logical_expression that evaluates to .TRUE., nested parallelism is enabled. Parallel regions that are nested can deploy additional threads to the team. It is up to the run-time environment to determine whether additional threads should be deployed. Therefore, the number of threads used to execute parallel regions may vary from one nested region to the next.

This subroutine takes precedence over the OMP_NESTED environment variable.

Class

Subroutine.

Argument Type and Attributes

enable_expr
Logical.

Result Type and Attributes

Default logical.

Result Value

None. IBM Copyright 2003