  We propose using greedy and randomized Kaczmarz inner-iterations as
preconditioners for the right-preconditioned flexible GMRES method to solve
consistent linear systems, with a parameter tuning strategy for adjusting the
number of inner iterations and the relaxation parameter. We also present
theoretical justifications of the right-preconditioned flexible GMRES for
solving consistent linear systems. Numerical experiments on overdetermined and
underdetermined linear systems show that the proposed method is superior to the
GMRES method preconditioned by NE-SOR inner iterations in terms of total CPU
time.
