Author vstinner
Recipients amaury.forgeotdarc, anacrolix, benjamin.peterson, georg.brandl, giampaolo.rodola, neologix, pitrou, python-dev, rosslagerwall, vstinner
Date 2012-08-04.13:10:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
>> Try with an initial value of ncpus=1.
> Well, I've tried and it works:

Oh, you're right :-) I only checked ncpus (1), not the final result.
It works because CPU_ALLOC_SIZE() rounds the size using
sizeof(unsigned long) (64 bits on my CPU). So CPU_ALLOC_SIZE(1)
returns 8, and sched_getaffinity() takes the size of the set in bytes,
and not the number of CPU.

sched_getaffinity(0) returns {0, 1, 2, 3, 4, 5, 6, 7} with ncpus=1 and
Date User Action Args
2012-08-04 13:10:54vstinnersetrecipients: + vstinner, georg.brandl, amaury.forgeotdarc, pitrou, giampaolo.rodola, benjamin.peterson, anacrolix, neologix, rosslagerwall, python-dev
2012-08-04 13:10:53vstinnerlinkissue12655 messages
2012-08-04 13:10:53vstinnercreate