[OMPI devel] Master broken for ILP32

2016-05-09 Thread Paul Hargrove
Perhaps this is already known.
Several builds I've tried recently from the ompi (not ompi-release) repo
are failing on 32-bit platforms with
   ../../../opal/.libs/libopen-pal.so: undefined reference to
`__sync_add_and_fetch_8'

This is impacting PRs that I am being asked to test (e.g. 1643).

Note that I did *not* configure with --enable-builtin-atomics, yet
configure seems to show them being selected anyway:

*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking for __sync builtin atomics... yes
checking for processor support of __sync builtin atomic compare-and-swap on
128-bit values... no
checking for __sync builtin atomic compare-and-swap on 128-bit values with
-mcx16 flag... no
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_SYNC
checking for atomic assembly filename... none

-Paul

-- 
Paul H. Hargrove  phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900


Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Gilles Gouaillardet

Paul,


on which distro are you running ?

are you compiling on a 64 bit distro to generate a 32 bit library ?


it seems we are currently only testing a atomic on a long (32 bits on a 
32 bits arch) and


then incorrectly assume it works also on 64 bits (!)


Cheers,


Gilles


On 5/9/2016 3:59 PM, Paul Hargrove wrote:

Perhaps this is already known.
Several builds I've tried recently from the ompi (not ompi-release) 
repo are failing on 32-bit platforms with
 ../../../opal/.libs/libopen-pal.so: undefined reference to 
`__sync_add_and_fetch_8'


This is impacting PRs that I am being asked to test (e.g. 1643).

Note that I did *not* configure with --enable-builtin-atomics, yet 
configure seems to show them being selected anyway:


*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking for __sync builtin atomics... yes
checking for processor support of __sync builtin atomic
compare-and-swap on 128-bit values... no
checking for __sync builtin atomic compare-and-swap on 128-bit
values with -mcx16 flag... no
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte
compare-and-exchange... no
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_SYNC
checking for atomic assembly filename... none

-Paul

--
Paul H. Hargrove phhargr...@lbl.gov 
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900


___
devel mailing list
de...@open-mpi.org
Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/18941.php




Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Hjelm, Nathan Thomas
This really isnt a problem with the atomics code. We have a macro to indicate 
whether 64-bit is really supported. Something in opal is using 64-bit atomics 
without checking if they are supported. With sync atomics we get a link error 
but with the others it is a compile error. I fixed a similar problem in vader 
but it looks like there are more places that need to be fixed.



From: devel on behalf of Gilles Gouaillardet
Sent: Monday, May 09, 2016 2:22:24 AM
To: Open MPI Developers
Subject: Re: [OMPI devel] Master broken for ILP32

Paul,


on which distro are you running ?

are you compiling on a 64 bit distro to generate a 32 bit library ?


it seems we are currently only testing a atomic on a long (32 bits on a 32 bits 
arch) and

then incorrectly assume it works also on 64 bits (!)


Cheers,


Gilles

On 5/9/2016 3:59 PM, Paul Hargrove wrote:
Perhaps this is already known.
Several builds I've tried recently from the ompi (not ompi-release) repo are 
failing on 32-bit platforms with
   ../../../opal/.libs/libopen-pal.so: undefined reference to 
`__sync_add_and_fetch_8'

This is impacting PRs that I am being asked to test (e.g. 1643).

Note that I did *not* configure with --enable-builtin-atomics, yet configure 
seems to show them being selected anyway:
*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking for __sync builtin atomics... yes
checking for processor support of __sync builtin atomic compare-and-swap on 
128-bit values... no
checking for __sync builtin atomic compare-and-swap on 128-bit values with 
-mcx16 flag... no
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_SYNC
checking for atomic assembly filename... none

-Paul

--
Paul H. Hargrove  <mailto:phhargr...@lbl.gov> 
phhargr...@lbl.gov<mailto:phhargr...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900



___
devel mailing list
de...@open-mpi.org<mailto:de...@open-mpi.org>
Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/18941.php



Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Hjelm, Nathan Thomas
Nevermind. Looks like there are two different macros for 64-bit and one is 
wrong in this case. Fix incoming.



From: devel on behalf of Gilles Gouaillardet
Sent: Monday, May 09, 2016 2:22:24 AM
To: Open MPI Developers
Subject: Re: [OMPI devel] Master broken for ILP32

Paul,


on which distro are you running ?

are you compiling on a 64 bit distro to generate a 32 bit library ?


it seems we are currently only testing a atomic on a long (32 bits on a 32 bits 
arch) and

then incorrectly assume it works also on 64 bits (!)


Cheers,


Gilles

On 5/9/2016 3:59 PM, Paul Hargrove wrote:
Perhaps this is already known.
Several builds I've tried recently from the ompi (not ompi-release) repo are 
failing on 32-bit platforms with
   ../../../opal/.libs/libopen-pal.so: undefined reference to 
`__sync_add_and_fetch_8'

This is impacting PRs that I am being asked to test (e.g. 1643).

Note that I did *not* configure with --enable-builtin-atomics, yet configure 
seems to show them being selected anyway:
*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking for __sync builtin atomics... yes
checking for processor support of __sync builtin atomic compare-and-swap on 
128-bit values... no
checking for __sync builtin atomic compare-and-swap on 128-bit values with 
-mcx16 flag... no
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_SYNC
checking for atomic assembly filename... none

-Paul

--
Paul H. Hargrove  <mailto:phhargr...@lbl.gov> 
phhargr...@lbl.gov<mailto:phhargr...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900



___
devel mailing list
de...@open-mpi.org<mailto:de...@open-mpi.org>
Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/18941.php



Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Paul Hargrove
Regarding "distro":
This was happening, for instance, on OpenBSD and NetBSD (32-bit kernels on
64-bit h/w) when testing your PR1643.
However, it sounds like Nathan knows how/where to fix this.

HOWEVER, that is not the only issue here.
Why is master is picking the BUILTIN (__sync) atomics (as shown in the
configure output quoted below), while v2.x (same system and same config
args) uses a .s file:

*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking if gcc -std=gnu99 supports GCC inline assembly... yes
checking if gcc -std=gnu99 supports DEC inline assembly... no
checking if gcc -std=gnu99 supports XLC inline assembly... no
checking for assembly format... default-.text-.globl-:--.L-@-1-0-1-1-0
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_NO
checking for perl... perl
checking for pre-built assembly file... yes (atomic-ia32-linux-nongas.s)
checking for atomic assembly filename... atomic-ia32-linux-nongas.s



-Paul

On Mon, May 9, 2016 at 1:22 AM, Gilles Gouaillardet 
wrote:

> Paul,
>
>
> on which distro are you running ?
>
> are you compiling on a 64 bit distro to generate a 32 bit library ?
>
>
> it seems we are currently only testing a atomic on a long (32 bits on a 32
> bits arch) and
>
> then incorrectly assume it works also on 64 bits (!)
>
>
> Cheers,
>
>
> Gilles
>
> On 5/9/2016 3:59 PM, Paul Hargrove wrote:
>
> Perhaps this is already known.
> Several builds I've tried recently from the ompi (not ompi-release) repo
> are failing on 32-bit platforms with
>../../../opal/.libs/libopen-pal.so: undefined reference to
> `__sync_add_and_fetch_8'
>
> This is impacting PRs that I am being asked to test (e.g. 1643).
>
> Note that I did *not* configure with --enable-builtin-atomics, yet
> configure seems to show them being selected anyway:
>
> *** Assembler
> checking dependency style of gcc -std=gnu99... gcc3
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking for fgrep... /usr/bin/grep -F
> checking for __sync builtin atomics... yes
> checking for processor support of __sync builtin atomic compare-and-swap
> on 128-bit values... no
> checking for __sync builtin atomic compare-and-swap on 128-bit values with
> -mcx16 flag... no
> checking if .proc/endp is needed... no
> checking directive for setting text section... .text
> checking directive for exporting symbols... .globl
> checking for objdump... objdump
> checking if .note.GNU-stack is needed... no
> checking suffix for labels... :
> checking prefix for global symbol labels...
> checking prefix for lsym labels... .L
> checking prefix for function in .type... @
> checking if .size is needed... yes
> checking if .align directive takes logarithmic value... no
> checking if processor supports x86_64 16-byte compare-and-exchange... no
> checking for assembly architecture... IA32
> checking for builtin atomics... BUILTIN_SYNC
> checking for atomic assembly filename... none
>
> -Paul
>
> --
> Paul H. Hargrove   
> phhargr...@lbl.gov
> Computer Languages & Systems Software (CLaSS) Group
> Computer Science Department   Tel: +1-510-495-2352
> Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
>
>
> ___
> devel mailing listde...@open-mpi.org
> Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post: 
> http://www.open-mpi.org/community/lists/devel/2016/05/18941.php
>
>
>
> ___
> devel mailing list
> de...@open-mpi.org
> Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2016/05/18942.php
>



-- 
Paul H. Hargrove  phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900


Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Hjelm, Nathan Thomas
We have chosen to use the __sync builtins by default on master. There was an 
rfc on it awhile ago. Is there a good reason to go back to the inline by 
default or is this just surprising?



From: devel on behalf of Paul Hargrove
Sent: Monday, May 09, 2016 11:12:16 AM
To: Open MPI Developers
Subject: Re: [OMPI devel] Master broken for ILP32

Regarding "distro":
This was happening, for instance, on OpenBSD and NetBSD (32-bit kernels on 
64-bit h/w) when testing your PR1643.
However, it sounds like Nathan knows how/where to fix this.

HOWEVER, that is not the only issue here.
Why is master is picking the BUILTIN (__sync) atomics (as shown in the 
configure output quoted below), while v2.x (same system and same config args) 
uses a .s file:
*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking if gcc -std=gnu99 supports GCC inline assembly... yes
checking if gcc -std=gnu99 supports DEC inline assembly... no
checking if gcc -std=gnu99 supports XLC inline assembly... no
checking for assembly format... default-.text-.globl-:--.L-@-1-0-1-1-0
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_NO
checking for perl... perl
checking for pre-built assembly file... yes (atomic-ia32-linux-nongas.s)
checking for atomic assembly filename... atomic-ia32-linux-nongas.s


-Paul

On Mon, May 9, 2016 at 1:22 AM, Gilles Gouaillardet 
mailto:gil...@rist.or.jp>> wrote:

Paul,


on which distro are you running ?

are you compiling on a 64 bit distro to generate a 32 bit library ?


it seems we are currently only testing a atomic on a long (32 bits on a 32 bits 
arch) and

then incorrectly assume it works also on 64 bits (!)


Cheers,


Gilles

On 5/9/2016 3:59 PM, Paul Hargrove wrote:
Perhaps this is already known.
Several builds I've tried recently from the ompi (not ompi-release) repo are 
failing on 32-bit platforms with
   ../../../opal/.libs/libopen-pal.so: undefined reference to 
`__sync_add_and_fetch_8'

This is impacting PRs that I am being asked to test (e.g. 1643).

Note that I did *not* configure with --enable-builtin-atomics, yet configure 
seems to show them being selected anyway:
*** Assembler
checking dependency style of gcc -std=gnu99... gcc3
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking for fgrep... /usr/bin/grep -F
checking for __sync builtin atomics... yes
checking for processor support of __sync builtin atomic compare-and-swap on 
128-bit values... no
checking for __sync builtin atomic compare-and-swap on 128-bit values with 
-mcx16 flag... no
checking if .proc/endp is needed... no
checking directive for setting text section... .text
checking directive for exporting symbols... .globl
checking for objdump... objdump
checking if .note.GNU-stack is needed... no
checking suffix for labels... :
checking prefix for global symbol labels...
checking prefix for lsym labels... .L
checking prefix for function in .type... @
checking if .size is needed... yes
checking if .align directive takes logarithmic value... no
checking if processor supports x86_64 16-byte compare-and-exchange... no
checking for assembly architecture... IA32
checking for builtin atomics... BUILTIN_SYNC
checking for atomic assembly filename... none

-Paul

--
Paul H. Hargrove  <mailto:phhargr...@lbl.gov> 
phhargr...@lbl.gov<mailto:phhargr...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department   Tel: 
+1-510-495-2352
Lawrence Berkeley National Laboratory Fax: 
+1-510-486-6900



___
devel mailing list
de...@open-mpi.org<mailto:de...@open-mpi.org>
Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/18941.php


___
devel mailing list
de...@open-mpi.org<mailto:de...@open-mpi.org>
Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/18942.php



--
Paul H. Hargrove 

Re: [OMPI devel] Master broken for ILP32

2016-05-09 Thread Paul Hargrove
I would say the switch to __sync atomics by default is surprising to me.
I am *not* campaigning to reverse the result of the RFC (of which I mist
have missed the details and outcome).
However, I have a couple observations:

1) The loss of aqc/rel distinctions is probably minor on x86/x86-64 but
might be significant on other platforms

2) For the case of x86 the "old" inline assembly
provided opal_atomic_cmpset_64, and implemented 64-bit add, sub and swap in
terms of it.
However, gcc is NOT providing a __sync_bool_compare_and_swap_8(), or at
least not where I tested (gcc 4.8.4 and 4.2.1, for instance).
You could call that a gcc bug if you wish.

-Paul

On Mon, May 9, 2016 at 10:43 AM, Hjelm, Nathan Thomas 
wrote:

> We have chosen to use the __sync builtins by default on master. There was
> an rfc on it awhile ago. Is there a good reason to go back to the inline by
> default or is this just surprising?
>
>
> 
> From: devel on behalf of Paul Hargrove
> Sent: Monday, May 09, 2016 11:12:16 AM
> To: Open MPI Developers
> Subject: Re: [OMPI devel] Master broken for ILP32
>
> Regarding "distro":
> This was happening, for instance, on OpenBSD and NetBSD (32-bit kernels on
> 64-bit h/w) when testing your PR1643.
> However, it sounds like Nathan knows how/where to fix this.
>
> HOWEVER, that is not the only issue here.
> Why is master is picking the BUILTIN (__sync) atomics (as shown in the
> configure output quoted below), while v2.x (same system and same config
> args) uses a .s file:
> *** Assembler
> checking dependency style of gcc -std=gnu99... gcc3
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking for fgrep... /usr/bin/grep -F
> checking if .proc/endp is needed... no
> checking directive for setting text section... .text
> checking directive for exporting symbols... .globl
> checking for objdump... objdump
> checking if .note.GNU-stack is needed... no
> checking suffix for labels... :
> checking prefix for global symbol labels...
> checking prefix for lsym labels... .L
> checking prefix for function in .type... @
> checking if .size is needed... yes
> checking if .align directive takes logarithmic value... no
> checking if processor supports x86_64 16-byte compare-and-exchange... no
> checking if gcc -std=gnu99 supports GCC inline assembly... yes
> checking if gcc -std=gnu99 supports DEC inline assembly... no
> checking if gcc -std=gnu99 supports XLC inline assembly... no
> checking for assembly format... default-.text-.globl-:--.L-@-1-0-1-1-0
> checking for assembly architecture... IA32
> checking for builtin atomics... BUILTIN_NO
> checking for perl... perl
> checking for pre-built assembly file... yes (atomic-ia32-linux-nongas.s)
> checking for atomic assembly filename... atomic-ia32-linux-nongas.s
>
>
> -Paul
>
> On Mon, May 9, 2016 at 1:22 AM, Gilles Gouaillardet  <mailto:gil...@rist.or.jp>> wrote:
>
> Paul,
>
>
> on which distro are you running ?
>
> are you compiling on a 64 bit distro to generate a 32 bit library ?
>
>
> it seems we are currently only testing a atomic on a long (32 bits on a 32
> bits arch) and
>
> then incorrectly assume it works also on 64 bits (!)
>
>
> Cheers,
>
>
> Gilles
>
> On 5/9/2016 3:59 PM, Paul Hargrove wrote:
> Perhaps this is already known.
> Several builds I've tried recently from the ompi (not ompi-release) repo
> are failing on 32-bit platforms with
>../../../opal/.libs/libopen-pal.so: undefined reference to
> `__sync_add_and_fetch_8'
>
> This is impacting PRs that I am being asked to test (e.g. 1643).
>
> Note that I did *not* configure with --enable-builtin-atomics, yet
> configure seems to show them being selected anyway:
> *** Assembler
> checking dependency style of gcc -std=gnu99... gcc3
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking for fgrep... /usr/bin/grep -F
> checking for __sync builtin atomics... yes
> checking for processor support of __sync builtin atomic compare-and-swap
> on 128-bit values... no
> checking for __sync builtin atomic compare-and-swap on 128-bit values with
> -mcx16 flag... no
> checking if .proc/endp is needed... no
> checking directive for setting text section... .text
> checking directive for exporting symbols... .globl
> checking for objdump... objdump
> checking if .note.GNU-stack is needed... no
> checking suffix for labels... :
> checking prefix for global symbol labels...
> checking prefix for lsym labels... .L
> checking prefix for function in .type..