You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

runtime_variables.md 1.7 kB

1234567891011121314151617181920212223242526272829303132333435363738
  1. OpenBLAS checks the following environment variables on startup:
  2. * `OPENBLAS_NUM_THREADS`: the number of threads to use (for non-OpenMP builds
  3. of OpenBLAS)
  4. * `OMP_NUM_THREADS`: the number of threads to use (for OpenMP builds - note
  5. that setting this may also affect any other OpenMP code)
  6. * `OPENBLAS_DEFAULT_NUM_THREADS`: the number of threads to use, irrespective if
  7. OpenBLAS was built for OpenMP or pthreads
  8. * `OPENBLAS_MAIN_FREE=1`: this can be used to disable automatic assignment of
  9. 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
  11. that idle threads should wait before exiting
  12. * `OMP_ADAPTIVE=1`: this can be used in OpenMP builds to actually remove any
  13. surplus threads when the number of threads is decreased
  14. `DYNAMIC_ARCH` builds also accept the following:
  15. * `OPENBLAS_VERBOSE`:
  16. - set this to `1` to enable a warning when there is no exact match for the
  17. detected cpu in the library
  18. - set this to `2` to make OpenBLAS print the name of the cpu target it
  19. autodetected
  20. * `OPENBLAS_CORETYPE`: set this to one of the supported target names to
  21. override autodetection, e.g., `OPENBLAS_CORETYPE=HASWELL`
  22. * `OPENBLAS_L2_SIZE`: set this to override the autodetected size of the L2
  23. cache where it is not reported correctly (in virtual environments)
  24. Deprecated variables still recognized for compatibilty:
  25. * `GOTO_NUM_THREADS`: equivalent to `OPENBLAS_NUM_THREADS`
  26. * `GOTOBLAS_MAIN_FREE`: equivalent to `OPENBLAS_MAIN_FREE`
  27. * `OPENBLAS_BLOCK_FACTOR`: this applies a scale factor to the GEMM "P"
  28. parameter of the block matrix code, see file `driver/others/parameter.c`