Cores should start from 0 until max-1. Here, it
was mistakenly 0 until max
data->worker_id = i;
parmap->workers[i] = xbt_os_thread_create(nullptr, xbt_parmap_worker_main, data, nullptr);
#if HAVE_PTHREAD_SETAFFINITY
data->worker_id = i;
parmap->workers[i] = xbt_os_thread_create(nullptr, xbt_parmap_worker_main, data, nullptr);
#if HAVE_PTHREAD_SETAFFINITY
- xbt_os_thread_bind(parmap->workers[i], core_bind);
- if (core_bind != xbt_os_get_numcores())
+ xbt_os_thread_bind(parmap->workers[i], core_bind);
+ if (core_bind != xbt_os_get_numcores() - 1)
core_bind++;
else
core_bind = 0;
core_bind++;
else
core_bind = 0;