[petsc-users] sparse direct solver and number of nonzero elements

Xiangdong Liang xdliang at gmail.com
Fri Dec 9 19:06:38 CST 2011


I use the option  -mat_pastix_verbose 1 to print the Pastix
factorization information. You are right. The sparser one actually has
more Number of nonzeros (with fill-in) and Number of operations (LU),
thus takes longer to factorize. Thanks.
Xiangdong
On Fri, Dec 9, 2011 at 7:30 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> No, a different ordering will be computed, and the ordering with the sparser
> matrix could even lead to more fill.
>
> On Dec 9, 2011 4:13 PM, "Xiangdong Liang" <xdliang at gmail.com> wrote:
>>
>> On Fri, Dec 9, 2011 at 7:02 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> >
>> > On Dec 9, 2011, at 5:55 PM, Xiangdong Liang wrote:
>> >
>> >> Hello everyone,
>> >>
>> >> I am solving Ax=b with sparse direct solver Pastix. I have two
>> >> equivalent A's (upto these zero entries): A1 and A2. A1 is generated
>> >> with ignor_zero_entries and A2 is without this option. For example A1
>> >> has 9 millions nonzeros, while A2 has 10 millions zeros. When I solve
>> >> them with Pastix, I found the time for solving sparser A1 actually is
>> >> longer (10%--20% worse) than A2. Does anyone have thoughts on this?
>> >
>> >   Completely possible and not particularly surprising. The amount of
>> > work required for sparse LU depends in an incrediably complicated way on the
>> > nonzero structure of the matrix, it is only very very minorly related to the
>> > number of nonzeros in the matrix.
>> >   One fun thing to check would be the number of nonzeros in the factor
>> > of A1 and the number of nonzeros in the factor of A2. (I'm not sure if
>> > Pastix has a way to check this).
>>
>> Should the nnz in the factor of A1 be the same as nnz in the factor of
>> A2 since A1 and A2 are the same matrices except some zeros (due to
>> ignore_zero_entries in the matrix assembling)?
>>
>> Xiangdong
>>
>> >
>> >   Barry
>> >
>> >> Thanks.
>> >>
>> >> Xiangdong
>> >>
>> >> P.S. The time I count is only for Spare LU solving (not including the
>> >> matrix assembling time).
>> >


More information about the petsc-users mailing list