[petsc-users] Sparse matrix partitioning in PETSc

Junchao Zhang junchao.zhang at gmail.com
Sat Jan 14 11:53:17 CST 2012


I want to load a sparse matrix from a file (in PETSc binary format). The
matrix will be in MPIAIJ format.
I want it is a balanced load: each processor will have nearly equal number
of nonzeros.
I don't come up with a sequence of PETSc calls to do that.

On Sat, Jan 14, 2012 at 11:41 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Sat, Jan 14, 2012 at 12:38, Junchao Zhang <junchao.zhang at gmail.com>wrote:
>
>> Does PETSc provide convenient functions to compute this layout( i.e.,#
>> rows on each processor), or I have to do it myself?
>> I browsed PETSc document and did not find them.
>>
>
> MatSetSizes() lets you specify local and/or global sizes. If you specify
> both, it checks that they are compatible. The implementation uses
>
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html
>
>
> If these are not suitable for your purposes, can you be more specific
> about what you would like to do?
>



-- 
Junchao Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120114/128858ab/attachment-0001.htm>


More information about the petsc-users mailing list