1
1
Since hwloc has a dynamic bitmap size, it could actually have bits set
that will not fit in the paffinity mask.  We already made sure that we
didn't overrun the paffinity mask; now also set the return value to
OPAL_ERR_VALUE_OUT_OF_BOUNDS (wow, we really thought of everything
with those error codes, eh?) if the hwloc bitmap has bits set higher
than what will fit into the paffinity bitmask.

This commit was SVN r25179.

The following Trac tickets were found above:
  Ticket 2854 --> https://svn.open-mpi.org/trac/ompi/ticket/2854
Этот коммит содержится в:
Jeff Squyres 2011-09-24 13:52:27 +00:00
родитель cb983906bc
Коммит d4603f080d

Просмотреть файл

@ -220,6 +220,14 @@ static int module_get(opal_paffinity_base_cpu_set_t *mask)
OPAL_PAFFINITY_CPU_SET(i, *mask);
}
}
/* Ensure that hwloc does not have any bits set above the size
of the paffinity mask. If it does, we're hosed. :-(
(remember: hwloc has a dynamic bitmask size, but paffinity
has a fixed size) */
if (hwloc_bitmap_last(set) > OPAL_PAFFINITY_BITMASK_CPU_MAX) {
ret = OPAL_ERR_VALUE_OUT_OF_BOUNDS;
}
}
hwloc_bitmap_free(set);