Use OMP_THREAD_LIMIT to set the thread-limit-var internal control variable. thread-limit-var is used to indicate the number of OpenMP threads to be used for the whole program. The function omp_get_thread_limit can be used to retrieve this value at run time. The value for OMP_THREAD_LIMIT is a positive integer. If a value is chosen that is more than the number of threads that can be supported or is not a positive integer, the runtime will set a default value for thread-limit-var of OMP_NUM_THREADS or the number of available processors, whichever is greater. Note: if thread-limit-var is set, the default value of the nthreads-var internal control variable is equal to thread-limit-var or the number of available processors, whichever is less.
Therefore you may need to set OMP_NUM_THREADS to oversubscribe the number of threads.
Also, (not seeing your program) the error message (#96) seems to imply you are attempting to nest parallel regions with nested disabled.