3 ms·
How is that generally done? Platform specific libraries? Utilities that ask the OS to pin a program to a node?
by jjoonathan 5y ago
How is that generally done? Platform specific libraries? Utilities that ask the OS to pin a program to a node?
- pkaye 5y agoIn Linux you can use numactl command to pin a process.
- cyber_kinetist 5y agolibnuma probably does the job. https://github.com/numactl/numactl https://github.com/numactl/numactl
- magicalhippo 5y agoWindows has a NUMA API[1] to help with these things. For pinning a thread you can for example use the SetThreadSelectedCpuSetMasks call[2] from what I can gather. [1]: https://docs.microsoft.com/en-us/windows/win32/procthread/numa-support https://docs.microsoft.com/en-us/windows/win32/procthread/nu... [2]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreadselectedcpusetmasks https://docs.microsoft.com/en-us/windows/win32/api/processth...
- profquail 5y agoIf you want to do set thread-core affinity in a cross-platform way, hwloc is a good approach: https://www.open-mpi.org/projects/hwloc/doc/v2.7.0/a00166.php#gae42c01b2addcfbf6048b9a516dd7a906 https://www.open-mpi.org/projects/hwloc/doc/v2.7.0/a00166.ph...