On Apr 22, 2007, at 2:47 PM, Bert Wesarg wrote:
> max_core is indexed by a socket id, not the processor_id.
This is what I get for testing on a system with a low core count. :-)
(the env variable override will be most helpful here...)
> Not in the patch: The max_core array can be realloc()'ed to reduce the
> size to (max_socket + 1).
>
> By the way, if the PLPA_NAME(arg) macro will ever evaluate to arg,
> than
> there will be compiler errors because of redefinition of the
> max_core symbol.
This should never happen because --with-plpa-symbol-prefix= will
evaluate to nothing, and configure.ac will use "plpa_".
> Bert Wesarg
> ---
>
> src/libplpa/plpa_map.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --quilt old/src/libplpa/plpa_map.c new/src/libplpa/plpa_map.c
> --- old/src/libplpa/plpa_map.c
> +++ new/src/libplpa/plpa_map.c
> @@ -238,15 +238,15 @@ static void load_cache(void)
>
> /* Compute some globals */
> if (map_processor_id_to_tuple[i].socket > max_socket) {
> max_socket = map_processor_id_to_tuple[i].socket;
> }
> - if (map_processor_id_to_tuple[i].core > max_core[i]) {
> - max_core[i] = map_processor_id_to_tuple[i].core;
> + if (map_processor_id_to_tuple[i].core > max_core
> [map_processor_id_to_tuple[i].socket]) {
> + max_core[map_processor_id_to_tuple[i].socket] =
> map_processor_id_to_tuple[i].core;
> }
> - if (max_core[i] > max_core_overall) {
> - max_core_overall = max_core[i];
> + if (max_core[map_processor_id_to_tuple[i].socket] >
> max_core_overall) {
> + max_core_overall = max_core[map_processor_id_to_tuple
> [i].socket];
> }
> }
>
> /* Now go through and build the map in the other direction:
> (socket,core) => processor_id. This map simply points to
> _______________________________________________
> plpa-users mailing list
> plpa-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/plpa-users
--
Jeff Squyres
Cisco Systems
|