Hello
Which hwloc release are you using? Before hwloc 2.0, libnuma/numactl devel headers were required for memory binding. The end of the output of "configure" will tell you whether memory binding is supported when building such an old release: ----------------------------------------------------------------------------- Hwloc optional build support status (more details can be found above): [...] libnuma memory support: yes [...] ----------------------------------------------------------------------------- Besides, on a laptop, memory binding is usually useless on laptops because there's a single NUMA node. All your allocation can only go to one place, there's no need to enforce anything. Also some kernels may have NUMA support disabled for such platforms. You need CONFIG_NUMA: grep NUMA /boot/config-$(uname -r) [...] CONFIG_NUMA=y [...] For MPI on a laptop, you may still want to bind execution so that cache locality is enforced. This is done with hwloc_set_cpubind(). But most MPI implementations have easier ways to bind their ranks anyway. Brice Le 03/12/2018 à 08:46, Sa3aD vIp a écrit : > Hello, > > first of all, thank you so much for this tool. > Actually, I have tried to bind memory but with no success. > I have got this message: > Couldn't bind to cpuset 0x00000001: Function not implemented > Couldn't bind to cpuset 0x00000020: Function not implemented > Couldn't bind to cpuset 0x00000004: Function not implemented > Couldn't bind to cpuset 0x00000008: Function not implemented > Couldn't bind to cpuset 0x00000010: Function not implemented > Couldn't bind to cpuset 0x00000002: Function not implemented > > > My program code: > int flags; > hwloc_membind_policy_t policy; > policy = HWLOC_MEMBIND_BIND; > flags = HWLOC_MEMBIND_PROCESS; > hwloc_cpuset_t cpuset; > cpuset = hwloc_bitmap_alloc(); > if (!cpuset) > { > fprintf(stderr, "failed to allocate a bitmap\n"); > hwloc_topology_destroy(HWtopology); > } > hwloc_get_cpubind(HWtopology, cpuset, 0); > > if(hwloc_set_membind(HWtopology, cpuset, policy, flags)) > { > char *showStringMSGofERROR; > int errorNumber = errno; > hwloc_bitmap_asprintf(&showStringMSGofERROR, cpuset); > printf("Couldn't bind to cpuset %s: %s\n", showStringMSGofERROR, > strerror(errorNumber)); > free(showStringMSGofERROR); > } > > > if it's not possible to bind in my laptop - is there any option to > bind memory or cache for specific MPI process. > > > Thanks a lot in advance. > SAAD > > > _______________________________________________ > hwloc-devel mailing list > hwloc-devel@lists.open-mpi.org > https://lists.open-mpi.org/mailman/listinfo/hwloc-devel
_______________________________________________ hwloc-devel mailing list hwloc-devel@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/hwloc-devel