Hello,
just looked over the code and I have 2 points, which I bring up for
discussion:
(1) There is no word about thread-safety in the topology API.
(2) Maybe its too late to change the API, but:
> int plpa_max_processor_id(void);
> Return the max processor ID
>
> int plpa_max_socket(void);
> Return the max socket number
>
> int plpa_max_core(int socket);
> Return the max core number for a given socket
all but these return 0 on success and a positive error number on
error, only these return either a valid number or the negative error
number. I think there are two options:
(a) pass a pointer, like the other functions. This would be more
consistence (even to the pthread API or MPI C API) and return 0
on success and the positive error number on error.
(b) return -1 on error and set errno appropriate.
Peronaly I like (a) more.
Thank you
Bert Wesarg
|