[petsc-dev] MatGetLocalSize

Jed Brown jedbrown at mcs.anl.gov
Thu Oct 31 10:35:50 CDT 2013


Jose David Bermeol <jbermeol at purdue.edu> writes:

> Hi, I have a dense matrix of size 127200x168 over 2 MPI, so that means
> a have 63600 rows in on MPI process and 63600 in the other. Now When I
> use MatGetLocalSize in rank 0, it says that the number of local rows
> is 63600, but the number of local columns is 84, should not be 168??
> Is this a bug??

Perhaps unintuitively, the "local size" of the matrix represents the
dimensions of the vectors that the matrix can be used with, not the
ownership of entries.  Indeed, there are many matrix representations,
such as MatIS and MatElemental, where an "ownership range" cannot
describe the ownership of entries.  You can use MatGetOwnershipIS() to
get the latter (and even this is an incomplete description for MatIS).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131031/8e6a7e1f/attachment.sig>


More information about the petsc-dev mailing list