This routine uses the Generalized Minimal Residual method with restarts every iterations, GMRES(), to solve the unsymmetric linear system , optionally using preconditioning. If , are left and right preconditioning matrices, the routine actually solves the preconditioned system
with and . The solution may be recovered as . If , preconditioning is said to be from the right, if , it is said to be from the left, and otherwise it is from both sides. Reverse communication is used for preconditioning operations and matrix-vector products of the form .