[Numpy-discussion] Set #threads from within python code
Neal Becker
ndbecker2 at gmail.com
Fri Mar 24 07:30:57 EDT 2017
I don't want my python code to run multi-thread. So I can do:
MKL_NUM_THREAD=1 NUMEXPR_NUM_THREADS=1 OMP_NUM_THREADS=1 my_program...
But I don't seem to be able to achieve this effect without setting env
variables on the command line; within my_program. Using os.environ doesn't
work. I don't understand why. I'd like to not have to put this on the
command line because I sometimes forget.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170324/43411adc/attachment.html>
More information about the NumPy-Discussion
mailing list