Skip to content

Commit

Permalink
[BUG FIX] arpack may succeed to compute more EV than expected. (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
fghoussen authored and sylvestre committed Feb 13, 2019
1 parent a98f855 commit dfc8abd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions PARPACK/TESTS/MPI/icb_parpack_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ void real_symmetric_runner() {
&(workd[ipntr[1] - 1]));
}
// check number of ev found by arpack.
if (iparam[4] != nev || info != 0) {
if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) {
std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl;
throw std::domain_error("Error inside ARPACK routines");
}

Expand Down Expand Up @@ -153,7 +154,8 @@ void complex_symmetric_runner() {
}

// check number of ev found by arpack
if (iparam[4] != nev || info != 0) {
if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) {
std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl;
throw std::domain_error("Error inside ARPACK routines");
}

Expand Down
6 changes: 4 additions & 2 deletions TESTS/icb_arpack_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ void real_symmetric_runner() {
}

// check number of ev found by arpack.
if (iparam[4] != nev || info != 0) {
if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) {
std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl;
throw std::domain_error("Error inside ARPACK routines");
}

Expand Down Expand Up @@ -151,7 +152,8 @@ void complex_symmetric_runner() {
}

// check number of ev found by arpack.
if (iparam[4] != nev || info != 0) {
if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) {
std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl;
throw std::domain_error("Error inside ARPACK routines");
}

Expand Down

0 comments on commit dfc8abd

Please sign in to comment.