Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] Is hwloc_bitmap_from_ith_ulong working?
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2010-12-22 18:15:13


Le 22/12/2010 21:59, Guy Streeter a écrit :
> On 12/22/2010 01:50 PM, Guy Streeter wrote:
>> I'm using 1.1 on Fedora 13. I start with
>>
>> set = hwloc_bitmap_alloc_full()
>>
>> and it looks like
>>
>> 0xf...f
>>
>> Then I call
>>
>> hwloc_bitmap_from_ith_ulong(set, 1, 0xdeadbeef)
>>
>> and I get
>>
>> 0xdeadbeef,0x00000034,0x3f77aed8
>>
>> which I don't understand.

Oops, looks like we have a typo, I forgot to reset to first ulong. Patch
attached.

> hwloc_bitmap_set_ith_ulong() seems to behave in a similar way.
>
> full: 0xf...f
> ith: 0xf...f,,0xdeadbeef,0xffffffff,0xffffffff

This is expected. set_ith_ulong replaces exactly one ulong, and ulongs
are likely 64bits on your machine (but we always print using 32bit masks
to be arch-independent). That's why the third and fourth 32bit masks are
replaced above (with 0xdeadbeef and nothing respectively).

Brice