Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: Re: [hwloc-users] Bind current thread to a specific cpu
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-08-18 06:02:34


PULVERAIL Sébastien, le Thu 18 Aug 2011 11:55:21 +0200, a écrit :
> I use logical ids, so I do this :
>
>                 hwloc_obj_t cpu = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PU, i);
>                 int err = hwloc_set_cpubind(topology, cpu->cpuset, HWLOC_CPUBIND_THREAD);
>
> Is it correct ?

Yes.

Samuel