Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] Proposal for cpuset API change
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2010-03-17 15:47:50


On Wed, Mar 17, 2010 at 20:26, Brice GOGLIN <Brice.Goglin_at_[hidden]> wrote:
>> Hi,
>>
>> I think it is necessary to make a small change to the cpuset API. The
>> current API was made fit to allow dynamically sized cpusets. I.e. an
>> alloc/modify/free style life cycle. The problem I see is, from where
>> should hwloc_cpuset_alloc() get the size of the cpuset? The solution I
>> see is to pass the hwloc_topology_t into hwloc_cpuset_alloc(), so that
>> the information comes from there [1].
>>
>> I haven't looked through the whole tree, if a hwloc_topology_t is
>> always available at places where hwloc_cpuset_alloc() is called.
>>
>> Comments?
>
> There's no need to hardwire any cpuset size at all, even if it comes from
> the OS instead of from hwloc/config.h. Some students are working on
> allocating a single unsigned long first and then dynamically reallocate
> more whenever you try to set a bit with a very large index (and possibly
> use some sparse allocation model too). I expect the code to be ready for
> 1.1. Until then, statically allocating 1024 should be enough is the vast
> majority of cases.

Thanks for this information.

Bert

>
> Brice
>
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>