From f267553f716bf1ffdece7cb329a186cab70fff93 Mon Sep 17 00:00:00 2001 From: Franck HOUSSEN Date: Tue, 17 Sep 2024 09:23:17 +0200 Subject: [PATCH] rewrite the test with smaller tol --- EXAMPLES/MATRIX_MARKET/arpackSolver.hpp | 4 ++-- EXAMPLES/MATRIX_MARKET/arpackmm.cpp | 4 ++-- EXAMPLES/MATRIX_MARKET/arpackmm.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/EXAMPLES/MATRIX_MARKET/arpackSolver.hpp b/EXAMPLES/MATRIX_MARKET/arpackSolver.hpp index 3a91ae36..53b89c4c 100644 --- a/EXAMPLES/MATRIX_MARKET/arpackSolver.hpp +++ b/EXAMPLES/MATRIX_MARKET/arpackSolver.hpp @@ -297,7 +297,7 @@ class arpackSolver { return 0; }; - int checkEigVec(EM const & A, EM const * B = nullptr, double const maxResNorm = 1.) const { + int checkEigVec(EM const & A, EM const * B = nullptr, double const maxResNorm = 1.e-3) const { // Check eigen vectors. string rs = schur ? "Schur" : "Ritz"; @@ -324,7 +324,7 @@ class arpackSolver { right *= lambda; EigVecZ residual = left - right; if (residual.norm() > maxResNorm) { - cerr << endl << "Error: bad eigen value " << i << ":" << endl; + cerr << endl << "Error: bad eigen value " << i << " (norm " << std::norm(lambda) << "):" << endl; cerr << endl << lambda << endl; cerr << endl << "Error: bad eigen vector " << i << " (norm " << V.norm() << "):" << endl; cerr << endl << V << endl; diff --git a/EXAMPLES/MATRIX_MARKET/arpackmm.cpp b/EXAMPLES/MATRIX_MARKET/arpackmm.cpp index 377ee654..c66f516a 100644 --- a/EXAMPLES/MATRIX_MARKET/arpackmm.cpp +++ b/EXAMPLES/MATRIX_MARKET/arpackmm.cpp @@ -31,7 +31,7 @@ class options { invert = false; // Eigen value invertion: look for 1./lambda instead of lambda. tol = 1.e-06; - maxResNorm = 1.; + maxResNorm = 1.e-3; maxIt = 100; schur = false; // Compute Ritz vectors. slv = "BiCG"; @@ -439,7 +439,7 @@ class options { cout << " --tol T: tolerance T." << endl; cout << " default: 1.e-06" << endl; cout << " --maxResNorm R: maximum residual norm R." << endl; - cout << " default: 1." << endl; + cout << " default: 1.e-3" << endl; cout << " --maxIt M: maximum iterations M." << endl; cout << " default: 100" << endl; cout << " --schur: compute Schur vectors." << endl; diff --git a/EXAMPLES/MATRIX_MARKET/arpackmm.sh b/EXAMPLES/MATRIX_MARKET/arpackmm.sh index 02363c6c..bb881880 100755 --- a/EXAMPLES/MATRIX_MARKET/arpackmm.sh +++ b/EXAMPLES/MATRIX_MARKET/arpackmm.sh @@ -26,7 +26,7 @@ do # Note: this is expected as "power-like" methods are designed to find largest eigen values. for magOpt in "--mag LM" "--mag SM --noCheck" do - export mrn="--maxResNorm 1." # Relax residual check to get stable tests. + export mrn="--maxResNorm 1.e-2" # Relax residual check to get stable tests. # Shift slightly to avoid the zero-vector starting problem. export shiftZV=""