Page 1 of 1

How to efficiently save and resume calculation

Posted: 03 Sep 2021, 14:55
by yuchihe
My question is related to "circumvent" time-wall of computer clusters.
If principle, we can save data before the hitting the time-wall and start a new job to continue the calculation with the data.
However, my experience is that for iDMRG, only saving the MPS (psi) is not efficient enough. Because starting a calculation only with psi seems to cost time not much shorter than that of a completely new calculation.

Should save and load "environment" mitigate the problem? Is there a relatively simple way to do that?

Re: How to efficiently save and resume calculation

Posted: 08 Sep 2021, 11:10
by yuchihe
I did not notice that in the more recent version (0.8.4), the simulation module exactly enables the resume from checkpoints. The logger system has also been updated and completely moved to the simulation module. Thanks for the author.

Re: How to efficiently save and resume calculation

Posted: 12 Oct 2021, 17:24
by Johannes
Indeed, the tenpy.simulations.Simulation classes are built to support exactly this in a generic way for the various algorithms.
The idea is that you start your simulation with `run_simulation`, it saves snapshot at certain checkpoints (e.g. during DMRG between sweeps), and you can resume from these checkpoint files with tenpy.simulations.simulation.resume_from_checkpoint given only the filename.

It's not yet well documented at the moment, sorry about that.

Re: How to efficiently save and resume calculation

Posted: 01 Feb 2022, 19:49
by Fabio_Mendez
Hi there, I wasn't able to make this work. Do you have an example code of the usage of the checkpoints?
Regards,
F. P. M. Méndez-Córdoba.