Dear all,
I think that there is a bug in how mps_optim changes the bond dimension during successive sweeps. In the alps-2.2.b3-r7462-src/alps/applications/dmrg/mps/mps_optim/run_sim.cpp file, line 64 reads: double step = (int(parms["MAXSTATES"]) - init_bond) / (parms["nsweeps"]-1); It is supposed to compute the increment of the bond size at each step (starting from init_bond at the first sweep, reaching MAXSTATES at the final sweep). How, the division if performed using integers before being written to the variable step as a double. For example, if (int(parms["MAXSTATES"]) - init_bond) < (parms["nsweeps"]-1), step will be 0.0, presumably not the intended value.
A simple fix is to perform the division using double, something like: double step = ((double)(int(parms["MAXSTATES"]) - init_bond)) / (parms["nsweeps"]-1);
Best regards
Dominique Delande
Dear Dominique,
Thanks for the bug report. Now it is fixed.
Best regards, Michele
-- ETH Zurich Michele Dolfi Institute for Theoretical Physics HIT G 32.4 Wolfgang-Pauli-Str. 27 8093 Zurich Switzerland
dolfim@phys.ethz.ch www.itp.phys.ethz.ch
+41 44 633 78 56 phone +41 44 633 11 15 fax
On 26 Nov 2014, at 10:58, Dominique Delande Dominique.Delande@lkb.upmc.fr wrote:
Dear all,
I think that there is a bug in how mps_optim changes the bond dimension during successive sweeps. In the alps-2.2.b3-r7462-src/alps/applications/dmrg/mps/mps_optim/run_sim.cpp file, line 64 reads: double step = (int(parms["MAXSTATES"]) - init_bond) / (parms["nsweeps"]-1); It is supposed to compute the increment of the bond size at each step (starting from init_bond at the first sweep, reaching MAXSTATES at the final sweep). How, the division if performed using integers before being written to the variable step as a double. For example, if (int(parms["MAXSTATES"]) - init_bond) < (parms["nsweeps"]-1), step will be 0.0, presumably not the intended value.
A simple fix is to perform the division using double, something like: double step = ((double)(int(parms["MAXSTATES"]) - init_bond)) / (parms["nsweeps"]-1);
Best regards
Dominique Delande
-- Dominique Delande (Dominique.Delande@lkb.upmc.fr) Laboratoire Kastler-Brossel - Case 74 - Universite P. et M. Curie 4, place Jussieu, F-75252 Paris Cedex 05, FRANCE Phone : +33 1 44 27 27 97 - Fax : +33 1 44 27 38 45 Acces : Tour 13, Couloir 12-13, 3eme etage - Bureau 316
comp-phys-alps-users@lists.phys.ethz.ch