[petsc-dev] PetscIntialize docs

Satish Balay balay at mcs.anl.gov
Thu Sep 5 10:30:08 CDT 2013


On Thu, 5 Sep 2013, Matthew Knepley wrote:

> On Thu, Sep 5, 2013 at 9:44 AM, Mark F. Adams <mfadams at lbl.gov> wrote:
> 
> > >
> > >  1) ~username/.petscrc
> > >  2) cwd/.petscrc
> > >  3) "code specific file", whose name is passed into PetscIntitialize()
> > >
> > > If you pass in NULL to PetscInitialize(), it will not check option 3).
> > If you pass in a real name to PetscIntiialize(), and
> > > in the "code specific file" you put -skpi_petscrc, then it will not
> > check options 1) and 2).
> > >
> >
> > You can't put -skip_petscrc in the code specific file.  The whole idea of
> > -skip_petscrc is that it keeps the code from trying to open a file.  The
> > code opens the code specific file first, then command line args, then
> > checks for -skip_petscrc.  So you need to give NULL for the the "file" here
> > and put -skip_petscrc on the command line, if I am reading the code
> > correctly.
> >
> 
> Mark, it works exactly as I said in my first message. You can give
> -skip_petscrc in the "code specific file" to prevent
> reading the default files. You can ALSO give it on the command line to
> prevent it reading the default files.

Mark,

Think of it this way.

User can control "code specific file" by either specifying it or not
with PetscInitialize()

For the ther files [~/.petscrc, .petscrc, petscrc] - the only way to
disable it is with the option -skip_petscrc. [This option can be
specified at command line. But if one is using "code specific file" -
it would work aswell.

Are your users using "code specific file" with PetscIntialize()? What
problem are they encountering?

Satish



More information about the petsc-dev mailing list