OMP_THREAD_LIMIT
>>-OMP_THREAD_LIMIT=--n----------------------------------------><
- n
- The number of OpenMP threads to use for the whole program. It must be a positive scalar integer.
The value for OMP_THREAD_LIMIT is a positive integer. When nested parallelism is enabled, the value you specify for OMP_THREAD_LIMIT can affect the behavior of a parallel region. For example, if the value of OMP_THREAD_LIMIT is much smaller than the number of threads required in the program, say OMP_THREAD_LIMIT=1, the parallel region is run sequentially rather than in parallel.
If the OMP_THREAD_LIMIT environment variable is not set and the OMP_NUM_THREADS environment variable is set to a single value, the default value for OMP_THREAD_LIMIT is the value of OMP_NUM_THREADS or the number of available processors, whichever is greater.
If the OMP_THREAD_LIMIT environment variable is not set and the OMP_NUM_THREADS environment variable is set to a list, the default value for OMP_THREAD_LIMIT is the multiplication of all the numbers in the list or the number of available processors, whichever is greater.
If both the OMP_THREAD_LIMIT and OMP_NUM_THREADS environment variables are not set, the default value for OMP_THREAD_LIMIT is the number of available processors.