Hey Max, Without knowing anything about the specific application related to your Stokes problem, or information about the mesh you are using, I have a couple of questions and suggestions which might help.
1) If A, is your stokes operator A = ( K,B ; B^T, 0 ), what is your precondition operator? Specifically, what is in the (2,2) slot in the precondioner? - i.e. what matrix are you you applying -stokes_fieldsplit_1_pc_type jacobi -stokes_fieldsplit_1_ksp_type preonly to? Is it the identity as in the SpeedUp notes? 2) This choice -stokes_fieldsplit_0_pc_type ml -stokes_fieldsplit_0_ksp_type preonly may simply not be a very effective and degrade the performance of the outer solver. I'd make the solver for the operator in the (1,1) slot much stronger, for example -stokes_fieldsplit_0_ksp_type gmres -stokes_fieldsplit_0_ksp_rtol 1.0e-4 -stokes_fieldsplit_0_mg_levels_ksp_type gmres -stokes_fieldsplit_0_mg_levels_pc_type bjacobi -stokes_fieldsplit_0_mg_levels_ksp_max_it 4 Add a monitor on this solver (-stokes_fieldsplit_0_ksp_XXX) to see how ML is doing. 3) Using -stokes_pc_fieldsplit_type MULTIPLICATIVE should reduce the number of outer iterations by a factor of two, but it will use more memory. 4) You should use a flexible Krylov method on the outer most solve (-stokes_ksp_XXX) as the preconditioner is varying between each outer iteration. Use -stokes_ksp_type fgmres or -stokes_ksp_type gcr 5) Depending on how the physical problem is scaled (non-dimensionalised), the size of the residuals associated with the momentum and continuity equation make be quite different. You are currently use the entire residual from (u,p) to determine when to stop iterating. You might want to consider writing a monitor which examines the these residuals independently. Cheers, Dave On 20 February 2012 08:04, Max Rudolph <rudolph at berkeley.edu> wrote: > I am solving a 2D Stokes flow problem using a finite volume discretization, > velocity (dof 0,1)-pressure (dof 2) formulation. Until now I have mostly used > MUMPS. I am trying to use the PCFieldSplit interface now, with the goal of > trying out the multigrid functionality provided through ML. I looked at these > (http://www.mcs.anl.gov/petsc/documentation/tutorials/Speedup10.pdf) talk > slides for some guidance on command line options and tried. When assembling > the linear system, I obtain the global degree-of-freedom indices using > DMDAGetGlobalIndices. The solver does not appear to be converging and I was > wondering if someone could explain to me why this might be happening. Thanks > for your help. > > Max > > petscmpiexec -n $1 $2 $3 \ > -stokes_pc_fieldsplit_0_fields 0,1 -stokes_pc_fieldsplit_1_fields 2 \ > -stokes_pc_type fieldsplit -stokes_pc_fieldsplit_type additive \ > -stokes_fieldsplit_0_pc_type ml -stokes_fieldsplit_0_ksp_type preonly \ > -stokes_fieldsplit_1_pc_type jacobi -stokes_fieldsplit_1_ksp_type preonly \ > -stokes_ksp_view \ > -stokes_ksp_monitor_true_residual \ > > ?Residual norms for stokes_ solve. > ?0 KSP preconditioned resid norm 2.156200561011e-07 true resid norm > 1.165111661413e+06 ||r(i)||/||b|| 1.000000000000e+00 > ?1 KSP preconditioned resid norm 2.156200561011e-07 true resid norm > 1.165111661413e+06 ||r(i)||/||b|| 1.000000000000e+00 > ?2 KSP preconditioned resid norm 5.176186579848e-08 true resid norm > 5.747484453195e+06 ||r(i)||/||b|| 4.932990239085e+00 > ?3 KSP preconditioned resid norm 5.054067588022e-08 true resid norm > 5.763708451168e+06 ||r(i)||/||b|| 4.946915082953e+00 > ?4 KSP preconditioned resid norm 3.556841873413e-08 true resid norm > 4.649778784249e+06 ||r(i)||/||b|| 3.990843915003e+00 > ?5 KSP preconditioned resid norm 3.177972840516e-08 true resid norm > 4.677248322326e+06 ||r(i)||/||b|| 4.014420657890e+00 > ?6 KSP preconditioned resid norm 3.100188857346e-08 true resid norm > 4.857618195959e+06 ||r(i)||/||b|| 4.169229745814e+00 > ?7 KSP preconditioned resid norm 3.045495907075e-08 true resid norm > 5.030091724356e+06 ||r(i)||/||b|| 4.317261504580e+00 > ?8 KSP preconditioned resid norm 2.993896937859e-08 true resid norm > 5.213745290794e+06 ||r(i)||/||b|| 4.474888942808e+00 > ?9 KSP preconditioned resid norm 2.944838631679e-08 true resid norm > 5.403745734510e+06 ||r(i)||/||b|| 4.637963822245e+00 > ?10 KSP preconditioned resid norm 2.898115557667e-08 true resid norm > 5.596205405394e+06 ||r(i)||/||b|| 4.803149423985e+00 > ?11 KSP preconditioned resid norm 2.853548106431e-08 true resid norm > 5.788329048801e+06 ||r(i)||/||b|| 4.968046617765e+00 > ?12 KSP preconditioned resid norm 2.810975464206e-08 true resid norm > 5.978285004145e+06 ||r(i)||/||b|| 5.131083313418e+00 > ?13 KSP preconditioned resid norm 2.770253127208e-08 true resid norm > 6.164551408716e+06 ||r(i)||/||b|| 5.290953316217e+00 > ?14 KSP preconditioned resid norm 2.731250834421e-08 true resid norm > 6.346469882864e+06 ||r(i)||/||b|| 5.447091547575e+00 > ?15 KSP preconditioned resid norm 2.693850812065e-08 true resid norm > 6.523343466838e+06 ||r(i)||/||b|| 5.598899816114e+00 >
