[petsc-users] Print local parts of MATMPIAIJ

Matthew Knepley knepley at gmail.com
Wed Jun 28 10:52:58 CDT 2017


On Wed, Jun 28, 2017 at 10:28 AM, Karin&NiKo <niko.karin at gmail.com> wrote:

> Dear PETSc team,
>
> I am building a distributed MATMPIAIJ matrix with the petsc4py interface
> of PETSc. Then I would like to print, say in separate files, the local
> entries of the matrix owned by the different processes. Indeed, when
> defining a viewer, it prints the whole matrix whether in stdout or in a
> specified file.
>

The rows are partitioned, so seeing what is owned by a process is easy.


> Is there a way of doing so with petsc4py of with PETSc?
>

If you really want separate files, I think you could use


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html

to make a serial local matrix on every proc, which you then viewed.

   Matt


> Thanks,
> Nicolas
>



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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170628/1e9e15c1/attachment-0001.html>


More information about the petsc-users mailing list