<div class="gmail_quote">On Sat, Jan 14, 2012 at 12:53, Junchao Zhang <span dir="ltr">&lt;<a href="mailto:junchao.zhang@gmail.com">junchao.zhang@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":38v">I want to load a sparse matrix from a file (in PETSc binary format). The matrix will be in MPIAIJ format.<div>I want it is a balanced load: each processor will have nearly equal number of nonzeros.</div><div>
I don&#39;t come up with a sequence of PETSc calls to do that.</div></div></blockquote></div><br><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div><br></div>