Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: Re: [hwloc-users] Multiple thread binding
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-08-02 11:26:06


Gabriele Fatigati, le Tue 02 Aug 2011 17:22:31 +0200, a écrit :
> and in this way are equivalent?
>
> #pragma omp parallel num_threads(1)
> {
> hwloc_obj_t core = hwloc_get_obj_by_type(*topology, HWLOC_OBJ_PU, 0);
> hwloc_cpuset_t set = hwloc_bitmap_dup(core->cpuset);
> hwloc_set_cpubind(*topology, set,  HWLOC_CPUBIND_THREAD | 
> HWLOC_CPUBIND_STRICT);
> hwloc_set_cpubind(*topology, set,  HWLOC_CPUBIND_THREAD | 
> HWLOC_CPUBIND_NOMEMBIND);
> }

Since the first call does not have NOMEMBIND, it might bind the memory
on some OSes, and since the second call does not have the strict flag,
the thread will in the end not be strictly bound.

Samuel