[Facets-devel] PETSC ERROR

Satish Balay balay at mcs.anl.gov
Thu Jun 4 16:15:21 CDT 2009

On Thu, 4 Jun 2009, Matthew Knepley wrote:

> On Thu, Jun 4, 2009 at 3:37 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> > Barry/Matt,
> >
> > Should we make optfile in PetscIntialize(optfile) optional?
> Why would the user give an argument for optfile, but not intend it to be
> found?

Normally command line options is the way to pass in optional flags to
a petsc binary. In this application - command line options are not
possible [due to python/other packages that control main] - hence an
PetscIntialize("petscopt") is used to pass in equivalent optional

Also In this code - PETSc [solver] usage is optional. I guess there
are 2 ways of implementing this.

The first is to always call PetscInitialize()/Finalize() - but
optionally use PETSc solvers. [in this case optfile should be

The other mode is to avoid PetscIntialize()/Finalize() - when
non-petsc solvers are selected.  [but this means more complicated
options check - before PetscIntialize()/MPI_Init() is called. The code
currently tries to do this - ocassionaly errors such as this pop-up]

I guess Ideally - the optional_flag should be exposed all the way to
PetscInitialize() - so the user can make the choice if this opt-file
is optional or required..


More information about the petsc-dev mailing list