Best way to find empty row in matrix

Hong Zhang hzhang at mcs.anl.gov
Sat Aug 25 16:51:06 CDT 2007


Your matrix might have an empty row.
If your matrix indeed has an empty row, you need set val=0
to the diagonal entry.

When petsc LU or ILU detects a zero, it
should give an error of type
[0]PETSC ERROR: Detected zero pivot in LU factorization
see
http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#ZeroPivot!
[0]PETSC ERROR: Zero pivot row 1 value 0 tolerance 3e-12 * rowsum 3!

When this happens, you can use
'-pc_factor_shift_nonzero <shift>'
or
'-pc_factor_shift_positive_definite'
to add an artificial shift.

Hong

On Sat, 25 Aug 2007, Ben Tay wrote:

> Hi,
>
> when KSPSolve is called, I got the following errors:
>
> Detected zero pivot in LU factorization
>
> Empty row in matrix!
>
> There's definitely some errors in the code, but I just can't detect it.
> PETSc does not tell me which row. How can I find out? Btw, I'm working
> in visual fortran
>
> Thank you
>
>




More information about the petsc-users mailing list