# HG changeset patch # User Rik # Date 1626967632 25200 # Node ID e7c10a552ecc49f9de9b503124976eba0e0fcb1b # Parent ad023dbe9606dde0eed61c63f9a37d864d7d83f1 Emit more informative error message when ARPACK fails to converge (bug #60924) * eigs-base.cc (arpack_errno2str): For errno=-14 (failure to converge), emit a warning that suggests possible solutions. Correct typo where variable "errno" was used where "errnum" was desired. diff -r ad023dbe9606 -r e7c10a552ecc liboctave/numeric/eigs-base.cc --- a/liboctave/numeric/eigs-base.cc Thu Jul 22 08:03:41 2021 -0700 +++ b/liboctave/numeric/eigs-base.cc Thu Jul 22 08:27:12 2021 -0700 @@ -157,6 +157,8 @@ else if (fcn_name.compare ("dseupd") == 0) msg = "DSAUPD did not find any eigenvalues to sufficient accuracy."; + msg += " Consider changing tolerance (TOL), maximum iterations (MAXIT), number of Lanzcos basis vectors (P), or starting vector (V0) in OPTS structure."; + break; case -15: @@ -207,9 +209,8 @@ } - if ((errno != -9) & (errno != -14) & (errno != -9999)) - // This is a bug in Octave interface to ARPACK - msg.append (bug_msg); + if ((errnum != -9) && (errnum != -14) && (errnum != -9999)) + msg.append (bug_msg); // This is a bug in Octave interface to ARPACK return msg; }