[BUG FIX] arpack may succeed to compute more EV than expected. (#197)

This commit is contained in:
Franck HOUSSEN
2019-02-13 17:01:22 +01:00
committed by Sylvestre Ledru
parent a98f85544f
commit dfc8abd708
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -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");
}
@@ -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");
}
+4 -2
View File
@@ -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");
}
@@ -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");
}