Memory (Krylov basis, Hessenberg matrix, etc.) should only be allocated but not initialized in bulk. Otherwise, memory consumption sky rockets if, e.g., Krylov basis is of the same size of the linear system (i.e., GMRES without restart).
maxiter= kw-arg semantics should be such that it prescribes an upper bound for all inner loop iterations. Currently, it does not mean that.
maxiter=
kw-arg semantics should be such that it prescribes an upper bound for all inner loop iterations. Currently, it does not mean that.