From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Jul 17 2006 - 13:45:09 PDT
Jason,
PGI versions prior to 6.1 lacked the required inline asm support. So,
you have a new enough version of the PGI compiler. However, the
corresponding support in bupc is not in the released 2.2.2. The atomics
support has undergone a significant re-write since the 2.2.x series, and
thus there is no simple patch to bring a 2.2.2 version up to the current
atomic support. However, the following 2-line change *might* work:
--- gasnet_atomicops.h 7 Mar 2006 23:36:46 -0000 1.76.2.5
+++ gasnet_atomicops.h 17 Jul 2006 20:41:30 -0000
@@ -53,7 +53,6 @@
#if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) || /* for debugging */
\
defined(CRAYT3E) || /* T3E seems to have no atomic ops */
\
defined(_SX) || /* NEC SX-6 atomics not available to user
code? */ \
- (defined(__PGI) && defined(BROKEN_LINUX_ASM_ATOMIC_H)) || /*
haven't implemented atomics for PGI */ \
defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* haven't implemented
atomics for SunCC */
#define GASNETI_USE_GENERIC_ATOMICOPS
#endif
@@ -272,7 +271,7 @@
* support for inline assembly code
*
------------------------------------------------------------------------------------
*/
#elif defined(__i386__) || defined(__x86_64__) /* x86 and
Athlon/Opteron */
- #if defined(__GNUC__) || defined(__INTEL_COMPILER) ||
defined(__PATHCC__)
+ #if defined(__GNUC__) || defined(__INTEL_COMPILER) ||
defined(__PATHCC__) || defined(__PGI)
#ifdef GASNETI_UNI_BUILD
#define GASNETI_LOCK ""
#else
However, it is entirely possible that this will trigger PGI bugs that we
work around in various ways in our development head.
-Paul
Jason Beech-Brandt wrote:
> Hi,
>
> I'm trying to build Berkeley upc-2.2.2 runtime with pgi 6.1-2 on our
> Opteron cluster with the gm-conduit. However, when I do so I'm getting
> an error like
>
> ~/src/berkeley_upc-2.2.2/gasnet/gm-conduit/gasnet_core.c:
> PGC-F-0249-#error -- "We need real atomic ops with signal-safety for
> gasnet_exit..."
> (~/src/berkeley_upc-2.2.2/gasnet/gm-conduit/gasnet_core.c: 907)
> PGC/x86-64 Linux/x86-64 6.1-2: compilation aborted
>
> I've seen some bugs in the bugzilla list concerning pgi and atomics, but
> I got a bit lost. Are there some source/configure modifications I can
> use to get this to work?
>
> Thanks in advance for the advice.
>
> Jason
--
Paul H. Hargrove PHHargrove_at_lbl_dot_gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900