Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] hwloc 1.1 rc2 make check fails on SLES10SP1 on PPC64
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2010-11-24 01:55:06


Le 24/11/2010 07:47, Christopher Samuel a écrit :
> On 22/11/10 07:48, Christopher Samuel wrote:
>
> > *** glibc detected *** /tmp/hwloc/hwloc-1.1rc2/tests/.libs/hwloc_bind:
> > free(): invalid next size (fast): 0x1001c240 ***
>
> Went and had a look at the code that was failing. This is
> the fragement that fails:
>
> #ifdef HWLOC_HAVE_MIGRATE_PAGES
> unsigned long *fullmask = malloc(max_os_index/HWLOC_BITS_PER_LONG *
> sizeof(long));
> if (fullmask) {
> memset(fullmask, max_os_index/HWLOC_BITS_PER_LONG * sizeof(long),
> 0xf);
> err = migrate_pages(0, max_os_index+1, fullmask, linuxmask);
> free(fullmask);
> } else
> err = -1;
> if (err < 0 && (flags & HWLOC_MEMBIND_STRICT))
> goto out_with_mask;
> #else
>
> I can get the free(fullmask); to not fail if I comment out
> the memset() and migrate_pages() calls. If I just comment
> out the migrate_pages() then it still fails so there's
> something wrong in that calculation from the look of it.

Can you add this?
  printf("max_os_index=%u memsize=%u\n", max_os_index,
max_os_index/HWLOC_BITS_PER_LONG * sizeof(long));
If there are few numa nodes on your machine, it's supposed to print
something like 32 4 on 32bits machine and 64 8 on 64bits.

If max_os_index is wrong, the problem lies in
hwloc_linux_membind_mask_from_nodeset(). Adding a
printf("max_os_index=%d\n", max_os_index); right before /* round up ...
BITS_PER_LONG */ may help too.

Brice