[petsc-users] petsc4py: Passing command line switches

Matthew Knepley knepley at gmail.com
Wed Mar 25 10:34:22 CDT 2015


On Wed, Mar 25, 2015 at 10:29 AM, Florian Lindner <mailinglists at xgm.de>
wrote:

> Am Mittwoch, 25. März 2015, 10:17:45 schrieb Matthew Knepley:
> > On Wed, Mar 25, 2015 at 10:13 AM, Florian Lindner <mailinglists at xgm.de>
> > wrote:
> >
> > > Hello,
> > >
> > > I'm using the petsc4py. It works fine after some hurdling with missing
> > > documentation. (were not able to find API doc anywhere, I generated it
> > > myself now).
> > >
> > > I try to use the switches like -ksp_monitor like that:
> > >
> > > import petsc4py
> > > from petsc4py import PETSc
> > >
> > > petsc4py.init(sys.argv)
> > >
> > > but no reaction when calling my script like that:
> > >
> > > python prbf.py -ksp_monitor
> > >
> > > What am I doing wrong? I also tried calling init before importing PETSc
> > > but no changes.
> > >
> >
> > Did you remember to call setFromOptions() on the KSP? We do not configure
> > anything from
> > the command line unless you tell us to. That way, people can do things
> > solely from the API
> > is they want.
>
> Double fail from my said.
>
> I works when called like that:
>
> import petsc4py
> petsc4py.init(sys.argv)
> from petsc4py import PETSc
>
> Importing PETSc probably calls init and subsequent calls have no effect.
>
> > How did you generate the documentation?
>
> Second fail. I tried to generate it yesterday after I cloned the git and
> was unable to generate myself. make html does not brought much sphinx doc.
> Then I learned that the tarball contains an epydoc. Is that available
> online somewhere?
>
> The online repo is a bit confusing, it contains an index.rst
> https://bitbucket.org/petsc/petsc4py/src/9dce29cab0b03f4d75fdebab087575b9635bd206/docs/index.rst?at=master
> but this file seems to be competely dysfunctional. It looks like links in
> the document but nothing clickable (I can't even mark test), the
> Blame/Embed/Raw also seem dysfunctional.
>

That file is obviously old and was removed.

Lisandro, are we generating documentation somewhere?

  Thanks,

     Matt


> Thanks,
> Florian
>
> >
> >   Thanks,
> >
> >     Matt
> >
> >
> > > Thanks,
> > > Florian
> > >
> >
> >
> >
> >
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150325/26cb6ac1/attachment.html>


More information about the petsc-users mailing list