[petsc-dev] FieldSplit and PCLSC

domenico.borzacchiello at univ-st-etienne.fr domenico.borzacchiello at univ-st-etienne.fr
Wed May 4 08:29:16 CDT 2011


> I suspect it is because you need -ksp_diagonal_scale. In petsc-dev, look
> at
> src/ksp/ksp/examples/tests/makefile, targets runex11 and runex11_2, for
> working configurations for a hard Stokes problem in geodynamics.
>
> LSC is normally described with the scaling "built in". Perhaps we should
> identify the fieldsplit/lsc combination and choose scaling automatically
> since it's usually necessary.

thank you for the reply Jed. I tried running my code with the options in
runex11/_2 but it's still doing much better with pc_type none than with
lsc.

runtest5:
	-@${MPIEXEC} -n ${NP} ./2dbphlow -nx ${T1_NX} -ny ${T1_NY} -nz ${T1_NZ} \
	-snes_monitor -pc_type fieldsplit  -ksp_converged_reason \
	-ksp_view \
    -ksp_monitor_short \
                -ksp_type fgmres \
                -ksp_rtol 1.0e-10 \
                -ksp_max_it 4000 \
                -ksp_diagonal_scale \
                -pc_type fieldsplit \
	        -pc_fieldsplit_type SCHUR \
		-pc_fieldsplit_schur_factorization_type FULL \
                -fieldsplit_velocity_ksp_type fgmres \
                -fieldsplit_velocity_pc_type ilu \
                -fieldsplit_velocity_ksp_rtol 1.0e-3 \
                -fieldsplit_velocity_pc_factor_mat_ordering_type nd \
                -fieldsplit_pressure_ksp_type fgmres \
                -fieldsplit_pressure_ksp_max_it 100 \
                -fieldsplit_pressure_ksp_constant_null_space \
                -fieldsplit_pressure_ksp_monitor \
                -fieldsplit_pressure_ksp_rtol 1.0e-2 \


with 		-fieldsplit_pressure_pc_type none \

It converges in 6 iterations

 0 KSP Residual norm 33.5368
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 2.270933168378e-01
      1 KSP Residual norm 1.417571102408e-01
      2 KSP Residual norm 7.694772908063e-02
      3 KSP Residual norm 4.257905847272e-02
      4 KSP Residual norm 1.891191365018e-02
      5 KSP Residual norm 4.918722113676e-03
      6 KSP Residual norm 1.050711822214e-03
    1 KSP Residual norm 0.103351
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 8.767734904112e-01
      1 KSP Residual norm 5.764073869676e-01
      2 KSP Residual norm 3.704222426150e-01
      3 KSP Residual norm 2.072256345974e-01
      4 KSP Residual norm 1.127894962709e-01
      5 KSP Residual norm 4.860633401070e-02
      6 KSP Residual norm 1.975094701437e-02
      7 KSP Residual norm 9.978578667678e-03
      8 KSP Residual norm 2.163025334230e-03
    2 KSP Residual norm 0.000619861
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 7.912146349429e-01
      1 KSP Residual norm 2.748092892813e-01
      2 KSP Residual norm 1.774428661159e-01
      3 KSP Residual norm 1.004254904370e-01
      4 KSP Residual norm 6.080011119515e-02
      5 KSP Residual norm 2.721666628818e-02
      6 KSP Residual norm 1.010984394655e-02
      7 KSP Residual norm 5.518783104512e-03
    3 KSP Residual norm 4.47789e-06
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 1.136596109768e+00
      1 KSP Residual norm 7.170670215295e-01
      2 KSP Residual norm 5.166026404200e-01
      3 KSP Residual norm 2.892061768016e-01
      4 KSP Residual norm 1.552925621794e-01
      5 KSP Residual norm 6.655502383249e-02
      6 KSP Residual norm 2.654596953650e-02
      7 KSP Residual norm 1.554637211082e-02
      8 KSP Residual norm 5.587922344049e-03
    4 KSP Residual norm 3.89245e-08
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 1.053747791288e+00
      1 KSP Residual norm 4.957574157379e-01
      2 KSP Residual norm 2.752644500928e-01
      3 KSP Residual norm 1.539641614305e-01
      4 KSP Residual norm 7.554785001226e-02
      5 KSP Residual norm 3.028487671545e-02
      6 KSP Residual norm 1.330607264413e-02
      7 KSP Residual norm 7.357658884157e-03
    5 KSP Residual norm 3.008e-10
  Linear solve converged due to CONVERGED_RTOL iterations 5

while with
		-fieldsplit_pressure_pc_type lsc \
		-fieldsplit_pressure_lsc_ksp_type fgmres \
		-fieldsplit_pressure_lsc_ksp_max_it 100 \
		-fieldsplit_pressure_lsc_ksp_constant_null_space \
		-fieldsplit_pressure_lsc_pc_type lu \
		-fieldsplit_pressure_lsc_pc_factor_mat_solver_package mumps

it's surprisingly worse than the unpreconditioned solver

    0 KSP Residual norm 33.5368
      Residual norms for fieldsplit_pressure_ solve.
      0 KSP Residual norm 2.270933168378e-01
      1 KSP Residual norm 2.270259600054e-01
      2 KSP Residual norm 2.267388316801e-01
      3 KSP Residual norm 2.258784263938e-01
      4 KSP Residual norm 2.220819980205e-01
      5 KSP Residual norm 2.138706430217e-01
      6 KSP Residual norm 2.003517532406e-01
      7 KSP Residual norm 1.790076482952e-01
      8 KSP Residual norm 1.719500219674e-01
      9 KSP Residual norm 1.694225711530e-01
     10 KSP Residual norm 1.634895282905e-01 ...
      .
      .
      .
     (does not converge within 100 iterations with rtol 1.0e-2)








More information about the petsc-dev mailing list