X06 Chapter Contents
X06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentX06ACF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

X06ACF returns an upper bound on the number of threads used for subsequent OpenMP parallel regions.

## 2  Specification

 FUNCTION X06ACF ( )
 INTEGER X06ACF

## 3  Description

X06ACF, for multi-threaded implementations, returns the number of the threads to be requested for subsequent parallel regions. The value is the first element of the list held by the OpenMP Internal Control Variable (ICV) used in determining the number of threads. See Users' Note for your implementation for details of the scope of this routine.
The number of threads used in parallel regions will be equal to, or less than, the first value of the ICV. The actual number of threads used is dependent on several factors, such as the presence of a num_threads clause on the parallel directive or the number of threads already in use by the program. Please refer to Section 4 for a full description of how the number of threads is chosen for a particular parallel region.
In serial implementations of the NAG Library this routine will always return $1$. See the X06 Chapter Introduction for a discussion of the behaviour of these routines when called in serial.

## 4  References

OpenMP Specifications http://openmp.org/wp/OpenMP-Specifications
Chapman B, Jost G and van der Pas R (2008) Using OpenMP Portable Shared Memory Parallel Programming The MIT Press

None.

None.

Not applicable.

## 8  Parallelism and Performance

X06ACF is not threaded in any implementation.