Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make delayed update active only by request #2180

Merged
merged 5 commits into from
Jan 6, 2020
Merged

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Jan 2, 2020

Needs #2177 merged in first.

The currently code activates delayed update on every acceptMove which is safe during p-by-p or T-move but algorithms making a move and a reverse move are not safe to use DU. developers are required to put a completeUpdates() after every acceptMove. This can cause potential bugs for new developers.
So I introduced a flag safe_to_delay in TWF and WFC acceptMove and default to false. So drivers known safe for delayed update have safe_to_delay = true requested, other places (NLPP forces and derivatives) where the safety is unknown, default SM-1 update will be called at every acceptMove to ensure the inverse matrix is safe to use.

@prckent
Copy link
Contributor

prckent commented Jan 3, 2020

For the record: What is the assumption of the delayed update that is being violated?

(Presumably it currently assumes in-sequence electron moves and has no capability for rewind?)

@ye-luo ye-luo changed the title [Hold] make delayed update actived only by request Make delayed update actived only by request Jan 4, 2020
@ye-luo
Copy link
Contributor Author

ye-luo commented Jan 4, 2020

Delayed update doesn't require in-sequence electron moves. It can be arbitrary order.
However, there are two violations

  1. Delayed update cannot delay moves of the same electron more than once.
  2. The delayed update delays the updates of inverse Slater matrix. For forces and NLPP derivatives, the major reason to actually accept move is to use the inverse matrix. So a complete update must be forced.

@prckent prckent added this to the v3.9.0 Release milestone Jan 6, 2020
@prckent prckent changed the title Make delayed update actived only by request Make delayed update active only by request Jan 6, 2020
@prckent prckent merged commit bb9c57a into QMCPACK:develop Jan 6, 2020
@ye-luo ye-luo deleted the safer-DU branch January 7, 2020 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants