Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r3157
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2011-02-04 06:03:29


Le 04/02/2011 11:56, Samuel Thibault a écrit :
>> + if (topology->flags & HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_BINDING) {
>> + hwloc_cpuset_t cpuset = hwloc_bitmap_alloc();
>> + int err = hwloc_get_cpubind(topology, cpuset, HWLOC_CPUBIND_THREAD);
>> + if (!err)
>> + hwloc_topology_restrict(topology, cpuset);
>> + hwloc_bitmap_free(cpuset);
>> + }
>>
> Mmm, I then wonder whether we should really provide a flag, then, if
> it's a matter of calling restrict() afterwards. What would be more
> generic and useful is a topology configuration option which restricts
> detection to a given cpuset: the core filters out objects outside from
> that cpuset, and OS backends can also avoid trying to detect them,
> making detection faster.
>

Right, we can optimize these things later. The above is just an easy implem.

Brice