-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
OpenBLAS is often compiled NUM_THREADS=128 (e.g. this is what PyTorch does on aarch64). When run on machines with more than 128 cores the following warning is displayed:
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
To avoid this warning, please rebuild your copy of OpenBLAS with a larger NUM_THREADS setting
or set the environment variable OPENBLAS_NUM_THREADS to 128 or lower
(warning is printed by
OpenBLAS/driver/others/memory.c
Line 3043 in 986ba29
| fprintf(stderr,"or set the environment variable OPENBLAS_NUM_THREADS to %d or lower\n", MAX_CPU_NUMBER); |
Unfortunately there are some souls who end up in a mess because they fail to read the OpenBLAS README warning about how OPENBLAS_NUM_THREADS is ignored when OpenBLAS has been compiled with USE_OPENMP=1:
If you compile this library with
USE_OPENMP=1, you should set theOMP_NUM_THREADSenvironment variable; OpenBLAS ignoresOPENBLAS_NUM_THREADSandGOTO_NUM_THREADSwhen compiled withUSE_OPENMP=1.
Something that may help such lost souls is if the warning message changed the variable name mentioned depending on the USE_OPENMP define...