Community
cancel
Showing results for 
Search instead for 
Did you mean: 
llevrel
Beginner
115 Views

-par-affinity option doesn't work

Hi,

Compiling this code:
[bash]#include 
using namespace std;

#include

int main(int argc, char *argv[]){
int nproc = omp_get_num_procs();
cout<<}
[/bash]
with:
[bash]icpc -openmp -par-affinity=verbose,scatter test.c[/bash]
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:
[bash]icpc -openmp test.c 
[/bash]
and setting environment variable KMP_AFFINITY to "verbose,scatter" yields the expected verbose output:
[bash]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}
2
[/bash]

icpc version 12.0.0
0 Kudos
1 Reply
TimP
Black Belt
115 Views

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).
Reply