[petsc-users] Cholesky: matrix ordering with aij? Bug with debugging=1 for ordering on sbaij?

Barry Smith bsmith at mcs.anl.gov
Thu Nov 27 17:28:00 CST 2014


> On Nov 27, 2014, at 1:59 PM, Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> wrote:
> 
> On 11/27/2014 02:22 PM, Barry Smith wrote:
>>> When/where is the "matrix ordering: nd" used since it is documented to not works on sbaij matrix?
>> 
>>    The factorization is done on the aij matrix and the result put into a sbaij matrix. Since with aij it is easy to reorder rows/columns it can do the factorization in any order it wants. sbaij only stores the upper half of the matrix so factorizing in any ordering besides "natural" is nasty and we don't do it.
> 
> ok!  So the assembled matrix is permuted then returned to it's original ordering or a temporary copy is made? (answer can point into the code)

  factored sparse matrices are never actually permuted around to a different ordering and then factored. Instead the factorization process uses the original data and ordering as it does the factorization. For example if the 5th row is the 1st row in the new ordering then the 5th row is used to produce the 1st row of the factored matrix.

> 
>>> 
>>> Is this the expected behavior?
>> 
>>    Well kind of. When debugging is turned off the the error checking that an ordering is actually a permutation is turned off hence the code gets further (until it cannot do the factorization). Hence two different error messages.
>> 
>>    Now I suspect that it is generating a bad ordering with the sbaij matrix so probably it would be best if we errored out in the MatGetOrdering() always. But even in the current situation nothing is really going wrong.
>> 
>>   Barry
> 
> understood.
> 
> Thanks again!
> 
> Eric
> 
> 



More information about the petsc-users mailing list