Thursday, May 05, 2016

python using a single core for numpy

A point which came up when using pynlo:

A longish reply for the question why python uses only one core for numpy -
http://stackoverflow.com/questions/15639779/why-does-multiprocessing-use-only-a-single-core-after-i-import-numpy

In short, core affinity can be reset using
os.system("taskset -p 0xff %d" % os.getpid())
after the module imports. But this would be useful only for multi-threaded programs, of course. 

No comments:

Post a Comment