Open MPI logo

PLPA Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all PLPA Users mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-05-16 10:48:26


Apologies for not replying for so long; the last 2 weeks were pretty
much a "perfect storm" in terms of deadlines, keeping me fully
occupied. So let's resume the conversation...

-----

This new proposal generally looks good (and I agree; let's throw out
the previous confusing conversation and use this as a new starting
point :-) ).

I have a few comments:

- Perhaps we should not use the type name cpuset_t since it is used
for multiple different kinds of items (sockets, nodes, etc.). How
about bitmap_t? E.g. (regardless of whatever the function names end
up being):

map_from_node_id(int node_id, plpa_bitmap_t *cpuset);
get_node_set(plpa_bitmap_t *nodeset);
...etc.

- Can we combine map_to_tuple() and map_to_node_id()? It seems silly
to have 2 functions for that -- perhaps:

map_to_tuple(int processor_id, int *socket, int *core, int *thread,
int *node);

- I wasn't fond of the use of "get_<foo>map" function names, mainly
because it seems like we're overloading the use of the word
"map" (map_from_<foo> and get_<bar>map). I suggest using some plain
words, for example:

orig suggestion: map_from_node_id(int node_id, bitmap_t *cpuset);
2nd suggestion: node_get_cpumap(int node_id, bitmap_t *cpumap);
JMS suggestion: node_get_processor_ids(int node_id, bitmap_t
*processor_ids);

I put up the whole proposal on the wiki, and put my comments in it.
Have a look: https://svn.open-mpi.org/trac/plpa/wiki/TopoAPIProposal

On Apr 28, 2007, at 12:14 PM, Bert Wesarg wrote:

> Hello,
>
> maybe too early, but I have some new names for the functions:
>
>> /* Return the set of processor IDs for a node ID, rel. (f) */
>> map_from_node_id(int node_id, cpu_set_t *cpuset);
> node_get_cpumap(int node_id, cpu_set_t *cpumap);
>
> Because a file in a nodeX directory is called cpumap and have
> exactly this
> information
>
>> /* Return the set of all possible processor IDs
>> if bit i is set in cpuset, a processor ID with i exist */
>> get_processor_set(cpu_set_t *cpuset);
> maybe: get_cpumap();
>
>>
>> /* Return the set of all possible node IDs
>> if bit i is set in nodeset, a node ID with i exist */
>> get_node_set(cpu_set_t *nodeset);
> maybe: get_nodemap();
>
>>
>> /* Return the set of all sockets
>> if bit i is set in socketset, at least one tuple (s, c, t) exist
>> with s == i */
>> get_socket_set(cpu_set_t *socketset);
> maybe: get_socketmap();
>
>>
>> /* Return the set of all sockets from a node ID
>> if bit i is set in socketset, at least one tuple (s, c, t) exist
>> with s == i and this tuple is in node node_id
>> NOTE: this is the only function that brings the tuples and nodes
>> directly into relation
>> relation (g) */
>> get_socket_set_in_node(int node_id, cpu_set_t *socketset);
> node_get_socketmap()
>
>>
>> /* Return the set of all possible cores in a socket
>> if bit i is set in coreset, at least one tuple (s, c, t) exist
>> with s == socket and c == i
>> relation (h) */
>> get_core_set(int socket, cpu_set_t *coreset);
> socket_get_coremap()
> or:
> socket_get_core_siblings()
>
>>
>> /* Return the set of all possible threads in a (socket,core) tuple
>> if bit i is set in threadset, there exist exactly one tuple (s,
>> c, t)
>> with s == socket and c == core and t == i
>> relation (i) */
>> get_thread_set(int socket, int core, cpu_set_t *threadset);
> socket_core_get_threadmap()
> or:
> socket_core_get_thread_siblings()
>
> Bert
> _______________________________________________
> plpa-users mailing list
> plpa-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/plpa-users

-- 
Jeff Squyres
Cisco Systems