Message167405
>> 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
setsize=8. |
|
Date |
User |
Action |
Args |
2012-08-04 13:10:54 | vstinner | set | recipients:
+ vstinner, georg.brandl, amaury.forgeotdarc, pitrou, giampaolo.rodola, benjamin.peterson, anacrolix, neologix, rosslagerwall, python-dev |
2012-08-04 13:10:53 | vstinner | link | issue12655 messages |
2012-08-04 13:10:53 | vstinner | create | |
|