3 ms·
Use hwloc[1] to determine the hardware topology of the system, and pin processes/threads appropriately. For a heterogeneous system, you presumably want to avoi
by gnufx 3y ago
Use hwloc[1] to determine the hardware topology of the system, and pin processes/threads appropriately. For a heterogeneous system, you presumably want to avoid low-performance cores. OpenMP has a standard way of assigning threads to cores. Otherwise use hwloc, or perhaps likwid[2] explicitly.
Most things turn out to be memory-limited, and getting the algorithm right may win more than simple parallelism; GEMM is a case in point. As ever, profile first, and worry about thread numbers after you've pinned appropriately and looked for simple things like initialization interacting with memory policy.
The main HPC performance tools support Python and native code; Threadspotter was good for threading/cache analysis, but seems moribund. Note that SMT on POWER, for instance, is different from x86.
(This is general HPC performance engineering; I haven't considered the code in point.)
1. https://www.open-mpi.org/projects/hwloc/ https://www.open-mpi.org/projects/hwloc/
2. https://github.com/rrze-likwid/likwid https://github.com/rrze-likwid/likwid