[BUG FIX] arpackmm: Cut-off in case previous run used different nbDim.

This commit is contained in:
Franck HOUSSEN
2021-10-04 22:50:56 +02:00
parent 5f9bd674b1
commit e3a1f97f2a
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -14,6 +14,8 @@ arpack-ng - 3.9.0
[ Robert Schütz ]
* use CMAKE_INSTALL_FULL_<dir> in arpack.pc
[ Franck Houssen ]
* arpackmm: restart bug fix.
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 07 Dec 2020 11:37:40 +0100
arpack-ng - 3.8.0
+5 -1
View File
@@ -659,7 +659,11 @@ class arpackSolver {
if (restartFromFile) {
ifstream ifs(fileName.c_str());
if (ifs.is_open()) {
a_int nbCV = 1; if (readNbCV) {ifs >> nbCV; if (nbCV < nbCV) nbCV = nbCV;}
a_int nbCV = 1;
if (readNbCV) {
ifs >> nbCV;
if (nbCV < nbDim) nbCV = nbDim; // Cut-off in case previous run used different nbDim.
}
for (a_int n = 0; rv && n < nbDim*nbCV; n++) ifs >> rv[n];
if (verbose >= 1) {
cout << endl << "arpackSolver:" << endl;