Sun Studio 12 Update 1: OpenMP API User's Guide

3.7.3 omp_get_max_active_levels

omp_get_max_active_levels() can be called from anywhere in the program. The call will return the value of the max-active-levels-var internal control variable.