Skip to content

Commit 1833e68

Browse files
committed
docs: improve rendering of "Runtime variables" page
1 parent c0bf48f commit 1833e68

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed

docs/runtime_variables.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
1-
## Runtime variables
2-
31
OpenBLAS checks the following environment variables on startup:
42

5-
* **OPENBLAS_NUM_THREADS=** the number of threads to use (for non-OpenMP-builds of OpenBLAS)
6-
* **OMP_NUM_THREADS=** the number of threads to use (for OpenMP builds - note that setting this may also affect any other OpenMP code)
7-
* **OPENBLAS_DEFAULT_NUM_THREADS=** the number of threads to use, irrespective if OpenBLAS was built for OpenMP or pthreads
3+
* `OPENBLAS_NUM_THREADS`: the number of threads to use (for non-OpenMP builds
4+
of OpenBLAS)
5+
* `OMP_NUM_THREADS`: the number of threads to use (for OpenMP builds - note
6+
that setting this may also affect any other OpenMP code)
7+
* `OPENBLAS_DEFAULT_NUM_THREADS`: the number of threads to use, irrespective if
8+
OpenBLAS was built for OpenMP or pthreads
9+
10+
* `OPENBLAS_MAIN_FREE=1`: this can be used to disable automatic assignment of
11+
cpu affinity in OpenBLAS builds that have it enabled by default
12+
* `OPENBLAS_THREAD_TIMEOUT`: this can be used to define the length of time
13+
that idle threads should wait before exiting
14+
* `OMP_ADAPTIVE=1`: this can be used in OpenMP builds to actually remove any
15+
surplus threads when the number of threads is decreased
816

9-
* **OPENBLAS_MAIN_FREE=1**" this can be used to disable automatic assignment of cpu affinity in OpenBLAS builds that have it enabled by default
10-
* **OPENBLAS_THREAD_TIMEOUT=** this can be used to define the length of time that idle threads should wait before exiting
11-
* **OMP_ADAPTIVE=1** this can be used in OpenMP builds to actually remove any surplus threads when the number of threads is decreased
1217

18+
`DYNAMIC_ARCH` builds also accept the following:
1319

14-
DYNAMIC_ARCH builds also accept the following:
15-
* **OPENBLAS_VERBOSE=** set this to "1" to enable a warning when there is no exact match for the detected cpu in the library
16-
set this to "2" to make OpenBLAS print the name of the cpu target it autodetected
17-
* **OPENBLAS_CORETYPE=** set this to one of the supported target names to override autodetection, e.g. OPENBLAS_CORETYPE=HASWELL
18-
* **OPENBLAS_L2_SIZE=** set this to override the autodetected size of the L2 cache where it is not reported correctly (in virtual environments)
20+
* `OPENBLAS_VERBOSE`:
1921

22+
- set this to `1` to enable a warning when there is no exact match for the
23+
detected cpu in the library
24+
- set this to `2` to make OpenBLAS print the name of the cpu target it
25+
autodetected
26+
27+
* `OPENBLAS_CORETYPE`: set this to one of the supported target names to
28+
override autodetection, e.g., `OPENBLAS_CORETYPE=HASWELL`
29+
* `OPENBLAS_L2_SIZE`: set this to override the autodetected size of the L2
30+
cache where it is not reported correctly (in virtual environments)
2031

2132

2233
Deprecated variables still recognized for compatibilty:
23-
* **GOTO_NUM_THREADS=** equivalent to **OPENBLAS_NUM_THREADS**
24-
* **GOTOBLAS_MAIN_FREE** equivalent to **OPENBLAS_MAIN_FREE**
25-
* **OPENBLAS_BLOCK_FACTOR** this applies a scale factor to the GEMM "P" parameter of the block matrix code, see file driver/others/parameter.cen
34+
35+
* `GOTO_NUM_THREADS`: equivalent to `OPENBLAS_NUM_THREADS`
36+
* `GOTOBLAS_MAIN_FREE`: equivalent to `OPENBLAS_MAIN_FREE`
37+
* `OPENBLAS_BLOCK_FACTOR`: this applies a scale factor to the GEMM "P"
38+
parameter of the block matrix code, see file `driver/others/parameter.c`

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ nav:
5151
- extensions.md
5252
- developers.md
5353
- build_system.md
54+
- runtime_variables.md
5455
- distributing.md
5556
- ci.md
5657
- about.md

0 commit comments

Comments
 (0)