dmrg: resuming with a smaller SWEEPS silently skips to the final sweep
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in src/apps/dmrg/dmrg/dmrg.h at the read_progress branch just before S.resume, where the checkpoint's at.sweep is already available, and read checkpoint_cache.h:56 to see why SWEEPS is no longer in the fingerprint. Implement the guard so a checkpoint whose last completed at.sweep is beyond SWEEPS is refused with a message naming both numbers, while a run killed in its final sweep (SWEEPS + 1) still resumes. Done looks like the L=16 Heisenberg reproducer: SWEEPS=3 killed in sweep 2, then RESUME=1 SWEEPS=1 refuses instead of exiting 0, and equal or larger SWEEPS behaves as before.
Written by the indexing model from the issue text.
Description
A DMRG run resumed with RESUME=1 and a SWEEPS smaller than the number of sweeps the checkpoint has already done goes straight to the final sweep, exits 0 and reports a result that is not that of a SWEEPS run.
This affects RESUME=1 and KEEP_CHECKPOINT=1 (new in 3.1, so not in a release). It is a small fix in dmrg.h.
Reproducer
L = 16 Heisenberg chain, 8 states, so not converged:
- Run with
SWEEPS=3and kill it in sweep 2, so the checkpoint is at "sweep 2/3". - Rerun the same input with
RESUME=1andSWEEPS=1.
Expected: the run refuses, or at least warns that the checkpoint is past SWEEPS.
Observed: it exits 0 with an energy between the 1-sweep and 2-sweep results, and the output lists SWEEPS=1.
Fix
When resuming (src/apps/dmrg/dmrg/dmrg.h, the read_progress branch before S.resume), refuse if the checkpoint's last completed iteration (at.sweep) is in a sweep beyond SWEEPS. Not the next sweep to run: that is SWEEPS + 1 for a run killed in its final sweep, which must still resume. The message should name both numbers and say to set SWEEPS to at least the checkpoint's count, or to delete the checkpoint and start over. A larger or equal SWEEPS keeps working as now.
Cause
SWEEPS and the states kept were taken out of the checkpoint fingerprint (checkpoint_cache.h:56), so that a run kept with KEEP_CHECKPOINT can be continued with more sweeps. Nothing checks the other direction, so a smaller SWEEPS resumes the checkpoint and S.resume finds no regular sweep left to run.
Context: #373. Seen on master 6d72261.
- Dominant language
- C++
- Stars
- 32
- Forks
- 10
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 109
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ALPSim/ALPS
-
dca: a bare -- on the command line makes the solver read --MU as a parameter filePossibly taken @skilledwolf claimed this 1 day ago. OpenP2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ALPSim/ALPS#479 · 1 assignee ·
Maintainers usually reply within 2 days
-
fulldiag_evaluate: a result file not named *.out.xml fails with "basic_string::erase"Possibly taken @marcusr2ML claimed this 5 days ago. Openarea:ed bug P3
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ALPSim/ALPS#433 · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: loadMeasurements without names returns nothing for worm results (Time interval has no mean)Possibly taken @skilledwolf claimed this 1 day ago. Openarea:python bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ALPSim/ALPS#421 · 1 assignee ·
Maintainers usually reply within 2 days
-
expression: Block, SimpleFactor and check_character read past the end of inputPossibly taken @skilledwolf claimed this 1 day ago. OpenP2
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ALPSim/ALPS#407 · 1 assignee ·
Maintainers usually reply within 2 days
-
area:build-sdk enhancement needs-decision P3
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
Similar issues
-
lfortran -E exits with status 0 after a C preprocessor error (#error, wrong macro argument count)Openbug low priority preprocessor
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
difficulty:easy enhancement prio:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/openfx-misc#502 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PX4/PX4-Autopilot#30130 · 1 comment ·
Maintainers usually reply within 1 day