On 28 Sep 2017, at 3:37 pm, Max Linke wrote:
>
> os.environ can be used to change environment variables from within
> python.
>
> https://docs.python.org/2/library/os.html#os.environ
>
> I do not know when openBLAS is reading the environment variables though.
> Changing a value while your pytho
This came up for Biopython recently (someone using our
library on a cluster ran into thread limits triggered by the
importing of NumPy), and suggested something like this:
import os
try:
os.environ["OMP_NUM_THREADS"] = "1"
import numpy
finally:
del os.environ["OMP_NUM_THREADS"]
Or MKL_
os.environ can be used to change environment variables from within
python.
https://docs.python.org/2/library/os.html#os.environ
I do not know when openBLAS is reading the environment variables though.
Changing a value while your python process is running might be to late.
Jean-Christophe Houde w
Hi all,
not sure if this is the best place to ask for this. If not, please advise
on the correct place.
Since the numpy wheels internally use openBLAS, operations can be
implicitly multithreaded directly by openBLAS.
This, of course, can clash with multithreading or parallel processing. The
reco