I am trying to:
Run 16 copies concurrently with processor pinning (2 copies per core)
Run 8 copies concurrently with processor pinning (2 co
Don't use CPU_SETSIZE as cpusetsize parameter for sched_[set|get]affinity. The names are misleading but this is wrong. The macro CPU_SETSIZE is (quoting man 3 cpu_set) "a value one greater than the maximum CPU number that can be stored in cpu_set_t." You have to use
sched_setaffinity(0, sizeof(cpu_set_t), &my_set);
instead.