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
|
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 the OMP_NUM_THREADS environment variable; OpenBLAS ignores OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS when compiled with USE_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...
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:(warning is printed by
OpenBLAS/driver/others/memory.c
Line 3043 in 986ba29
Unfortunately there are some souls who end up in a mess because they fail to read the OpenBLAS README warning about how
OPENBLAS_NUM_THREADSis ignored when OpenBLAS has been 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_OPENMPdefine...