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

Move nan check from DriftModifierUNR to TWF #4697

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Aug 10, 2023

Proposed changes

Nan checks are better places where NaN is produced and hence better suited in TWF.
On frontier

NaN check in TWF::mw_calcRatioGrad found
  particle 1484 grads[0] is NaN.
  particle 1484 grads[1] is NaN.
  particle 1484 grads[2] is NaN.

instead of

drift[0] is nan, vsq (-nan) sc (0.001)

What type(s) of changes does this code introduce?

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

Frontier

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 10, 2023

Test this please

@@ -551,6 +551,8 @@ class TrialWaveFunction
std::vector<std::reference_wrapper<NewTimer>> WFC_timers_;
std::vector<RealType> myTwist;

static void checkOneParticleGradientsNaN(int iel, const GradType& grads, const std::string_view location);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a description of this function please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 11, 2023

Test this please

@prckent prckent merged commit 948de59 into QMCPACK:develop Aug 11, 2023
21 checks passed
@prckent prckent mentioned this pull request Aug 18, 2023
@ye-luo ye-luo deleted the move-nan-check branch October 31, 2023 01:39
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.

2 participants