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

Abierto Apto para principiantes
#495 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp
Área
hpc

Línea de trabajo

Empieza en src/apps/dmrg/dmrg/dmrg.h en la rama read_progress justo antes de S.resume, donde el at.sweep del checkpoint ya está disponible, y lee checkpoint_cache.h:56 para ver por qué SWEEPS ya no forma parte del fingerprint. Implementa la protección para que un checkpoint cuyo último at.sweep completado sea mayor que SWEEPS sea rechazado con un mensaje que mencione ambos números, mientras que una ejecución interrumpida durante su último sweep (SWEEPS + 1) siga reanudándose. Se considera terminado cuando el reproductor de Heisenberg con L=16 funciona así: SWEEPS=3 interrumpido en el sweep 2, luego RESUME=1 SWEEPS=1 se rechaza en lugar de terminar con código 0, y los valores de SWEEPS iguales o mayores se comportan como antes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
32
Forks
10
Merge medio
3 d 19 h
PR fusionados (30 d)
100

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ALPSim/ALPS

Todos los issues de ALPSim/ALPS

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.