[petsc-users] Serial solution of system in MPI FEM application

Matthew Knepley knepley at gmail.com
Fri Apr 16 09:06:45 CDT 2021


On Fri, Apr 16, 2021 at 9:46 AM Ivano Barletta <ivano.barletta at cmcc.it>
wrote:

> Dear all,
>
> I have an MPI FEM application with an elliptic problem that I
> solve with PETSc. For debugging purposes I want to
> let the master process to solve the global system.
>
> Is there any simple way in PETSc to gather the distributed matrix
> (the type is MATMPIAIJ) on a single MPI process?
>

You could use


https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSubMatrices.html

to extract a single, serial matrix on process 0. However, you can do this
with the solver automatically using


https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCTELESCOPE.html

If you have the memory, you can do this more simply with


https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCREDUNDANT.html

  Thanks,

     Matt


> Thanks,
> Ivano
>
>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210416/b91b9794/attachment.html>


More information about the petsc-users mailing list