Skip to content

Commit f60a943

Browse files
committed
clarified OMP_NUM_THREADS
Removed description of possible deprecation of OMP_NUM_THREADS. After discussion in flame#825 it was agreed to: - lax the deprecation warning, OMP_NUM_THREADS will always be a fall-bock. - Clarified with a simple example on how to do different regions of thread-counts. Signed-off-by: Nick Papior <[email protected]>
1 parent 12f2efa commit f60a943

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/Multithreading.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,14 @@ $ GOMP_CPU_AFFINITY="0-15" BLIS_NUM_THREADS=16 ./my_blis_program
147147
```
148148
Either of these approaches causes BLIS to automatically determine a reasonable threading strategy based on what is known about the operation and problem size. If `BLIS_NUM_THREADS` is not set, BLIS will attempt to query the value of `BLIS_NT` (a shorthand alternative to `BLIS_NUM_THREADS`). If neither variable is defined, then BLIS will attempt to read `OMP_NUM_THREADS`. If none of these variables is set, the default number of threads is 1.
149149

150-
**Note**: We *highly* discourage use of the `OMP_NUM_THREADS` environment variable to specify multithreading within BLIS and may remove support for it in the future. If you wish to set parallelism globally via environment variables, please use `BLIS_NUM_THREADS`.
150+
**Note**: If none of `BLIS_NT`/`BLIS_NUM_THREADS` are defined, BLIS will fall back to use
151+
the standardized `OMP_NUM_THREADS` environment variable.
152+
By having an application specific environment variable one can fine-tune the thread
153+
utilization, e.g. to run OpenMP constructs using 4 threads, and BLIS with 2 threads:
154+
```
155+
$ OMP_NUM_THREADS=4 BLIS_NUM_THREADS=2 ./my_omp_blis_program
156+
```
157+
151158

152159
### Environment variables: the manual way
153160

0 commit comments

Comments
 (0)