Re: [hwloc-users] Multiple thread binding
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
Re: [hwloc-users] Multiple thread binding
Ok, 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); } 2011/8/2 Gabriele Fatigati> Mm, i'm not sure. Suppose this: > > $pragma omp parallel num_thread(1) > { > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | > HWLOC_CPUBIND_STRICT | HWLOC_CPUBIND_NOMEMBIND); > } > > is equivalent to? > > $pragma omp parallel num_thread(1) > { > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); > > } > > > You said HWLOC_CPUBIND_STRICT bind process and memory. Why also the memory? > It should strictly design which CPU will assigned to a process/thread, or > does more? > > > 2011/8/2 Samuel Thibault > >> Gabriele Fatigati, le Tue 02 Aug 2011 16:23:12 +0200, a écrit : >> > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | >> HWLOC_CPUBIND_STRICT >> > | HWLOC_CPUBIND_NOMEMBIND); >> > >> > is it possible do multiple call to hwloc_set_cpubind passing each flag >> per >> > time? >> > >> > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); >> > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); >> > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); >> > >> > or only the last have effect? >> >> Err, it will simply do the three operations, i.e. first bind the current >> thread and memory, then strictly bind the whole process and memory, and >> eventually bind the process but not memory (but it will still bound >> since it was by the second call). >> >> Samuel >> ___ >> hwloc-users mailing list >> hwloc-us...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users >> > > > > -- > Ing. Gabriele Fatigati > > Parallel programmer > > CINECA Systems & Tecnologies Department > > Supercomputing Group > > Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy > > www.cineca.itTel: +39 051 6171722 > > g.fatigati [AT] cineca.it > -- Ing. Gabriele Fatigati Parallel programmer CINECA Systems & Tecnologies Department Supercomputing Group Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy www.cineca.itTel: +39 051 6171722 g.fatigati [AT] cineca.it
Re: [hwloc-users] Multiple thread binding
Gabriele Fatigati, le Tue 02 Aug 2011 17:13:15 +0200, a écrit : > $pragma omp parallel num_thread(1) > { > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | > HWLOC_CPUBIND_STRICT > | HWLOC_CPUBIND_NOMEMBIND); > } > > is equivalent to? > > $pragma omp parallel num_thread(1) > { > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); > > } As I said, no. The latter will perform the three operations one after the other, piling the effect of each of them, which is different from specifying all the flags at the same time. For instance, in the first case, only the current thread will be bound, while in the second case, the second and third calls will bind the whole process! (since there is no THREAD flag). > You said HWLOC_CPUBIND_STRICT bind process and memory. I should have said "potentially memory too". And it's not the STRICT flag which does this, it's the absence of NOMEMBIND which does this. > Why also the memory? Because some OS do this too. Samuel
Re: [hwloc-users] Multiple thread binding
Mm, i'm not sure. Suppose this: $pragma omp parallel num_thread(1) { hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | HWLOC_CPUBIND_STRICT | HWLOC_CPUBIND_NOMEMBIND); } is equivalent to? $pragma omp parallel num_thread(1) { hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); } You said HWLOC_CPUBIND_STRICT bind process and memory. Why also the memory? It should strictly design which CPU will assigned to a process/thread, or does more? 2011/8/2 Samuel Thibault> Gabriele Fatigati, le Tue 02 Aug 2011 16:23:12 +0200, a écrit : > > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | > HWLOC_CPUBIND_STRICT > > | HWLOC_CPUBIND_NOMEMBIND); > > > > is it possible do multiple call to hwloc_set_cpubind passing each flag > per > > time? > > > > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); > > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); > > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); > > > > or only the last have effect? > > Err, it will simply do the three operations, i.e. first bind the current > thread and memory, then strictly bind the whole process and memory, and > eventually bind the process but not memory (but it will still bound > since it was by the second call). > > Samuel > ___ > hwloc-users mailing list > hwloc-us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > -- Ing. Gabriele Fatigati Parallel programmer CINECA Systems & Tecnologies Department Supercomputing Group Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy www.cineca.itTel: +39 051 6171722 g.fatigati [AT] cineca.it
Re: [hwloc-users] Multiple thread binding
Gabriele Fatigati, le Tue 02 Aug 2011 16:23:12 +0200, a écrit : > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | HWLOC_CPUBIND_STRICT > | HWLOC_CPUBIND_NOMEMBIND); > > is it possible do multiple call to hwloc_set_cpubind passing each flag per > time? > > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); > hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); > > or only the last have effect? Err, it will simply do the three operations, i.e. first bind the current thread and memory, then strictly bind the whole process and memory, and eventually bind the process but not memory (but it will still bound since it was by the second call). Samuel
[hwloc-users] Multiple thread binding
Dear all, binding a thread on a core like this: hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD | HWLOC_CPUBIND_STRICT | HWLOC_CPUBIND_NOMEMBIND); is it possible do multiple call to hwloc_set_cpubind passing each flag per time? hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_THREAD); hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_STRICT); hwloc_set_cpubind(*topology, set, HWLOC_CPUBIND_NOMEMBIND); or only the last have effect? Thanks in forward. -- Ing. Gabriele Fatigati Parallel programmer CINECA Systems & Tecnologies Department Supercomputing Group Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy www.cineca.itTel: +39 051 6171722 g.fatigati [AT] cineca.it
Re: [hwloc-users] [hwloc-announce] Hardware Locality (hwloc) v1.2.1rc1 released
Hello, Hendryk Bockelmann, le Tue 02 Aug 2011 10:54:54 +0200, a écrit : > I will test hwloc-1.2.1rc1r3567.tar.gz in the next days on our POWER6 > cluster running AIX6.1 and report the results to you resp. to the list Maybe rather wait for next nightly snapshot, as I've just fixed a bug with xml test which will probably hit you. Samuel
Re: [hwloc-users] [hwloc-announce] Hardware Locality (hwloc) v1.2.1rc1 released
Hi Samuel, I will test hwloc-1.2.1rc1r3567.tar.gz in the next days on our POWER6 cluster running AIX6.1 and report the results to you resp. to the list Hendryk On 02/08/11 03:12, Samuel Thibault wrote: Brice Goglin, le Mon 01 Aug 2011 22:07:33 +0200, a écrit : The Hardware Locality (hwloc) team is pleased to announce the first release candidate of version 1.2.1 http://www.open-mpi.org/projects/hwloc/ Could someone test on AIX? Samuel smime.p7s Description: S/MIME Cryptographic Signature