x06ajc, for multithreaded implementations, sets the maximum number of nested active parallel regions to
num.
When
num 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
num 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 Chapter Introduction for a discussion of the behaviour of these functions when called in serial.
Not applicable.
None.
In this example we presume a multithreaded implementation of the NAG Library.
We first show the default behaviour for nested active parallel regions of the implementation being used. We have a counter inside a nested parallel region which is incremented by each thread and whose final value is the number of threads in the nested parallel region multiplied by the number of threads in the outer parallel region. Thus showing whether the nested region is active or not.
If you use a serial implementation of the NAG Library, regardless of whether the code is compiled with OpenMP or not, calling x06ajc has no effect. The appropriate result file will be included with the distribution material for your implementation.
None.