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

オープン 初心者向け
#495 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
hpc

調査の方向性

src/apps/dmrg/dmrg/dmrg.h の、S.resume の直前にある read_progress の分岐から始めてください。そこではチェックポイントの at.sweep がすでに利用できます。次に checkpoint_cache.h:56 を読んで、なぜ SWEEPS がもはやフィンガープリントに含まれていないのかを確認してください。チェックポイントの最後に完了した at.sweep が SWEEPS を超える場合は、両方の数値を含むメッセージで拒否されるようガードを実装してください。一方で、最後のスイープ(SWEEPS + 1)の途中で強制終了された実行は、引き続き再開できるようにしてください。完了条件は L=16 のハイゼンベルクの再現手順です。SWEEPS=3 でスイープ 2 の途中に強制終了した後、RESUME=1 SWEEPS=1 は終了コード 0 で終わるのではなく拒否されること、また SWEEPS が同じかそれ以上の場合は従来どおりに動作することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C++
スター
32
フォーク
10
平均マージ
3日 19時間
マージ済み PR(30日)
100

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ALPSim/ALPS のほかの issue

ALPSim/ALPS の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。