Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

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

> 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).