13.7. Tips for Efficient Use of Linear Solvers

Up: Contents Next: Detecting Memory Allocation Problems Previous: Numerical Experiments

As discussed in Chapter SLES: Linear Equations Solvers , the default linear solvers are


One should experiment to determine alternatives that may be better for various applications. Recall that one can specify the KSP methods and preconditioners at runtime via the options:
   -ksp_type <ksp_name> -pc_type <pc_name> 
One can also specify a variety of runtime customizations for the solvers, as discussed throughout the manual.

In particular, note that the default restart parameter for GMRES is 30, which may be too small for some large-scale problems. One can alter this parameter with the option -ksp_gmres_restart <restart> or by calling KSPGMRESSetRestart(). Section Krylov Methods gives information on setting alternative GMRES orthogonalization routines, which may provide much better parallel performance.


Up: Contents Next: Detecting Memory Allocation Problems Previous: Numerical Experiments