<div class="gmail_quote">On Tue, Jul 5, 2011 at 09:04, Stefan Kolb <span dir="ltr">&lt;<a href="mailto:skolb@rocketmail.com">skolb@rocketmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I tried to set the local size of the matrix by hand with the command MatSetSizes(A,50, 100,N,M) but then i get an error from PETSc. How can i tell PETSc to store the first 50 rows on process 0 and the next 50 rows on process 1?</blockquote>
</div><br><div>What you did is correct, but MatGetOwnershipRangeColumn() returns the ownership range of a vector that the matrix can be applied to. See the this man page for details on how MPIAIJ matrices are stored:</div>
<div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html">http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html</a></div>