-par-affinity option doesn't work

-par-affinity option doesn't work


Compiling this code:

using namespace std;


int main(int argc, char *argv[]){
int nproc = omp_get_num_procs();


icpc -openmp -par-affinity=verbose,scatter test.c

then running a.out yields a single line of output ("2", this is a single CPU, dual-core). So the "verbose" modifier isn't taken into account. On the contrary, compiling with:

icpc -openmp test.c 

and setting environment variable KMP_AFFINITY to "verbose,scatter" yields the expected verbose output:

OMP: Info #204: KMP_AFFINITY: decoding cpuid leaf 11 APIC ids.
OMP: Info #205: KMP_AFFINITY: cpuid leaf 11 not supported - decoding cpuid leaf 4 APIC ids.
OMP: Info #149: KMP_AFFINITY: Affinity capable, using global cpuid info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1}
OMP: Info #156: KMP_AFFINITY: 2 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #159: KMP_AFFINITY: 1 packages x 2 cores/pkg x 1 threads/core (2 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 
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 
OMP: Info #147: KMP_AFFINITY: Internal thread 0 bound to OS proc set {0}

icpc version 12.0.0

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

I think I recall seeing -par-affinity="verbose,scatter=1" work. I haven't used it much, as it would be better for multiple platform as well as experimental usage to be able to over-ride by setting KMP_AFFINITY, and recent versions of the library seem not so dependent on KMP_AFFINITY (in the easy cases).

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya