[petsc-users] Can I call PetscInitialize twice in a programm

Jed Brown jed at 59A2.org
Tue Aug 31 17:11:56 CDT 2010


On Tue, 31 Aug 2010 18:05:01 -0400, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> On Aug 31, 2010, at 6:06 PM, Jed Brown wrote:
> 
> > On Tue, 31 Aug 2010 15:58:30 -0600, nan zhao <zhaonanavril at gmail.com> wrote:
> >> Hi,
> >> 
> >> I am now using petsc to develop some application which need to solve two
> >> physical systems. I want to use Petsc as the linear solver. but I am not
> >> sure if I can all PetscInitialize twice.
> > 
> > No, you can only call it once.
> 
>    This is no longer true, though it was true for 15 years.

Shows how old I am. ;-)

Presumably this only works if PETSc is *not* calling MPI_Init().

Jed


More information about the petsc-users mailing list