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

Barry Smith bsmith at mcs.anl.gov
Fri Dec 9 18:02:56 CST 2011


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).

   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