[petsc-users] PetscFinalize()

Jed Brown jedbrown at mcs.anl.gov
Wed Oct 3 16:58:22 CDT 2012


On Wed, Oct 3, 2012 at 11:58 AM, Eleni Siampli <siaeleni at hotmail.com> wrote:

> It doen't work good. I have created a dll for solving the eigenPorblem
> (eigenSolver.dll) and I included it in my current project.
> lets say that eigenSolver is the name of my class.. What I use is:
> eigensolver eig;
> for a lot of iterations and works fine. I call only one the
> PetscInitialize();
>
> I want also to use:
> eigensolver eig1;
> eigensolver eig2;
>
> I call only once PetscInitialize(); for each eig1 and eig 2.
>

It is much better to call PetscInitialize only once, ever. There are lots
of ways to set that up in your code. I would use a static variable and
register a finalize routine with my main.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121003/d5ac78c3/attachment.html>


More information about the petsc-users mailing list