dmrg: resuming with a smaller SWEEPS silently skips to the final sweep

Aperta Adatta ai principianti
#495 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
hpc

Direzione di ricerca

Inizia in src/apps/dmrg/dmrg/dmrg.h nel ramo read_progress appena prima di S.resume, dove il at.sweep del checkpoint è già disponibile, e leggi checkpoint_cache.h:56 per capire perché SWEEPS non è più nel fingerprint. Implementa il controllo in modo che un checkpoint il cui ultimo at.sweep completato sia oltre SWEEPS venga rifiutato con un messaggio che riporti entrambi i numeri, mentre un'esecuzione interrotta durante l'ultimo sweep (SWEEPS + 1) continui a riprendere. Il lavoro è completato quando il riproduttore Heisenberg con L=16 si comporta così: SWEEPS=3 interrotto nello sweep 2, poi RESUME=1 SWEEPS=1 viene rifiutato invece di terminare con codice 0, e valori di SWEEPS uguali o maggiori si comportano come prima.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:dmrg bug P2

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:

  1. Run with SWEEPS=3 and kill it in sweep 2, so the checkpoint is at "sweep 2/3".
  2. Rerun the same input with RESUME=1 and SWEEPS=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.

Lingua principale
C++
Stelle
32
Fork
10
Merge medio
3g 19h
PR unite (30g)
107

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ALPSim/ALPS

Tutte le issue di ALPSim/ALPS

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.