set_nested enables or disables nested OpenMP parallelism.

Deprecated since version set_nested will be removed in naginterfaces Please use set_max_active_levels() instead. See also the Replacement Calls document.

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


If , nesting of OpenMP parallel regions is disabled, otherwise it is enabled.


set_nested, for multithreaded implementations, enables or disables the nesting of OpenMP parallel regions by setting an OpenMP Internal Control Variable (ICV) and any vendor library specific options where that is possible.

Nesting is disabled by default in OpenMP.

In serial implementations of the NAG Library set_nested has no effect. See the submodule omp for a discussion of the behaviour of these functions when called in serial.


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