Tom,

This is because the code in OpenMPI presumes macros will be expanded in pragmas, but that is not required by the C standard.  (See my e-mails below from last year with PGI, TPR 17186.)  I fixed OpenMPI 1.4.3 configure in the attached patch.  My patch also disables inline assembly for PGI C++, the same as for PGI C.  (Something similar may also have to be done to solve Eugene's asm statement warnings on Solaris 11.)  It also fixes detection of support for marshaling Fortran REAL16 and COMPLEX32 data types.

Larry Baker
US Geological Survey
650-329-5608

On 15 Nov 2011, at 12:49 PM, Thomas Rothrock CTR SMDC SimCtr/GaN Corporation wrote:

I am building on a separate (unnetworked) system than the one I check out
SVN sources from, thus subversion was never installed on this system and the
"svnversion" command is unavailable.  After configure, this eventually
results in OPAL_IDENT_STRING getting set to an empty string ("").  This
seems to invoke an odd error in the Portland Group (PGI) C compiler (pgcc),
such that

#pragma ident ""

results in:

PGC-F-0010-File write error occurred (temporary pragma .s file)

which is is a bit misleading and took me a while to track down the problem.
My testing has shown that the C++ compiler (pgCC) does not fail with the
same error (or any error at all) and completes, but pgcc fails this case in
at least all versions since 8.0-6 and probably earlier.  I have filed a
support request with PGI to see what they say about it, but of course this
does nothing for current and older versions.  My quick workaround was to
just install subversion so that the empty string never gets set to begin
with.  Ultimately though should OPAL_IDENT_STRING be ending up empty when
the "svnversion" command is not available?

         -----------------------------------------------------------
          Tom Rothrock          <Thomas.W.Rothrock.CTR@us.army.mil>
          US Army Space & Missile Defense Command Simulation Center
          256-955-3382 (DSN 645)                   FAX 256-955-1231
          <http://www.sc.army.mil> Main SimCtr Phone:  256-955-3750
         -----------------------------------------------------------
         This email capability is supported by Department of Defense
         systems and is subject to monitoring.  Please refrain from
         using this address for non-Government purposes.
         -----------------------------------------------------------


_______________________________________________
devel mailing list
devel@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel

Larry Baker wrote:
Dave,

I too read the C99 standard and found that macro substitution is not required in pragmas.  I complained to the OpenMPI folks that they are relying a non-standard feature.  The reason I brought this to your attention is to point out that pgcc and pgCC behave differently (puzzling), neither one describes their behavior, and ident is not documented as a recognized pragma.  Please make sure the documentation is updated to describe whatever the behavior is for pgcc and pgCC.

Thanks,

Larry Baker
US Geological Survey
650-329-5608
baker@usgs.gov

Larry,

Thank you. I have added your remarks to the FTO, and included documentation into its
resolution.


dave


On Oct 7, 2010, at 10:46 AM, PGI Technical Support wrote:

Larry,

An update to TPR 17186. =========================================================

For c99, it is not required to perform macro replacement in pragmas.
However, there are a few exceptions in pgc, such as within 'omp', 'pgi' & 'acc' pragmas.
c99 does define a method which effects replacement within pragmas; the
method uses the _Pragma operator; e.g.,

#define FOO "foo"
#define IDENT(x) _Pragma("ident") x
IDENT(FOO)

will generate
#pragma ident "foo"

We will add allowing macro replacement within
'#pragma ident'  in our 11.0 release.

==========================================================


regards,
dave






PGI Technical Support wrote:
TPR 17186.

thanks again,
dave

Larry Baker wrote:
Customer information:

Larry Baker
US Geological Survey
650-329-5608
baker@usgs.gov

Product: 2183-WS
PIN: 507549

Problem description:

pgcc issues the warning Pragma ignored string expected after #pragma ident when compiling openmpi-1.4.2 from http://www.open-mpi.org.

The source of this problem is that OpenMPI #defines the string it wants to use in a #pragma ident instead of using a literal string value.  However, pgcc does not perform macro substitution on #pragma ident statements.  Curiously, pgCC does!  This is not documented anywhere.  Also, #pragma ident is not listed as a recognized pragma, even though it seems to be properly compiled into the ELF object file.  It would be consistent with gcc and pgCC if pgcc would perform macro substitution in pragmas.

Larry Baker
US Geological Survey
650-329-5608
baker@usgs.gov





-- 
Dave Borer    Customer Service Manager, The Portland Group
email        dave.borer@st.com
phone        (503)-431-7113




-- 
Dave Borer Customer Service Manager, The Portland Group
email dave.borer@st.com
phone (503)-431-7113