<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 28, 2017 at 10:28 AM, Karin&NiKo <span dir="ltr"><<a href="mailto:niko.karin@gmail.com" target="_blank">niko.karin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Dear PETSc team,<br><br></div>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.<br></div></div></div></div></blockquote><div><br></div><div>The rows are partitioned, so seeing what is owned by a process is easy.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div></div>Is there a way of doing so with petsc4py of with PETSc?<br></div></div></div></blockquote><div><br></div><div>If you really want separate files, I think you could use</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html</a></div><div><br></div><div>to make a serial local matrix on every proc, which you then viewed.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div></div>Thanks,<br></div>Nicolas<br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>