So, I looked online for some time to no avail. I am new to using OpenMP and therefore not sure of the terminology here, but is there a way to calculate a specific mapping of computers with OMPThread (given by omp_get_thread_num ();) and the physical kernels on which the threads will run?
I was also interested in how exactly the OMP streams are assigned, for example, stream 0 will always work in the same place when the same code runs on the same computer? Thank.
As a rule, the OS takes care of assigning threads to the kernel, including using OpenMP. This is by design, and it’s good - as a rule, you would like the OS to be able to move the thread through the kernels (transparently into your application) as necessary, as this interrupts your application from time to time.
Some operating system APIs allow you to set the affinity of threads. For example, on Windows, you can use SetThreadAffinityMask to force a thread to a specific kernel.
Reed , OpenMP ( ). - , , , , , , OpenMP. , OpenMP, , , . OpenMP ARB - "" , OpenMP, , . , OpenMP , , .