[petsc-users] Two applications with PETSc

Guido Giuntoli gagiuntoli at gmail.com
Wed Oct 31 12:24:23 CDT 2018


Hi, I have two codes that use PETSc. The first one is parallel and uses MPI
and the other doesn't uses MPI (uses sequencial Mats and Vecs because the
problem is smaller). I need now to couple both codes and my question is how
do I deal with the PetscInitialize in the sequential code ? I know that
PetscInitialize calls MPI_Init so I think if the first code just called
MPI_Init before I will get an error or not ? Every process in the parallel
code needs to use the functions of the sequential code, so every process
will call PetscInitialize of the sequential code.

constrain : I would like to use the same compiled library of petsc to link
both codes.

Thank you, Guido.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181031/eaf406f6/attachment.html>


More information about the petsc-users mailing list