[petsc-users] 3.5 -> 3.6 Change in MatOrdering Behavior

Hong hzhang at mcs.anl.gov
Thu Jan 21 11:16:54 CST 2016

Paul :
Using petsc-dev (we recently added feature for better displaying
convergence behavior), I found that '-sub_pc_factor_mat_ordering_type 1wd'
causes zero pivot:

./ex10 -f0 test.mat -rhs 0 -pc_type asm -pc_asm_overlap 12 -sub_pc_type ilu
-sub_pc_factor_mat_ordering_type 1wd -sub_pc_factor_levels 4
Linear solve did not converge due to DIVERGED_PCSETUP_FAILED iterations 0
               PCSETUP_FAILED due to SUBPC_ERROR
Number of iterations =   0

adding option '-info |grep zero'
[0] MatPivotCheck_none(): Detected zero pivot in factorization in row 0
value 0. tolerance 2.22045e-14

or '-ksp_error_if_not_converged'
[0]PETSC ERROR: Zero pivot in LU factorization:
[0]PETSC ERROR: Zero pivot row 0 value 0. tolerance 2.22045e-14

'-sub_pc_factor_mat_ordering_type natural' avoids it:
./ex10 -f0 test.mat -rhs 0 -pc_type asm -pc_asm_overlap 12 -sub_pc_type ilu
-sub_pc_factor_mat_ordering_type natural -sub_pc_factor_levels 4
Linear solve converged due to CONVERGED_RTOL iterations 1
Number of iterations =   1
  Residual norm < 1.e-12


> We have a test that has started failing upon switching from 3.5.4 to 3.6.0
> (actually went straight to 3.6.3 but checked this is repeatable with
> 3.6.0). I've attached the matrix generated with -mat_view binary and a
> small PETSc program that runs in serial that reproduces the behavior by
> loading the matrix and solving a linear system (RHS doesn't matter here).
> For context, this matrix is the Jacobian of a Taylor-Hood approximation of
> the axisymmetric incompressible Navier-Stokes equations for flow between
> concentric cylinders (for which there is an exact solution). The matrix is
> for a two element case, hopefully small enough for debugging.
> Using the following command line options with the test program works with
> PETSc 3.5.4 and gives a NAN residual with PETSc 3.6.0:
> PETSC_OPTIONS="-pc_type asm -pc_asm_overlap 12 -sub_pc_type ilu
> -sub_pc_factor_mat_ordering_type 1wd -sub_pc_factor_levels 4"
> If I remove the mat ordering option, all is well again in PETSc 3.6.x:
> PETSC_OPTIONS="-pc_type asm -pc_asm_overlap 12 -sub_pc_type ilu
> -sub_pc_factor_levels 4"
> Those options are nothing special. They were arrived at through
> trial/error to get decent behavior for the solver on up to 4 processors to
> keep the time to something reasonable for the test suite without getting
> really fancy. Specifically, we'd noticed this mat ordering on some problems
> in the test suite behaved noticeably better.
> As always, thanks for your time.
> Best,
> Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160121/8589c457/attachment.html>

More information about the petsc-users mailing list