OK, this is NOT an issue for v1.5.5, IMHO.
I was mistaken about the ppc atomics having an error that could impact
builds with gcc.
The problems I've seen with xlc-9.0 turn out to be just a plain xlc bug.
When the asm takes as an argument the address of a signed 32-bit int,
the compiler is incorrectly sign-extending the address (probably under
the mistaken belief that it is manipulating the pointed-to type). For
the ILP32 ABI that is not a problem. For the LP64 ABI, pointers get
trashed by this incorrect operation. The attached patch works-around
this bug by conditionally inserting a cast, and I believe it should
apply cleanly to both v1.5 branch (for v1.6) and to the trunk.
-Paul
On 2/24/2012 5:46 PM, Paul H. Hargrove wrote:
Hmm, I was certain I knew what was wrong, but the tests still fail.
Nobody should hold their breath waiting for my patches, but I am still
investigating.
*IF* I can determine that I am right about the asm allowing gcc to
generate bad code then I think this is important for 1.5.5.
Otherwise, I think this is a 1.6 issue.
-Paul
On 2/24/2012 5:19 PM, Paul H. Hargrove wrote:
I see now why I get "check" failures from the opal atomics w/ XLC-9.0.
The inline asm is mildly incorrect and I am actually surprised gcc
didn't produce bad code.
Patch(es) will be sent ASAP as I think this should be fixed for 1.5.5.
-Paul
On 2/23/2012 8:24 PM, Paul H. Hargrove wrote:
This is consistent with my findings w/ XLC (mostly on BG/L and BG/P
front end nodes).
None of the 7.0, 8.0, 9.0 or 11.1 versions of XLC I tested could
generate correct atomics.
They either failed at build time, or failed the tests in test/asm/.
-Paul
On 2/23/2012 8:17 PM, Christopher Samuel wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 24/02/12 15:12, Christopher Samuel wrote:
I suspect this is irrelevant, but I got a build failure trying to
compile it on our BG/P front end node (login node) with the IBM XL
compilers.
Oops, forgot how I built it..
export
PATH=/opt/ibmcmp/vac/bg/9.0/bin/:/opt/ibmcmp/vacpp/bg/9.0/bin:/opt/ibmcmp/xlf/bg/11.1/bin:$PATH
CC=xlc CXX=xlC F77=xlf ./configure&& make
- -- Christopher Samuel - Senior Systems Administrator
VLSCI - Victorian Life Sciences Computation Initiative
Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545
http://www.vlsci.unimelb.edu.au/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9HD1wACgkQO2KABBYQAh9EZgCcCz9x2i6KuE7/UpPzr194jHQD
rdcAni+dfEMhlqMzYMILn8jeS9yWlInu
=+rA4
-----END PGP SIGNATURE-----
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel
--
Paul H. Hargrove phhargr...@lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
--- openmpi-1.5.5rc3r26035/opal/include/opal/sys/powerpc/atomic.h~
2012-02-25 01:15:24.550922758 +0000
+++ openmpi-1.5.5rc3r26035/opal/include/opal/sys/powerpc/atomic.h
2012-02-25 02:37:39.229857857 +0000
@@ -117,6 +117,14 @@
*********************************************************************/
#if OMPI_GCC_INLINE_ASSEMBLY
+#ifdef __xlC__
+/* work-around bizzare xlc bug in which it sign-extends
+ a pointer to a 32-bit signed integer */
+#define OPAL_ASM_ADDR(a) ((uintptr_t)a)
+#else
+#define OPAL_ASM_ADDR(a) (a)
+#endif
+
static inline int opal_atomic_cmpset_32(volatile int32_t *addr,
int32_t oldval, int32_t newval)
{
@@ -130,7 +138,7 @@
" bne- 1b \n\t"
"2:"
: "=&r" (ret), "=m" (*addr)
- : "r" (addr), "r" (oldval), "r" (newval), "m" (*addr)
+ : "r" OPAL_ASM_ADDR(addr), "r" (oldval), "r"
(newval), "m" (*addr)
: "cc", "memory");
return (ret == oldval);
@@ -249,7 +257,7 @@
"subfic r9,r5,0 \n\t"
"adde %0,r9,r5 \n\t"
: "=&r" (ret)
- : "r"(addr),
+ : "r"OPAL_ASM_ADDR(addr),
"m"(oldval), "m"(newval)
: "r4", "r5", "r9", "cc", "memory");
@@ -297,7 +305,7 @@
" stwcx. %0, 0, %3 \n\t"
" bne- 1b \n\t"
: "=&r" (t), "=m" (*v)
- : "r" (inc), "r" (v), "m" (*v)
+ : "r" (inc), "r" OPAL_ASM_ADDR(v), "m" (*v)
: "cc");
return t;
@@ -314,7 +322,7 @@
" stwcx. %0,0,%3 \n\t"
" bne- 1b \n\t"
: "=&r" (t), "=m" (*v)
- : "r" (dec), "r" (v), "m" (*v)
+ : "r" (dec), "r" OPAL_ASM_ADDR(v), "m" (*v)
: "cc");
return t;