[petsc-users] Sparse matrix partitioning in PETSc

Jed Brown jedbrown at mcs.anl.gov
Sat Jan 14 12:20:31 CST 2012


On Sat, Jan 14, 2012 at 12:53, Junchao Zhang <junchao.zhang at gmail.com>wrote:

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

This is a reasonable thing to do for poorly balanced matrices and would be
fairly easy to implement by summing the row indices, choosing offsets, and
distributing. That is, it would be easy to add
-matload_partition_by_nonzeros.

In practice, for good distribution, especially on a different number of
processes than original wrote a matrix, the matrix should be read,
partitioned, and redistributed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120114/c817cf6c/attachment.htm>


More information about the petsc-users mailing list