79406868

Date: 2025-02-02 15:50:22
Score: 1
Natty:
Report link

Sure, you are looking for what is called thread affinity control.

Volume 2 of the art of HPC, chapter 25 (online for free) has a great explanation on how to do it, here is a global view answer:

Thread placement can be controlled with two environment variables:

The environment variable OMP_PROC_BIND describes how threads are bound to OpenMP places

While the variable OMP_PLACES describes these places in terms of the available hardware.

When you're experimenting with these variables it is a good idea to set OMP_DISPLAY_ENV to true, so that OpenMP will print out at runtime how it has interpreted your specification.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jcernuda95