Software Archive
Read-only legacy content
17061 Discussions

OpenMP Thread Affinity messages when MKL is used

SergeyKostrov
Valued Contributor II
307 Views
*** OpenMP Thread Affinity messages when MKL is used ***
0 Kudos
3 Replies
SergeyKostrov
Valued Contributor II
307 Views
[ Ivy Bridge CPU - 4 cores ] ... ALGORITHM_STRASSENHBX - Accelerated Processing OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids. OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7} OMP: Info #156: KMP_AFFINITY: 8 available OS procs OMP: Info #157: KMP_AFFINITY: Uniform topology OMP: Info #179: KMP_AFFINITY: 1 packages x 4 cores/pkg x 2 threads/core (4 total cores) OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map: OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 0 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 1 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 1 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 2 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 2 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 3 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 3 thread 1 OMP: Info #147: KMP_AFFINITY: Internal thread 0 bound to OS proc set {0} OMP: Info #147: KMP_AFFINITY: Internal thread 1 bound to OS proc set {2} OMP: Info #147: KMP_AFFINITY: Internal thread 2 bound to OS proc set {4} OMP: Info #147: KMP_AFFINITY: Internal thread 3 bound to OS proc set {6} ...
0 Kudos
SergeyKostrov
Valued Contributor II
307 Views
[ Pentium 4 CPU - 1 core ] ... ALGORITHM_STRASSENHBX - Accelerated Processing OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids. OMP: Warning #205: KMP_AFFINITY: cpuid leaf 11 not supported - decoding legacy APIC ids. OMP: Info #149: KMP_AFFINITY: Affinity capable, using global cpuid info OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0} OMP: Info #156: KMP_AFFINITY: 1 available OS procs OMP: Info #157: KMP_AFFINITY: Uniform topology OMP: Info #159: KMP_AFFINITY: 1 packages x 1 cores/pkg x 1 threads/core (1 total cores) OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map: OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 OMP: Warning #123: Ignoring invalid OS proc ID 2. OMP: Warning #123: Ignoring invalid OS proc ID 4. OMP: Warning #123: Ignoring invalid OS proc ID 6. OMP: Info #147: KMP_AFFINITY: Internal thread 0 bound to OS proc set {0} ...
0 Kudos
SergeyKostrov
Valued Contributor II
307 Views
Thread Affinity control in HPC is very important and Intel MKL provides a set of environment variables to control it. Here is a piece of C code that demonstrates how it could be control at Run-Time: ... //*** Config 01 *** #if ( defined ( _RTTHREADTOPU_BINDING_CONFIG_1 ) ) // Thread to PU Binding: _RTLIBAPI RTuint g_uiThreadToPU[] = // 00->01, 01->03, 02->05, 03->07 { _RTBINDTHREADTOPU01, /* Thread00 -> PU01 */ _RTBINDTHREADTOPU03, /* Thread01 -> PU03 */ _RTBINDTHREADTOPU05, /* Thread02 -> PU05 */ _RTBINDTHREADTOPU07 /* Thread03 -> PU07 */ }; #ifdef _RTTHREADTOPU_BINDING_SHOWINFO _RTLIBAPI RTtchar g_szThreadToPU[] = RTU("KMP_AFFINITY=granularity=fine,proclist=[0,2,4,6],explicit,verbose"); #else _RTLIBAPI RTtchar g_szThreadToPU[] = RTU("KMP_AFFINITY=granularity=fine,proclist=[0,2,4,6],explicit"); #endif #endif ...
0 Kudos
Reply