Re: [OMPI devel] PGI error invoked when svnversion is unavailable

2011-11-22 Thread Jeff Squyres
the version string
> breaking anything.  As for OpenMPI 1.4's development branch, I'll leave the
> choice to patch or leave as-is for someone else to discuss.
> 
> FYI, PGI has assigned my support request TPR #18274.  I'm curious what they
> will come back with.
> 
>   ---
>Tom Rothrock  <thomas.w.rothrock@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.
>   ---
> 
> -Original Message-
> From: Larry Baker [mailto:ba...@usgs.gov] 
> Sent: Tuesday, November 15, 2011 4:08 PM
> To: Thomas Rothrock CTR SMDC SimCtr/GaN Corporation
> Cc: Open MPI Developers; Eugene Loh
> Subject: Re: [OMPI devel] PGI error invoked when svnversion is unavailable
> 
> 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
> ba...@usgs.gov
> ___
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI devel] PGI error invoked when svnversion is unavailable

2011-11-15 Thread Thomas Rothrock CTR SMDC SimCtr/GaN Corporation
Thank you for the reply and attachments.  I searched the archive before
sending my own email and did find a couple of the previous messages, but
believe mine is a different situation.  The macro expansion is working (I'm
using PGI 11.10) but the macro is set to "" instead of "1.7a1? (no
svnversion) MM-DD-" by an error in the configure script generation.
Installing subversion is a cheap workaround that makes the svnversion
command available and the macro gets set to "1.7a1r25476M" or whatever repo
version you are at.

I did not mention it before but this happens when I try to build the trunk
or the 1.5 development branch.  The 1.4 branch's configure code doesn't even
bother to test for svnversion failing and just ends up setting OMPI_VERSION
to "1.4.4rc5r"

The problem is with configure's with_ident_string assignment:

with_ident_string="`echo $with_ident_string | sed -e
's/%VERSION%/'$OMPI_VERSION/`"

OMPI_VERSION is set to "1.7a1? (no svnversion) MM-DD-" but the spaces in
OMPI_VERSION break the expression because sed sees the rest of the version
string as extra arguments instead of part of the -e script.  It doesn't show
up in config.log, but the configure output to the terminal at this point is:

checking if want ident string... sed: -e expression #1, char 18:
unterminated `s' command

The config.status shows:

D["OPAL_IDENT_STRING"]=" \"\""

If I patch config/opal_get_version.m4 to remove the spaces:



diff -Naurd openmpi-trunk.a/config/opal_get_version.m4
openmpi-trunk.b/config/opal_get_version.m4
--- openmpi-trunk.a/config/opal_get_version.m4  2011-09-21
23:17:36.0 -0500
+++ openmpi-trunk.b/config/opal_get_version.m4  2011-11-15
17:36:09.0 -0600
@@ -81,7 +81,7 @@
 if test $? != 0; then
 # The following is too long for Fortran
 # $2_REPO_REV="unknown svn version (svnversion not
found); $d"
-$2_REPO_REV="? (no svnversion); $d"
+$2_REPO_REV="?(nosvnversion);$d"
 fi
 elif test -d "$srcdir/.hg" ; then
 # Check to see if we can find the hg command



it verifies that the spaces were the problem.  OMPI_VERSION gets set to
"1.7a1?(nosvnversion);11-15-2011", configure runs without an sed error, and
config.status shows:

D["OPAL_IDENT_STRING"]=" \"1.7a1?(nosvnversion);11-15-2011\""

and opal/runtime/opal_init.c compiles without triggering the misleading PGI
error, but doesn't look quite as pretty.  Perhaps a better solution is to
modify the with_ident_string assignment to work correclty with spaces in
OMPI_VERSION intact:



diff -Naurd openmpi-trunk.a/opal/config/opal_configure_options.m4
openmpi-trunk.b/opal/config/opal_configure_options.m4
--- openmpi-trunk.a/opal/config/opal_configure_options.m4   2011-11-15
17:55:36.0 -0600
+++ openmpi-trunk.b/opal/config/opal_configure_options.m4   2011-11-15
18:29:43.0 -0600
@@ -489,7 +489,7 @@
 if test "$with_ident_string" = "" -o "$with_ident_string" = "no"; then
 with_ident_string="%VERSION%"
 fi
-with_ident_string="`echo $with_ident_string | sed -e
's/%VERSION%/'$OMPI_VERSION/`"
+with_ident_string="`echo $with_ident_string | sed -e
's/%VERSION%/'"$OMPI_VERSION"'/'`"
 AC_DEFINE_UNQUOTED([OPAL_IDENT_STRING], ["$with_ident_string"],
  [ident string for Open MPI])
 AC_MSG_RESULT([$with_ident_string])


In this case the resulting config.status has:

D["OPAL_IDENT_STRING"]=" \"1.7a1? (no svnversion); 11-15-2011\""

and the compile works.  I have attached the second patch for both trunk and
1.5 as it is probably the better solution (don't assume OMPI_VERSION has no
spaces) and I have not found other instances of spaces in the version string
breaking anything.  As for OpenMPI 1.4's development branch, I'll leave the
choice to patch or leave as-is for someone else to discuss.

FYI, PGI has assigned my support request TPR #18274.  I'm curious what they
will come back with.

  ---
   Tom Rothrock  <thomas.w.rothrock@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.
      -----

Re: [OMPI devel] PGI error invoked when svnversion is unavailable

2011-11-15 Thread Larry Baker
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 BakerUS Geological Survey650-329-5608ba...@usgs.gov 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 outSVN sources from, thus subversion was never installed on this system and the"svnversion" command is unavailable.  After configure, this eventuallyresults in OPAL_IDENT_STRING getting set to an empty string ("").  Thisseems 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 thesame error (or any error at all) and completes, but pgcc fails this case inat least all versions since 8.0-6 and probably earlier.  I have filed asupport request with PGI to see what they say about it, but of course thisdoes nothing for current and older versions.  My quick workaround was tojust install subversion so that the empty string never gets set to beginwith.  Ultimately though should OPAL_IDENT_STRING be ending up empty whenthe "svnversion" command is not available?  ---   Tom Rothrock     US Army Space & Missile Defense Command Simulation Center   256-955-3382 (DSN 645)   FAX 256-955-1231    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 listde...@open-mpi.orghttp://www.open-mpi.org/mailman/listinfo.cgi/develLarry 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 BakerUS Geological Survey650-329-5608ba...@usgs.govLarry,Thank you. I have added your remarks to the FTO, and included documentation into itsresolution.daveOn 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; themethod uses the _Pragma operator; e.g.,#define FOO "foo"#define IDENT(x) _Pragma("ident") xIDENT(FOO)will generate#pragma ident "foo"We will add allowing macro replacement within'#pragma ident'  in our 11.0 release.==regards,davePGI Technical Support wrote:TPR 17186.thanks again,daveLarry Baker wrote:Customer information:Larry BakerUS Geological Survey650-329-5608ba...@usgs.govProduct: 2183-WSPIN: 507549Problem 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 BakerUS Geological Survey650-329-5608ba...@usgs.gov-- Dave Borer    Customer Service Manager, The Portland Groupemail    dave.bo...@st.comphone    (503)-431-7113-- Dave Borer	Customer Service Manager, The Portland Groupemail		dave.bo...@st.comphone		(503)-431-7113


[OMPI devel] PGI error invoked when svnversion is unavailable

2011-11-15 Thread Thomas Rothrock CTR SMDC SimCtr/GaN Corporation
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  
   US Army Space & Missile Defense Command Simulation Center
   256-955-3382 (DSN 645)   FAX 256-955-1231
    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.
  ---




smime.p7s
Description: S/MIME cryptographic signature