Personal tools
You are here: Home / openCMISS / Wiki / PETSc solver options
Log in

Forgot your password?

PETSc solver options

Using PETSc with libMesh

  • Use command line '-ksp_type' to choose the PETSc solver kind.

    • Options are: 'richardson, chebychev, cg, gmres, tcqmr, bcgs, cgs, tfqmr, cr, lsqr, bicg, or preonly.'
  • Use '-ksp_gmres_restart' with gmres and 'ksp_richardson_scale' for richardson.

  • Use command line '-pc_type' to choose the PETSc preconditioner.

    • Options are: 'jacobi, bjacobi, sor, eisenstat, icc, ilu, asm, ksp, lu, or cholesky'

    • Loads of options exist for using these preconditioners as well. See most recent PETSc manual.

    • Loads of externally supplied solvers as well that need to be hooked in. An important one for our work is BoomerAMG from HYPRE. Use as follows: '-pc_type hypre -pc_type_hypre boomeramg -ksp_type richardson' to just use BoomerAMG to solve. See PETSc FAQ and manual for more options.

      • Options from HYPRE (and for '-pc_type_hypre') 'pilut, parasails, boomeramg, euclid'
      • Note that it is best to use BoomerAMG with 'gmres' because the AMG preconditioner by default is not symmetric.
  • Use command line '-log_summary' to get lots of PETSc information about your run (Others claim that -log_info works too but I didn't find this with a 2.3.2-p7 version of PETSc.)

  • Use '-ksp_rtol, -ksp_atol, -ksp_divtol, and -ksp_max_it' for setting other options.

  • Monitor convergence with '-ksp_monitor' and see info about preconditioners etc. with '-ksp_view'.