[petsc-users] Variable Block Row format in PETSc
Jed Brown
jedbrown at mcs.anl.gov
Tue May 14 17:23:09 CDT 2013
Just renumber your nodes. Store the permutation so that you can interpret
the result in terms of the old numbering.
On May 14, 2013 5:21 PM, "Longxiang Chen" <suifengls at gmail.com> wrote:
> My problem is:
>
> I would like to keep the distribution result from parmetis.
> For example, after parmetis, processor 0 has 0, 1, 4 row, and processor 1
> has 2, 3, 5 row. They are not in continuous order.
>
> 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.
>
> Hi, Jed,
>
> 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)?
> Thanks,
>
> Best regards,
> Longxiang Chen
>
>
>
>
>
> On Tue, May 14, 2013 at 3:11 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>
>> AIJ matrix format internally supports VBR listed below [called inodes in
>> PETSc]
>>
>> So I'm not sure what problem you are having.
>>
>> Satish
>>
>> On Tue, 14 May 2013, Longxiang Chen wrote:
>>
>> > VBR like in this link, use 6 arrays to represent a matrix.
>> >
>> http://docs.oracle.com/cd/E19061-01/hpc.cluster5/817-0086-10/prog-sparse-support.html
>> >
>> > Each row is a vertex in the graph, , and use parmetis to partition the
>> > graph to minimize the number of cuts between different processors.
>> (reduce
>> > communication when calculate Matrix-Vector)
>> > The matrix is calculated from Jacobian and construct the A and b from
>> the
>> > result of Jacobian (in VBR).
>> >
>> >
>> > Best regards,
>> > Longxiang Chen
>> >
>> > Do something every day that gets you closer to being done.
>> > --------------------------------------------------------------
>> > 465 Winston Chung Hall
>> > Computer Science Engineering
>> > University of California, Riverside
>> >
>> >
>> >
>> > On Tue, May 14, 2013 at 2:51 PM, Jed Brown <jedbrown at mcs.anl.gov>
>> wrote:
>> >
>> > > What kind of VBR matrix? What are you partitioning using parmetis? A
>> mesh?
>> > > The blocks of the matrix? How do you create the entries in the matrix?
>> > > On May 14, 2013 4:36 PM, "Longxiang Chen" <suifengls at gmail.com>
>> wrote:
>> > >
>> > >> To whom it may concern,
>> > >>
>> > >> I use parmetis to partition a mesh for a sparse matrix.
>> > >> Then I distribute the data to the appropriate processors according
>> to
>> > >> the result of partition.
>> > >>
>> > >> The sparse matrix is stored in Variable Block Row(VBR) format.
>> > >> After the distribution, I want to call PETSc KSP solver to solve Ax
>> = b.
>> > >> I tried to convert VBR to AIJ or CSR format, but the data would be
>> > >> re-distributed.
>> > >>
>> > >> The ideal method is to keep the distribution result from parmetis.
>> > >> For example, after parmetis, processor 0 has 0, 1, 4, and processor 1
>> > >> has 2, 3, 5. I wish the PETSc would not change this distribution and
>> > >> solve Ax = b.
>> > >>
>> > >> Are there any approaches to call KSP solver in VBR format from PETSc?
>> > >> Or any suggestions for solving Ax = b?
>> > >>
>> > >> Thanks in advance.
>> > >>
>> > >> Regards,
>> > >> Longxiang Chen
>> > >>
>> > >>
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130514/19178c3d/attachment.html>
More information about the petsc-users
mailing list