NAG FL Interface
x06ahf (get_​nested)

1 Purpose

x06ahf returns 1 if nested OpenMP parallelism has been enabled, and 0 otherwise.

2 Specification

Fortran Interface
Function x06ahf ( )
Integer :: x06ahf
C Header Interface
#include <nag.h>
Integer  x06ahf_ ()
The routine may be called by the names x06ahf or nagf_omp_get_nested.

3 Description

x06ahf, for multithreaded implementations, tests whether the nesting of OpenMP parallel regions has been enabled as if with a call to x06agf. The return value will be 1 if nesting is enabled or 0 if it is disabled.
Note the equivalent OpenMP routine omp_get_nested() returns a logical value.
In serial implementations of the NAG Library x06ahf will always return 0. See the X06 Chapter Introduction for a discussion of the behaviour of these routines when called in serial.

4 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

5 Arguments


6 Error Indicators and Warnings


7 Accuracy

Not applicable.

8 Parallelism and Performance

x06ahf is not threaded in any implementation.

9 Further Comments


10 Example

See Section 10 in x06agf for a demonstration of how to use x06ahf.