Hello,
I’m doing a DMRG calculation using Google Colab, but it sometimes fails due to the errors such as out of memory or a sudden disconnection. If the MPS data can be saved during the DMRG calculation, the calculation can be continued from that time. But I’m at a loss as to how to rewrite the code. Is there any good way to implement this?
If you don’t want to just pass in a small number of sweeps outside of DMRG and take care of it that way, I imagine you could use a custom observer to modify the measure! method which gives you access to the current MPS along with where in the sweep it is.
In addition to Ryan’s answer (I agree a custom observer is the way to go, if you want to save an MPS during a calculation), you may find the following helpful:
you can try the passing the --heap-size-hint=<size> argument to julia program when you run it. The <size> parameter can be values like 50G meaning 50 Gigabytes. Setting this value below the amount of RAM available could help with some kinds of out-of-memory errors.