Samuel,
Thanks a lot ! This is exactly the kind of clarification I've been looking for and it's great to know it's been added to the official docs. hwloc is a pleasure to work with.
Hello,
Vlad, le Thu 31 May 2012 16:49:00 +0200, a écrit :
It seems the documentation lacks explanation about that indeed. I have> This might be a naive question, but I'd like to clarify nonetheless: to provide
> any sort of affinity guarantees, hwloc mem binding APIs assume that any memory
> allocation is done exclusively via hwloc_alloc_membind() and friends? And if I
> use "raw" calls to malloc() or posix_memalign() etc then any ensuing affinity
> will be incidental at best?
added the following text:
Memory binding can be done three ways:
- explicit memory allocation thanks to hwloc_alloc_membind and friends: the
binding will have effect on the memory allocated by these functions.
- implicit memory binding through binding policy: hwloc_set_membind and
friends only define the current policy of the process, which will be
applied to the subsequent calls to malloc() and friends.
- migration of existing memory ranges, thanks to hwloc_set_area_membind()
and friends, which move already-allocated data.
Does it answer your question? (i.e. the first way doesn't have effect on
malloc, while the second way does)
Samuel
_______________________________________________
hwloc-users mailing list
hwloc-users@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users