George, I compiled trunk with your patch for SPARCV9/Linux/GCC. I see following warning/errors.
---------------------------------------------------------------- In file included from opal/include/opal/sys/atomic.h:175, from opal/asm/asm.c:21: opal/include/opal/sys/sparcv9/atomic.h:213:1: warning: "OPAL_HAVE_ATOMIC_SWAP_64" redefined opal/include/opal/sys/sparcv9/atomic.h:47:1: warning: this is the location of the previous definition In file included from opal/asm/asm.c:21: opal/include/opal/sys/atomic.h:369: error: conflicting types for 'opal_atomic_cmpset_acq_64' opal/include/opal/sys/sparcv9/atomic.h:175: error: previous definition of 'opal_atomic_cmpset_acq_64' was here opal/include/opal/sys/atomic.h:375: error: conflicting types for 'opal_atomic_cmpset_rel_64' opal/include/opal/sys/sparcv9/atomic.h:187: error: previous definition of 'opal_atomic_cmpset_rel_64' was here ---------------------------------------------------------------- The attached patch fixes these warning/errors. I run test programs only in test/asm directory manually because 'make check' doesn't run under my cross-compiling environment. They all passed correctly. P.S. I cannot reply until the next week if you request me something because it's COB in Japan now, sorry. Takahiro Kawashima, MPI development team, Fujitsu > In case someone else want to play with the new atomics here is the most > up-to-date patch. > > George. > > > > On Thu, Jul 31, 2014 at 10:26 PM, Paul Hargrove <phhargr...@lbl.gov> wrote: > > > George: > > > > Have a failure with your patch applied on PPC64/Linux and gcc-4.4.6: > > > > Making all in asm > > make[2]: Entering directory > > `/home/hargrov1/OMPI/openmpi-trunk-linux-ppc64-gcc/BLD/opal/asm' > > CC asm.lo > > In file included from > > /home/hargrov1/OMPI/openmpi-trunk-linux-ppc64-gcc/openmpi-1.9a1r32369/opal/asm/asm.c:21:0: > > /home/hargrov1/OMPI/openmpi-trunk-linux-ppc64-gcc/openmpi-1.9a1r32369/opal/include/opal/sys/atomic.h:374:9: > > error: conflicting types for 'opal_atomic_cmpset_rel_64' > > /home/hargrov1/OMPI/openmpi-trunk-linux-ppc64-gcc/openmpi-1.9a1r32369/opal/include/opal/sys/powerpc/atomic.h:214:19: > > note: previous definition of 'opal_atomic_cmpset_rel_64' was here > > /home/hargrov1/OMPI/openmpi-trunk-linux-ppc64-gcc/openmpi-1.9a1r32369/opal/include/opal/sys/atomic.h:374:9: > > warning: 'opal_atomic_cmpset_rel_64' used but never defined [enabled by > > default] > > make[2]: *** [asm.lo] Error 1 > > > > > > BTW: the patch applied cleanly to trunk except the portion > > changing opal/include/opal/sys/osx/atomic.h, which does not exist. > > > > -Paul > > > > > > On Thu, Jul 31, 2014 at 4:25 PM, George Bosilca <bosi...@icl.utk.edu> > > wrote: > > > >> Awesome, thanks Paul. When the results will be in we will fix whatever is > >> needed for these less common architectures. > >> > >> George. > >> > >> > >> > >> On Thu, Jul 31, 2014 at 7:24 PM, Paul Hargrove <phhargr...@lbl.gov> > >> wrote: > >> > >>> > >>> > >>> On Thu, Jul 31, 2014 at 4:22 PM, Paul Hargrove <phhargr...@lbl.gov> > >>> wrote: > >>> > >>>> > >>>> On Thu, Jul 31, 2014 at 4:13 PM, George Bosilca <bosi...@icl.utk.edu> > >>>> wrote: > >>>> > >>>>> Paul, I know you have a pretty diverse range computers. Can you try to > >>>>> compile and run a “make check” with the following patch? > >>>> > >>>> > >>>> I will see what I can do for ARMv7, MIPS, PPC and IA64 (or whatever > >>>> subset of those is still supported). > >>>> The ARM and MIPS system are emulators and take forever to build OMPI. > >>>> However, I am not even sure how soon I'll get to start this testing. > >>>> > >>> > >>> > >>> Add SPARC (v8plus and v9) to that list.
--- opal/include/opal/sys/sparcv9/atomic.h.george 2014-08-01 17:33:25.874189000 +0900 +++ opal/include/opal/sys/sparcv9/atomic.h 2014-08-01 18:21:25.316102730 +0900 @@ -170,8 +170,8 @@ #endif /* OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64 */ -static inline int opal_atomic_cmpset_acq_64( volatile int64_t *addr, - int64_t oldval, int64_t newval) +static inline int64_t opal_atomic_cmpset_acq_64( volatile int64_t *addr, + int64_t oldval, int64_t newval) { int rc; @@ -182,8 +182,8 @@ } -static inline int opal_atomic_cmpset_rel_64( volatile int64_t *addr, - int64_t oldval, int64_t newval) +static inline int64_t opal_atomic_cmpset_rel_64( volatile int64_t *addr, + int64_t oldval, int64_t newval) { opal_atomic_wmb(); return opal_atomic_cmpset_64(addr, oldval, newval); @@ -210,6 +210,7 @@ #if OPAL_ASSEMBLY_ARCH == OPAL_SPARCV9_64 +#undef OPAL_HAVE_ATOMIC_SWAP_64 #define OPAL_HAVE_ATOMIC_SWAP_64 1 static inline int64_t