OMP_THREAD_LIMIT environment variable

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 sets 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.
Read syntax diagramSkip visual syntax diagram
>>-OMP_THREAD_LIMIT=n------------------------------------------><