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

--- Comment #18 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
On 7 Oct, 2013, at 12:27 PM, jakub at gcc dot gnu.org
<gcc-bugzi...@gcc.gnu.org> wrote:

> 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?

on the build machine
[innocent@vinavx0 testsuite]$ /home/data/newsoft/gcc-build/gcc/xgcc
-B/home/data/newsoft/gcc-build/gcc/
/home/data/newsoft/gcc-gomp4/libgomp/testsuite/libgomp.c/affinity-1.c 
-B/home/data/newsoft/gcc-build/x86_64-unknown-linux-gnu/./libgomp/
-B/home/data/newsoft/gcc-build/x86_64-unknown-linux-gnu/./libgomp/.libs
-I/home/data/newsoft/gcc-build/x86_64-unknown-linux-gnu/./libgomp
-I/home/data/newsoft/gcc-gomp4/libgomp/testsuite/.. -fmessage-length=0
-fno-diagnostics-show-caret -fopenmp  -O2 -DINTERPOSE_GETAFFINITY -DDO_FORK
-ldl   -L/home/data/newsoft/gcc-build/x86_64-unknown-linux-gnu/./libgomp/.libs
-lm   -o ./affinity-1.exe  
[innocent@vinavx0 testsuite]$ ls
Makefile  affinity-1.exe  libgomp.log  libgomp.sum  site.exp
[innocent@vinavx0 testsuite]$ ./affinity-1.exe 

Initial thread bound to {0:8}
#1 thread 1 bound to {0:8}
#1 thread 3 bound to {0:8}
#1 thread 0 bound to {0:8}
#1 thread 2 bound to {0:8}
#1,#1 thread 3,1 bound to {0:8}
#1,#1 thread 3,0 bound to {0:8}
#1,#1 thread 3,2 bound to {0:8}
#1,#2 thread 3,3 bound to {0:8}
#1,#2 thread 3,1 bound to {0:8}
#1,#2 thread 3,0 bound to {0:8}
#1,#2 thread 3,2 bound to {0:8}
#1,#2 thread 3,4 bound to {0:8}
#1,#2,#1 thread 3,3,0 bound to {0:8}
#1,#2,#1 thread 3,3,4 bound to {0:8}
#1,#2,#1 thread 3,3,2 bound to {0:8}
#1,#2,#1 thread 3,3,3 bound to {0:8}
#1,#2,#1 thread 3,3,1 bound to {0:8}
#1,#3 thread 3,0 bound to {0:8}
#1,#3 thread 3,1 bound to {0:8}
#1,#3 thread 3,3 bound to {0:8}
#1,#3 thread 3,2 bound to {0:8}
#1,#4 thread 3,1 bound to {0:8}
#1,#4 thread 3,5 bound to {0:8}
#1,#4 thread 3,2 bound to {0:8}
#1,#4 thread 3,3 bound to {0:8}
#1,#4 thread 3,0 bound to {0:8}
#1,#4 thread 3,4 bound to {0:8}
#2 thread 0 bound to {0:8}
#2 thread 2 bound to {0:8}
#2 thread 4 bound to {0:8}
#2 thread 1 bound to {0:8}
#2 thread 3 bound to {0:8}
#2,#1 thread 3,0 bound to {0:8}
#2,#1 thread 3,2 bound to {0:8}
#2,#1 thread 3,1 bound to {0:8}
#2,#2 thread 3,2 bound to {0:8}
#2,#2 thread 3,1 bound to {0:8}
#2,#2 thread 3,4 bound to {0:8}
#2,#2 thread 3,3 bound to {0:8}
#2,#2 thread 3,0 bound to {0:8}
#2,#3 thread 3,2 bound to {0:8}
#2,#3 thread 3,0 bound to {0:8}
#2,#3 thread 3,1 bound to {0:8}
#2,#3 thread 3,3 bound to {0:8}
#2,#4 thread 3,2 bound to {0:8}
#2,#4 thread 3,0 bound to {0:8}
#2,#4 thread 3,1 bound to {0:8}
#2,#4 thread 3,4 bound to {0:8}
#2,#4 thread 3,5 bound to {0:8}
#2,#4 thread 3,3 bound to {0:8}
#3 thread 1 bound to {0:8}
#3 thread 2 bound to {0:8}
#3 thread 0 bound to {0:8}
#3,#1 thread 2,2 bound to {0:8}
#3,#1 thread 2,0 bound to {0:8}
#3,#1 thread 2,3 bound to {0:8}
#3,#1 thread 2,1 bound to {0:8}
#3,#2 thread 2,1 bound to {0:8}
#3,#2 thread 2,3 bound to {0:8}
#3,#2 thread 2,2 bound to {0:8}
#3,#2 thread 2,0 bound to {0:8}
#3,#2,#1 thread 2,0,1 bound to {0:8}
#3,#2,#1 thread 2,0,0 bound to {0:8}
#3,#2,#1 thread 2,0,2 bound to {0:8}
#3,#2,#1 thread 2,0,3 bound to {0:8}
#3,#2,#1 thread 2,0,4 bound to {0:8}
#3,#2,#2 thread 2,3,1 bound to {0:8}
#3,#2,#2 thread 2,3,0 bound to {0:8}
#3,#2,#2 thread 2,3,2 bound to {0:8}
#3,#2,#2 thread 2,3,3 bound to {0:8}
#3,#2,#2 thread 2,3,4 bound to {0:8}
#3,#3 thread 2,1 bound to {0:8}
#3,#3 thread 2,0 bound to {0:8}
#3,#3 thread 2,3 bound to {0:8}
#3,#3 thread 2,2 bound to {0:8}
#3,#4 thread 2,0 bound to {0:8}
#3,#4 thread 2,3 bound to {0:8}
#3,#4 thread 2,4 bound to {0:8}
#3,#4 thread 2,2 bound to {0:8}
#3,#4 thread 2,5 bound to {0:8}
#3,#4 thread 2,1 bound to {0:8}
#4 thread 3 bound to {0:8}
#4 thread 1 bound to {0:8}
#4 thread 4 bound to {0:8}
#4 thread 2 bound to {0:8}
#4 thread 0 bound to {0:8}
#4,#1 thread 2,2 bound to {0:8}
#4,#1 thread 2,0 bound to {0:8}
#4,#1 thread 2,3 bound to {0:8}
#4,#1 thread 2,1 bound to {0:8}
#4,#2 thread 2,2 bound to {0:8}
#4,#2 thread 2,3 bound to {0:8}
#4,#2 thread 2,0 bound to {0:8}
#4,#2 thread 2,1 bound to {0:8}
#4,#2,#1 thread 2,0,0 bound to {0:8}
#4,#2,#1 thread 2,0,3 bound to {0:8}
#4,#2,#1 thread 2,0,2 bound to {0:8}
#4,#2,#1 thread 2,0,1 bound to {0:8}
#4,#2,#1 thread 2,0,4 bound to {0:8}
#4,#2,#2 thread 2,2,1 bound to {0:8}
#4,#2,#2 thread 2,2,2 bound to {0:8}
#4,#2,#2 thread 2,2,0 bound to {0:8}
#4,#2,#2 thread 2,2,3 bound to {0:8}
#4,#2,#2 thread 2,2,4 bound to {0:8}
#4,#2,#3 thread 2,3,1 bound to {0:8}
#4,#2,#3 thread 2,3,4 bound to {0:8}
#4,#2,#3 thread 2,3,0 bound to {0:8}
#4,#2,#3 thread 2,3,2 bound to {0:8}
#4,#2,#3 thread 2,3,3 bound to {0:8}
#4,#3 thread 2,0 bound to {0:8}
#4,#3 thread 2,2 bound to {0:8}
#4,#3 thread 2,3 bound to {0:8}
#4,#3 thread 2,1 bound to {0:8}
#4,#4 thread 2,1 bound to {0:8}
#4,#4 thread 2,2 bound to {0:8}
#4,#4 thread 2,5 bound to {0:8}
#4,#4 thread 2,3 bound to {0:8}
#4,#4 thread 2,0 bound to {0:8}
#4,#4 thread 2,4 bound to {0:8}
[innocent@vinavx0 testsuite]$ cp ~/public/ctest/pa
parallel/      partialSum.cc  
[innocent@vinavx0 testsuite]$ cp ~/public/ctest/parallel/./affinity-1.exe
cp: missing destination file operand after
`/afs/cern.ch/user/i/innocent/public/ctest/parallel/./affinity-1.exe'
Try `cp --help' for more information.
[innocent@vinavx0 testsuite]$ cp ~/public/ctest/parallel/affinity-1.exe .
cp: cannot stat
`/afs/cern.ch/user/i/innocent/public/ctest/parallel/affinity-1.exe': No such
file or directory
[innocent@vinavx0 testsuite]$ cp aff ~/public/ctest/parallel/.
Makefile        affinity-1.exe* libgomp.log*    libgomp.sum     site.exp        
[innocent@vinavx0 testsuite]$ cp affinity-1.exe  ~/public/ctest/parallel/.
[innocent@vinavx0 testsuite]$ ldd ./affinity-1.exe
    linux-vdso.so.1 =>  (0x00007fff44101000)
    libdl.so.2 => /afs/cern.ch/user/i/innocent/w2/lib/libdl.so.2
(0x00007f03f5ee6000)
    libm.so.6 => /afs/cern.ch/user/i/innocent/w2/lib/libm.so.6
(0x00007f03f5c68000)
    libgomp.so.1 => /afs/cern.ch/user/i/innocent/w2/lib64/libgomp.so.1
(0x00007f03f5a51000)
    libpthread.so.0 => /afs/cern.ch/user/i/innocent/w2/lib/libpthread.so.0
(0x00007f03f5834000)
    libc.so.6 => /afs/cern.ch/user/i/innocent/w2/lib/libc.so.6
(0x00007f03f54ab000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003672000000)
    librt.so.1 => /afs/cern.ch/user/i/innocent/w2/lib/librt.so.1
(0x00007f03f5290000)



on the XEON
 ldd ./affinity-1.exe
    linux-vdso.so.1 =>  (0x00007fff28ffe000)
    libdl.so.2 => /afs/cern.ch/user/i/innocent/w2/lib/libdl.so.2
(0x00007f49aef18000)
    libm.so.6 => /afs/cern.ch/user/i/innocent/w2/lib/libm.so.6
(0x00007f49aec9a000)
    libgomp.so.1 => /afs/cern.ch/user/i/innocent/w2/lib64/libgomp.so.1
(0x00007f49aea83000)
    libpthread.so.0 => /afs/cern.ch/user/i/innocent/w2/lib/libpthread.so.0
(0x00007f49ae866000)
    libc.so.6 => /afs/cern.ch/user/i/innocent/w2/lib/libc.so.6
(0x00007f49ae4dd000)
    /lib64/ld-linux-x86-64.so.2 (0x000000320e800000)
    librt.so.1 => /afs/cern.ch/user/i/innocent/w2/lib/librt.so.1
(0x00007f49ae2c2000)
[innocent@olsnba04 parallel]$ /afs/cern.ch/user/i/innocent/w2/lib/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.1 20110520 (prerelease).
Compiled on a Linux 2.6.32 system on 2011-05-30.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

>  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 ?
no
>  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}'
csh does not like "!"
echo $OMP_PLACES
0,3,6,6,7:2:-1 0,3,6,6,!6 0,3,5,6,7:2:-1 0,3,5,6,!6 0,3,!6,6,7:2:-1 0,3,!6,6,!6
0,2,6,6,7:2:-1 0,2,6,6,!6 0,2,5,6,7:2:-1 0,2,5,6,!6 0,2,!6,6,7:2:-1 0,2,!6,6,!6
0,4,6,6,7:2:-1 0,4,6,6,!6 0,4,5,6,7:2:-1 0,4,5,6,!6 0,4,!6,6,7:2:-1 0,4,!6,6,!6
1,3,6,6,7:2:-1 1,3,6,6,!6 1,3,5,6,7:2:-1 1,3,5,6,!6 1,3,!6,6,7:2:-1 1,3,!6,6,!6
1,2,6,6,7:2:-1 1,2,6,6,!6 1,2,5,6,7:2:-1 1,2,5,6,!6 1,2,!6,6,7:2:-1 1,2,!6,6,!6
1,4,6,6,7:2:-1 1,4,6,6,!6 1,4,5,6,7:2:-1 1,4,5,6,!6 1,4,!6,6,7:2:-1 1,4,!6,6,!6

in zsh
innocent@olsnba04]~/me/public/ctest/parallel% export OMP_PROC_BIND='true';
export OMP_PLACES='{0,1},{3,2,4},{6,5,!6},{6},{7:2:-1,!6}'
[innocent@olsnba04]~/me/public/ctest/parallel% ./affinity-1.exe                 
OMP_PROC_BIND='true' OMP_PLACES='{0,1},{3,2,4},{6,5,!6},{6},{7:2:-1,!6}'
Initial thread
#1 thread 0
#1 thread 2
#1 thread 3
#1 thread 1
#1,#1 thread 3,0
#1,#1 thread 3,2
#1,#1 thread 3,1
#1,#2 thread 3,3
#1,#2 thread 3,0
#1,#2 thread 3,4
#1,#2 thread 3,1
#1,#2 thread 3,2
#1,#2,#1 thread 3,3,3
#1,#2,#1 thread 3,3,4
#1,#2,#1 thread 3,3,0
#1,#2,#1 thread 3,3,2
#1,#2,#1 thread 3,3,1
#1,#3 thread 3,0
#1,#3 thread 3,3
#1,#3 thread 3,2
#1,#3 thread 3,1
#1,#4 thread 3,4
#1,#4 thread 3,2
#1,#4 thread 3,0
#1,#4 thread 3,1
#1,#4 thread 3,3
#1,#4 thread 3,5
#2 thread 3
#2 thread 2
#2 thread 0
#2 thread 4
#2 thread 1
#2,#1 thread 3,0
#2,#1 thread 3,2
#2,#1 thread 3,1
#2,#2 thread 3,0
#2,#2 thread 3,4
#2,#2 thread 3,3
#2,#2 thread 3,2
#2,#2 thread 3,1
#2,#3 thread 3,0
#2,#3 thread 3,3
#2,#3 thread 3,2
#2,#3 thread 3,1
#2,#4 thread 3,0
#2,#4 thread 3,5
#2,#4 thread 3,4
#2,#4 thread 3,3
#2,#4 thread 3,2
#2,#4 thread 3,1
#3 thread 1
#3 thread 0
#3 thread 2
#3,#1 thread 2,0
#3,#1 thread 2,1
#3,#1 thread 2,2
#3,#1 thread 2,3
#3,#2 thread 2,1
#3,#2 thread 2,2
#3,#2 thread 2,3
#3,#2 thread 2,0
#3,#2,#1 thread 2,0,2
#3,#2,#1 thread 2,0,4
#3,#2,#1 thread 2,0,3
#3,#2,#1 thread 2,0,0
#3,#2,#1 thread 2,0,1
#3,#2,#2 thread 2,3,0
#3,#2,#2 thread 2,3,4
#3,#2,#2 thread 2,3,3
#3,#2,#2 thread 2,3,2
#3,#2,#2 thread 2,3,1
#3,#3 thread 2,1
#3,#3 thread 2,2
#3,#3 thread 2,0
#3,#3 thread 2,3
#3,#4 thread 2,1
#3,#4 thread 2,2
#3,#4 thread 2,3
#3,#4 thread 2,5
#3,#4 thread 2,4
#3,#4 thread 2,0
#4 thread 1
#4 thread 2
#4 thread 4
#4 thread 3
#4 thread 0
#4,#1 thread 2,3
#4,#1 thread 2,1
#4,#1 thread 2,2
#4,#1 thread 2,0
#4,#2 thread 2,1
#4,#2 thread 2,3
#4,#2 thread 2,2
#4,#2 thread 2,0
#4,#2,#1 thread 2,0,0
#4,#2,#1 thread 2,0,4
#4,#2,#1 thread 2,0,3
#4,#2,#1 thread 2,0,2
#4,#2,#1 thread 2,0,1
#4,#2,#2 thread 2,2,0
#4,#2,#2 thread 2,2,4
#4,#2,#2 thread 2,2,3
#4,#2,#2 thread 2,2,2
#4,#2,#2 thread 2,2,1
#4,#2,#3 thread 2,3,1
#4,#2,#3 thread 2,3,2
#4,#2,#3 thread 2,3,4
#4,#2,#3 thread 2,3,3
#4,#2,#3 thread 2,3,0
#4,#3 thread 2,0
#4,#3 thread 2,3
#4,#3 thread 2,2
#4,#3 thread 2,1
#4,#4 thread 2,1
#4,#4 thread 2,2
#4,#4 thread 2,3
#4,#4 thread 2,0
#4,#4 thread 2,4
#4,#4 thread 2,5
[innocent@olsnba04]~/me/public/ctest/parallel% 


> 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').
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

--
Il est bon de suivre sa pente, pourvu que ce soit en montant. 
A.G.
http://www.flickr.com/photos/vin60/1320965757/

Reply via email to