naginterfaces.library.omp.set_​max_​active_​levels

naginterfaces.library.omp.set_max_active_levels(num)[source]

set_max_active_levels sets the number of nested active parallel regions.

For full information please refer to the NAG Library document for x06aj

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/x06/x06ajf.html

Parameters
numint

, the number of active parallel regions allowed.

If

parallelism is disabled.

If

the outermost parallel region is active and nested regions are inactive (i.e., no new threads are created when entering the nested parallel region and it is executed in serial.)

If

parallel regions can be active and nested regions can be active.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

Notes

set_max_active_levels, for multithreaded implementations, sets the maximum number of nested active parallel regions to .

When is set to zero parallelism is disabled, if set to one then only the outermost parallel region is active and nested regions are inactive (i.e., no new threads are created when entering the nested parallel region and it is executed in serial.) If is set to , where then parallel regions can be active and nested regions can be active.

In serial implementations of the NAG Library this function has no effect. See the X06 Introduction for a discussion of the behaviour of these functions when called in serial.

References

The OpenMP API Specification for Parallel Programming

Chapman, B, Jost, G and van der Pas, R, 2008, Using OpenMP Portable Shared Memory Parallel Programming, The MIT Press