great, thanks Brice!

From: Brice Goglin <brice.gog...@inria.fr<mailto:brice.gog...@inria.fr>>
Reply-To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
List-Post: hwloc-users@lists.open-mpi.org
Date: Tue, 2 Sep 2014 10:32:01 +0200
To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
Subject: Re: [hwloc-users] setting memory bindings

Hello,

I am coming back on this thread to fix things before releasing v1.10.

Regarding your question below, there's already an answer with 
hwloc_topology_get_support() which returns things like 
support->membind->replicate_membind (set to 0 or 1 depending on whether the 
policy is supported). However, there might be some cases where things are 
"partially" supported (we have seen some OS that only support CPU binding on 
specific sets of cores) so you still need to check the return value :)

I will better document all this, and what happens in case of failure with and 
without the STRICT flag. And I'll see if I add a good example somewhere.

Brice



Le 19/08/2014 19:00, Aulwes, Rob a écrit :
nope, no error.  is there a way to find out what policies are supported?  I 
would like to try 'replicate'.

From: Brice Goglin <brice.gog...@inria.fr<mailto:brice.gog...@inria.fr>>
Reply-To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
List-Post: hwloc-users@lists.open-mpi.org
Date: Tue, 19 Aug 2014 18:55:57 +0200
To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
Subject: Re: [hwloc-users] setting memory bindings

NEXTTOUCH isn't supported on Linux. I hope you'd get an error if you request it.

Brice



Le 19/08/2014 18:48, Aulwes, Rob a écrit :
Hi Brice,

I've tried:

                  p = hwloc_alloc_membind_policy(_topo, cnt * sizeof (T),
                          mem_nodeset, HWLOC_MEMBIND_NEXTTOUCH, 0);

and

                  p = hwloc_alloc_membind_nodeset(_topo, cnt * sizeof (T),
                          mem_nodeset, HWLOC_MEMBIND_NEXTTOUCH, 0);

and


                  p = hwloc_alloc(_topo, cnt * sizeof (T));
  hwloc_set_area_membind_nodeset(_topo, p, cnt * sizeof (T),
                                         mem_nodeset, HWLOC_MEMBIND_NEXTTOUCH, 
0);

where

mem_nodeset = hwloc_topology_get_complete_nodeset(_topo);

Thanks,Rob

From: Brice Goglin <brice.gog...@inria.fr<mailto:brice.gog...@inria.fr>>
Reply-To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
List-Post: hwloc-users@lists.open-mpi.org
Date: Tue, 19 Aug 2014 18:44:05 +0200
To: Hardware locality user list 
<hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>>
Subject: Re: [hwloc-users] setting memory bindings

Le 19/08/2014 18:38, Aulwes, Rob a écrit :
Hi,

I'm trying to write a custom C++ allocator that wraps hwloc calls.  I've tried 
using various hwloc_alloc* functions to set the memory bindings, but when I 
call hwloc_get_area_membind_nodeset to verify, I don't get the same policy I 
passed to alloc.  Are there example codes that show how to set memory bindings? 
 More generally, are there example codes that help illustrate how to use hwloc 
API?

Thanks,Rob Aulwes


Hello

Your problem may be related to the fact that same policies are identical on 
some operating systems. For instance DEFAULT and FIRST_TOUCH are often 
identical. What did you set and what did you get back?

There are many examples in the tests subdirectory, in doc/hwloc-helloc.c and in 
hwloc/helper.h and hwloc/inline.h, but I don't think we have much about the 
membind API, and this API isn't a easy one unfortunately (given the variety of 
existing policies and operating systems).

Brice

_______________________________________________ hwloc-users mailing list 
hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org> Subscription: 
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users Link to this post: 
http://www.open-mpi.org/community/lists/hwloc-users/2014/08/1058.php


_______________________________________________
hwloc-users mailing list
hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
Link to this post: 
http://www.open-mpi.org/community/lists/hwloc-users/2014/08/1058.php

_______________________________________________ hwloc-users mailing list 
hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org> Subscription: 
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users Link to this post: 
http://www.open-mpi.org/community/lists/hwloc-users/2014/08/1059.php


_______________________________________________
hwloc-users mailing list
hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org>
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
Link to this post: 
http://www.open-mpi.org/community/lists/hwloc-users/2014/08/1060.php

_______________________________________________ hwloc-users mailing list 
hwloc-us...@open-mpi.org<mailto:hwloc-us...@open-mpi.org> Subscription: 
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users Searchable archives: 
http://www.open-mpi.org/community/lists/hwloc-users/2014/09/index.php

Reply via email to