[Facets-devel] PETSC ERROR

Satish Balay balay at mcs.anl.gov
Thu Jun 4 17:05:53 CDT 2009


On Thu, 4 Jun 2009, Matthew Knepley wrote:

> On Thu, Jun 4, 2009 at 4:51 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> > On Thu, 4 Jun 2009, Matthew Knepley wrote:
> >
> > > > > 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
> > > > flags.
> > > >
> > > >
> > > > 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
> > > > optional]
> > >
> > >
> > > I have no idea what you mean here. Why does optfile have to be an
> > > optional argument?  That makes no sense at all. You provide an
> > > argument, but only want it used sometimes?  DONT PROVIDE IT if it
> > > should not be used.
> >
> > Why is ~/.petscrc or PWD/.petscrc or commandline options optional?
> > Same issue here.
> >
> > Perhaps I want to define a different name than the .file so that its
> > visisble - and give it a unique name - so that its used by only this
> > application [and not other petsc applications]
> >
> > Just giving reasons for why..
> 
> 
> Wait, what reasons. Again, I cannot understand what you are saying., Code an
> example.
> Here is mine:
> 
> if (usingPETSc) {
>   optfile = "myoptions.txt";
> } else {
>   optfile = PETSC_NULL;
> }
> PetscInitialize(optfile);
> 
> What is wrong with this? How can this not be possible?

Ok - this should be possible.

satish



More information about the petsc-dev mailing list