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 vstinner
Recipients amaury.forgeotdarc, anacrolix, benjamin.peterson, georg.brandl, giampaolo.rodola, neologix, pitrou, python-dev, rosslagerwall, vstinner
Date 2012-08-04.13:00:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwbBefKDouCGmad_T7+-CqTDTyfcD0O4soNGUSyrqAyMOw@mail.gmail.com>
In-reply-to <1344078791.62.0.253376763697.issue12655@psf.upfronthosting.co.za>
Content
sched_getaffinity() does not fail if the set is smaller than the
number of CPU. Try with an initial value of ncpus=1. So we cannot
start the heuristic with ncpus=16, because it would only return 16
even if the computer has more cpus.

Instead of this heuristic, why not simply alway using ncpus = CPU_SETSIZE?

I don't know if CPU_SETSIZE is part of the standard (POSIX?).

You may also use a constant size (CPU_SETSIZE) of the set used by
sched_setaffinity() to simplify the code.
History
Date User Action Args
2012-08-04 13:00:58vstinnersetrecipients: + vstinner, georg.brandl, amaury.forgeotdarc, pitrou, giampaolo.rodola, benjamin.peterson, anacrolix, neologix, rosslagerwall, python-dev
2012-08-04 13:00:58vstinnerlinkissue12655 messages
2012-08-04 13:00:57vstinnercreate