[petsc-users] Question about matrix permutation
Barry Smith
bsmith at mcs.anl.gov
Fri Jan 29 13:48:57 CST 2010
On Jan 29, 2010, at 11:29 AM, Michel Cancelliere wrote:
> Thank you for your promptly response, i will use unsorted inex set as
> you suggest (because my submatrices are very large (4 submatrices N/2
> x N/2 from the original one Nx N),
> I realize that i cannot use block matrices because the reordering
> split within the blocks and the resulting matrices are not block
> matrices anymore. In terms of performance how much can affect this to
> the code, in the sense if i apply for example an ILU preconditioner to
> a block matrix (baij) and solve the same system but this time using an
> aij matrix ? not sure if it is clear
It is not clear what you are asking.
**If you have a matrix with say block size of 4 and store it with
BAIJ and do factorizations and solvers and it takes N seconds then
solve the same system with factorization and solvers with AIJ it will
take at least 1.5 * N seconds. The block BAIJ format uses a point
block ILU factorization so usually gives better convergence rate than
AIJ depending on the problem.
But you state that the submatrix you select does not have the same
block structure so my answer ** is irrelevent. In general using a
smart composite preconditioner (as Jed is taking about with
PCFiledSplit or friends) is better then using a dumb global
preconditioner like ILU(0) on the whole problem. Yes, the flop rate
may be lower because you cannot do block ILU on the BAIJ matrix but
there should be so fewer flops because of the better preconditioner
that the smart preconditioner wins. If the smart preconditioner does
not win then it is not a smart preconditioner for the problem :-)
Barry
>
> Thanks
> Michel
>
>
>
>
> On 1/29/10, Jed Brown <jed at 59a2.org> wrote:
>> On Fri, 29 Jan 2010 09:43:05 -0600 (CST), abhyshr at mcs.anl.gov wrote:
>>> Instead of calling MatGetSubMatrix to get each submatrix you can use
>>> MatGetSubMatrices to extract several submatrices at once. See
>>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html#MatGetSubMatrices
>>> .
>>
>> I don't think Michel was asking to extract multiple matrices. In
>> serial, MatGetSubMatrices is implemented by calling MatGetSubMatrix
>> so
>> there is no weaker assumption on index set sortedness.
>>
>> Jed
>>
More information about the petsc-users
mailing list