OpenBLAS checks the following environment variables on startup:
OPENBLAS_NUM_THREADS= the number of threads to use (for non-OpenMP-builds of OpenBLAS)
OMP_NUM_THREADS= the number of threads to use (for OpenMP builds - note that setting this may also affect any other OpenMP code)
OPENBLAS_DEFAULT_NUM_THREADS= the number of threads to use, irrespective if OpenBLAS was built for OpenMP or pthreads
OPENBLAS_MAIN_FREE=1" this can be used to disable automatic assignment of cpu affinity in OpenBLAS builds that have it enabled by default
OPENBLAS_THREAD_TIMEOUT= this can be used to define the length of time that idle threads should wait before exiting
OMP_ADAPTIVE=1 this can be used in OpenMP builds to actually remove any surplus threads when the number of threads is decreased
DYNAMIC_ARCH builds also accept the following:
Deprecated variables still recognized for compatibilty: