17 Nov
2021
17 Nov
'21
6:34 a.m.
On Tue, Nov 16, 2021, at 21:57, Ralf Gommers wrote:
Setting an environment variable is also not a great thing to do (a library should normally never ever do this), but if it works to do so in `scipy/__init__.py` then that may be the most pragmatic solution right now. However, this must be done before `libopenblas` is first loaded or it won't take effect. So if users import numpy first, then setting an env var will already have no effect on that copy of `libopenblas`. It needs testing whether this then still works around the problem or not.
Instead of using the environment variable, could we call `openblas_set_num_threads`? Stéfan