Returns the maximum number of OpenMP threads available to a program.
INTEGER FUNCTION OMP_GET_THREAD_LIMIT
#include <omp.h> int omp_get_thread_limit (void)
Also see the OMP_THREAD_LIMIT environment variable.