<div dir="ltr">Satish,<div><br></div><div>thanks. It works now.</div><div><br></div><div>Stefano</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-22 20:11 GMT+03:00 Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All of this code [related to fortran command line processing] is old hackey.<br>
<br>
Does the following change fix the issue for you?<br>
<br>
diff --git a/config/BuildSystem/config/utilities/fortranCommandLine.py b/config/BuildSystem/config/utilities/fortranCommandLine.py<br>
index 25833a0..ae47da5 100644<br>
--- a/config/BuildSystem/config/utilities/fortranCommandLine.py<br>
+++ b/config/BuildSystem/config/utilities/fortranCommandLine.py<br>
@@ -50,13 +50,13 @@ class Configure(config.base.Configure):<br>
       self.addDefine('HAVE_NAGF90',1)<br>
     elif self.functions.check('PXFGETARG', libraries = self.compilers.flibs):<br>
       self.addDefine('HAVE_PXFGETARG',1)<br>
-    elif self.functions.check('iargc_', libraries = self.compilers.flibs):<br>
-      self.addDefine('HAVE_BGL_IARGC',1)<br>
     elif self.functions.check('GETARG@16', libraries = self.compilers.flibs):<br>
       self.addDefine('USE_NARGS',1)<br>
       self.addDefine('HAVE_IARG_COUNT_PROGNAME',1)<br>
     elif self.functions.check('_gfortran_iargc', libraries = self.compilers.flibs):<br>
       self.addDefine('HAVE_GFORTRAN_IARGC',1)<br>
+    elif self.functions.check('iargc_', libraries = self.compilers.flibs):<br>
+      self.addDefine('HAVE_BGL_IARGC',1)<br>
     self.popLanguage()<br>
     return<br>
<br>
<br>
<br>
Perhaps there is a way to remove all of this [c] code - and use a<br>
single fortran routine [that works with all fortran compilers] - to<br>
process command line args..<br>
<span class="HOEnZb"><font color="#888888"><br>
Satish<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, 22 Mar 2015, Stefano Zampini wrote:<br>
<br>
> command line parsing does not work from FORTRAN programs only, it works for<br>
> C/C++<br>
><br>
> 2015-03-22 12:19 GMT+03:00 Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com">stefano.zampini@gmail.com</a>>:<br>
><br>
> > It seems that command line parsing does not work on my personal<br>
> > installation on a CrayXC40.<br>
> > Namely, the number of command line arguments is always zero.<br>
> > Attached a configure.log and the petscconf.h file generated<br>
> ><br>
> > I'm using the GNU module inside CRAY compiler wrappers but PETSc configure<br>
> > doesn't define  any of  PETSC_HAVE_GFORTRAN_IARGC,<br>
> > PETSC_HAVE__GFORTRAN_IARGC. Instead, it defines PETSC_HAVE_BGL_IARGC.<br>
> ><br>
> > I'm working on branch stefano_zampini/pcbddc-adaptive-selection<br>
> ><br>
> > --<br>
> > Stefano<br>
> ><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Stefano</div>
</div>