[petsc-dev] What is wrong with CHKERRQ() after PetscInitialize()?

Matthew Knepley knepley at gmail.com
Mon Sep 17 20:10:15 CDT 2012


On Mon, Sep 17, 2012 at 8:00 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>    It has never been allowed.
>
>     If PetscInitialize() fails and returns a nonzero error value then we
> cannot know how far PetscInitialize() has gotten and hence if PetscError()
> will run correctly.
>

This is bad design. We should setup CHKERRQ structs first. If they fail
during setup we should MPI_Abort.


>     Similarly CHKERRQ() should not follow PetscFinalize()
>

Similarly here we should tear them down last, and abort on error.

    Matt


>     Should we have another macro for those cases?
>
>    Barry
>
>
>
> On Sep 17, 2012, at 7:56 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> > http://petsc.cs.iit.edu/petsc/petsc-dev/rev/b74991ae4579
> >
> >    Matt
> >
> > --
> > 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
>
>


-- 
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-dev/attachments/20120917/37f70a1f/attachment.html>


More information about the petsc-dev mailing list