hwloc: correctly count cores with at least one allowed PU
when SMT is enabled, a core must be counted as long as one of its hwthread is allowed Thanks Ben Menadue for the report. This fixes a regression from open-mpi/ompi@6d149554a7
Этот коммит содержится в:
родитель
3f7fff5780
Коммит
d529951206
@ -492,8 +492,11 @@ static void df_search_cores(hwloc_obj_t obj, unsigned int *cnt)
|
||||
obj->userdata = (void*)data;
|
||||
}
|
||||
if (NULL == opal_hwloc_base_cpu_set) {
|
||||
if (!hwloc_bitmap_isincluded(obj->cpuset, obj->allowed_cpuset)) {
|
||||
/* do not count not allowed cores */
|
||||
if (!hwloc_bitmap_intersects(obj->cpuset, obj->allowed_cpuset)) {
|
||||
/*
|
||||
* do not count not allowed cores (e.g. cores with zero allowed PU)
|
||||
* if SMT is enabled, do count cores with at least one allowed hwthread
|
||||
*/
|
||||
return;
|
||||
}
|
||||
data->npus = 1;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user