http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58642

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to vincenzo Innocente from comment #16)
> [innocent@olsnba04 parallel]$ setenv OMP_PROC_BIND false
> [innocent@olsnba04 parallel]$ ./affinity-1.exe
> OMP_PROC_BIND='false'
> Initial thread
> #1 thread 1
> #1 thread 3
> #1 thread 2
> #1 thread 0
...

Thanks, though not what I was hoping to see.  What glibc do you have on the
build box where you compiled the testcase?  If it is too old (doesn't have
CPU_ALLOC_SIZE macro defined), or -DINTERPOSE_GETAFFINITY -DDO_FORK isn't
defined, or config.h doesn't defined HAVE_PTHREAD_AFFINITY_NP, then that's
expected.  Or is the output running under taskset -c 0-3 ?  The test verifies
things only if the initial affinity bitmask contains at least logical CPUs from
0 to 7 inclusive.
What I'm getting and expect is something like:
OMP_PROC_BIND='true' OMP_PLACES='{0,1},{3,2,4},{6,5,!6},{6},{7:2:-1,!6}'
Initial thread bound to {0:2}, verified
#1 thread 2 bound to {5}
#1 thread 0 bound to {0:2}
#1 thread 3 bound to {6}
#1 thread 1 bound to {2:3}
...
#1,#4 thread 3,5 bound to {6}
#2 thread 0 bound to {0:2}, verified
#2 thread 2 bound to {5}, verified
#2 thread 1 bound to {2:3}, verified
...
#4,#4 thread 2,0 bound to {5}, verified
#4,#4 thread 2,5 bound to {5}, verified
OMP_PROC_BIND='true' OMP_PLACES='{1}:7:1'
Initial thread bound to {1}, verified
...
(", verified" shouldn't be on lines starting with #1 if the header says
OMP_PROC_BIND='true').

Reply via email to