Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] towards PLPA-like API in 1.0
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2009-12-02 06:31:06


Brice Goglin wrote:
> Jeff Squyres wrote:
>
>> FWIW, having a "simple" API like that might be a Good Thing...?
>>
>> I.e., just be able to bind to a specific thread/core/socket with a
>> minimum fuss/muss. Even if such an API would be mainly syntactic sugar
>> for other hwloc functionality -- there definitely is something to be
>> said for "make the simple things simple". It will definitely (IMNSHO)
>> extend hwloc's reach into a larger class of applications. Meaning:
>> there are a variety of hard-coded apps out there that we'll never see;
>> apps that run on specific servers for specific purposes, where the
>> developers hard code in there "bind to cores 1-4" or "bind to sockets
>> 1,3" because they already know the setup and this app is not intended
>> to be portable.
>>
>
> I am looking at what we could add to the main API/helpers, here's what
> could be useful:
> * get_obj_under_by_type(topology, type, index, subtype, subindex)
> returns for instance core 2 under socket 3. It's very easy
> (get_obj_by_type+get_obj_inside_cpuset_by_type).
> * Some people might want _under_under with 3 types/indexes. Not sure we
> want it, or want to make it generic with arrays of types/indexes...
> * Generic conversion routines between os_index and logical_index, like
> get_obj_by_os_index(type, os_index) and get_os_index_by_type(type, index)
> * Some kind of processor flag which tells us whether a physical proc
> exists and is online
>

Any opinion about this? Should we drop the current plpa.h and just add
the above new inlines to helper.h? (with some documentation about
switching from PLPA into these new functions)

Brice