Sorry,

this is the right code:

--------------------------

char* bitmap_string=(char*)malloc(256);

hwloc_bitmap_t set = hwloc_bitmap_alloc();

hwloc_linux_get_tid_cpubind(&topology, tid, set);

hwloc_bitmap_asprintf(&bitmap_string, set);

printf( " bitmap_string: %s from tid: %d \n", bitmap_string, tid);

--------------------------
2011/8/11 Gabriele Fatigati <g.fatigati@cineca.it>
Hi Samuel,

I'm using as it in OpenMP parallel region:


-------------------------

char* bitmap_string=(char*)malloc(256);

hwloc_bitmap_t set = hwloc_bitmap_alloc();

hwloc_linux_get_tid_cpubind(&topology, tid, set);

hwloc_bitmap_asprintf(&bitmap_string, set);

printf( " bitmap_string: %s from tid: %d \n", bitmap_string[0], tid);

------------------------



2011/8/11 Samuel Thibault <samuel.thibault@inria.fr>
Gabriele Fatigati, le Thu 11 Aug 2011 10:32:23 +0200, a écrit :
> I'm using hwloc-1.3a1r3606.  Now hwloc_get_last_cpu_location() works well:
>
> thread 0  bind:  0x00000008   as core number 3
> thread 1 bind: 0x00000800 as core number 11

Good.

> but hwloc_linux_get_tid_cpubind() has still some problems because after binding
> one thread on just one core it give me:
>
> thread 0 bind:  0x00000008   as core number 3
> thread 1 bind: "0x00ffffff"  as all available cores!!

How do you use it exactly?

Samuel
_______________________________________________
hwloc-users mailing list
hwloc-users@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users



--
Ing. Gabriele Fatigati

HPC specialist

SuperComputing Applications and Innovation Department

Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy

www.cineca.it                    Tel:   +39 051 6171722

g.fatigati [AT] cineca.it          



--
Ing. Gabriele Fatigati

HPC specialist

SuperComputing Applications and Innovation Department

Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy

www.cineca.it                    Tel:   +39 051 6171722

g.fatigati [AT] cineca.it