<p dir="ltr">Just renumber your nodes. Store the permutation so that you can interpret the result in terms of the old numbering.</p>
<div class="gmail_quote">On May 14, 2013 5:21 PM, "Longxiang Chen" <<a href="mailto:suifengls@gmail.com">suifengls@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">My problem is:<br><br>I would like to keep the distribution result from <span>parmetis</span>.<br>
<div>For example, after <span>parmetis</span>, processor 0 has 0, 1, 4 row, and processor 1 has 2, 3, 5 row. They are not in continuous order.<br><br></div>If
 I set AIJ in PETSc, then 0, 1, 2 would be in processor 0 and 3, 4, 5 
are in processor 1, because PETSc needs the matrix in continuous order.<div class="gmail_extra"><br></div><div class="gmail_extra">Hi, Jed,<br><br></div><div class="gmail_extra">If I partition the graph first, then allocate the matrix, will petsc distribute the matrix according to the partitioning result or it will allocate by itself (ignore the partition before)? <br>


</div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Best regards,<div>Longxiang Chen</div><div><br></div><br><div><br></div></div></div>
<br><br><div class="gmail_quote">On Tue, May 14, 2013 at 3:11 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



AIJ matrix format internally supports VBR listed below [called inodes in PETSc]<br>
<br>
So I'm not sure what problem you are having.<br>
<span><font color="#888888"><br>
Satish<br>
</font></span><div><div><br>
On Tue, 14 May 2013, Longxiang Chen wrote:<br>
<br>
> VBR like in this link, use 6 arrays to represent a matrix.<br>
> <a href="http://docs.oracle.com/cd/E19061-01/hpc.cluster5/817-0086-10/prog-sparse-support.html" target="_blank">http://docs.oracle.com/cd/E19061-01/hpc.cluster5/817-0086-10/prog-sparse-support.html</a><br>
><br>
> Each row is a vertex in the graph, , and use parmetis to partition the<br>
> graph to minimize the number of cuts between different processors. (reduce<br>
> communication when calculate Matrix-Vector)<br>
> The matrix is calculated from Jacobian and construct the A and b from the<br>
> result of Jacobian (in VBR).<br>
><br>
><br>
> Best regards,<br>
> Longxiang Chen<br>
><br>
> Do something every day that gets you closer to being done.<br>
> --------------------------------------------------------------<br>
> 465 Winston Chung Hall<br>
> Computer Science Engineering<br>
> University of California, Riverside<br>
><br>
><br>
><br>
> On Tue, May 14, 2013 at 2:51 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>> wrote:<br>
><br>
> > What kind of VBR matrix? What are you partitioning using parmetis? A mesh?<br>
> > The blocks of the matrix? How do you create the entries in the matrix?<br>
> > On May 14, 2013 4:36 PM, "Longxiang Chen" <<a href="mailto:suifengls@gmail.com" target="_blank">suifengls@gmail.com</a>> wrote:<br>
> ><br>
> >> To whom it may concern,<br>
> >><br>
> >> I use parmetis to partition a mesh for a sparse matrix.<br>
> >> Then I distribute the data to the  appropriate processors according to<br>
> >> the result of partition.<br>
> >><br>
> >> The sparse matrix is stored in Variable Block Row(VBR) format.<br>
> >> After the distribution, I want to call PETSc KSP solver to solve Ax = b.<br>
> >> I tried to convert VBR to AIJ or CSR format, but the data would be<br>
> >> re-distributed.<br>
> >><br>
> >> The ideal method is to keep the distribution result from parmetis.<br>
> >> For example, after parmetis, processor 0 has 0, 1, 4, and processor 1<br>
> >> has 2, 3, 5. I wish the PETSc would not change this distribution and<br>
> >> solve Ax = b.<br>
> >><br>
> >> Are there any approaches to call KSP solver in VBR format from PETSc?<br>
> >> Or any suggestions for solving Ax = b?<br>
> >><br>
> >> Thanks in advance.<br>
> >><br>
> >> Regards,<br>
> >> Longxiang Chen<br>
> >><br>
> >><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>
</blockquote></div>