Skip to content

Commit

Permalink
rewrite the test with smaller tol
Browse files Browse the repository at this point in the history
  • Loading branch information
fghoussen committed Sep 17, 2024
1 parent 6183acf commit f267553
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions EXAMPLES/MATRIX_MARKET/arpackSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions EXAMPLES/MATRIX_MARKET/arpackmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion EXAMPLES/MATRIX_MARKET/arpackmm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down

0 comments on commit f267553

Please sign in to comment.