This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients hadim, neologix
Date 2013-01-26.12:01:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM2C6PP3o5WBLbBpH=Q9avOa8SpAY3rA3PcFicV3pFB1oQ@mail.gmail.com>
In-reply-to <1359200536.66.0.542697032748.issue17038@psf.upfronthosting.co.za>
Content
> Indeed some value change when I print "cpu" line from /proc/self/status but I don't really understand what that mean...

It means that the CPU affinity is changed, so the scheduler binds your
process to a subset of the available CPUs.

> So there is no solution about that ? We cannot use multiprocessing with these modules under Linux ?
>
> Do you think I can manually change the CPU affinity or at least block changes made by other modules (without recompiling them of course) ?

If you don't want to recompile the offending module (it seems to be
GotoBLAS2), you can change the affinity after importing your modules
with something like:
"""
os.system("taskset -p 0xff %d" % os.getpid())
"""

(Python 3.3 exposes the scheduling API natively, see
http://docs.python.org/dev/library/os.html#interface-to-the-scheduler)

> I guess if it's possible to modify CPU affinity, numpy and other scientific libraries won't be efficient as before, no ? Because the won't share the same cache or something like that, if I get the wikipedia page about cpu affinity.

Soft affinity is naturally done by the operating system scheduler, so
you don't have to worry about cache line bouncing and the like. Hard
affinity is only useful in very specific cases.
History
Date User Action Args
2013-01-26 12:01:58neologixsetrecipients: + neologix, hadim
2013-01-26 12:01:58neologixlinkissue17038 messages
2013-01-26 12:01:58neologixcreate