[petsc-dev] parsing FORTRAN command line on Cray XC40

Satish Balay balay at mcs.anl.gov
Sun Mar 22 12:11:53 CDT 2015


All of this code [related to fortran command line processing] is old hackey.

Does the following change fix the issue for you?

diff --git a/config/BuildSystem/config/utilities/fortranCommandLine.py b/config/BuildSystem/config/utilities/fortranCommandLine.py
index 25833a0..ae47da5 100644
--- a/config/BuildSystem/config/utilities/fortranCommandLine.py
+++ b/config/BuildSystem/config/utilities/fortranCommandLine.py
@@ -50,13 +50,13 @@ class Configure(config.base.Configure):
       self.addDefine('HAVE_NAGF90',1)
     elif self.functions.check('PXFGETARG', libraries = self.compilers.flibs):
       self.addDefine('HAVE_PXFGETARG',1)
-    elif self.functions.check('iargc_', libraries = self.compilers.flibs):
-      self.addDefine('HAVE_BGL_IARGC',1)
     elif self.functions.check('GETARG at 16', libraries = self.compilers.flibs):
       self.addDefine('USE_NARGS',1)
       self.addDefine('HAVE_IARG_COUNT_PROGNAME',1)
     elif self.functions.check('_gfortran_iargc', libraries = self.compilers.flibs):
       self.addDefine('HAVE_GFORTRAN_IARGC',1)
+    elif self.functions.check('iargc_', libraries = self.compilers.flibs):
+      self.addDefine('HAVE_BGL_IARGC',1)
     self.popLanguage()
     return
 


Perhaps there is a way to remove all of this [c] code - and use a
single fortran routine [that works with all fortran compilers] - to
process command line args..

Satish

On Sun, 22 Mar 2015, Stefano Zampini wrote:

> command line parsing does not work from FORTRAN programs only, it works for
> C/C++
> 
> 2015-03-22 12:19 GMT+03:00 Stefano Zampini <stefano.zampini at gmail.com>:
> 
> > It seems that command line parsing does not work on my personal
> > installation on a CrayXC40.
> > Namely, the number of command line arguments is always zero.
> > Attached a configure.log and the petscconf.h file generated
> >
> > I'm using the GNU module inside CRAY compiler wrappers but PETSc configure
> > doesn't define  any of  PETSC_HAVE_GFORTRAN_IARGC,
> > PETSC_HAVE__GFORTRAN_IARGC. Instead, it defines PETSC_HAVE_BGL_IARGC.
> >
> > I'm working on branch stefano_zampini/pcbddc-adaptive-selection
> >
> > --
> > Stefano
> >
> 
> 
> 
> 




More information about the petsc-dev mailing list