[petsc-users] A Beginner Question

Jed Brown jedbrown at mcs.anl.gov
Tue Jul 5 10:33:38 CDT 2011


On Tue, Jul 5, 2011 at 09:04, Stefan Kolb <skolb at rocketmail.com> wrote:

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


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:

http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110705/1f389a6b/attachment.htm>


More information about the petsc-users mailing list