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

Fix MSD when there is only 1 det in a given spin channel. #4640

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Jun 22, 2023

Proposed changes

Fixes #4639

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

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

laptop

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

size_t det_id = det_offset + count;
ValueType ratios_local;
///Initialization here to avoid one additional transfer and allow the use of collapse(2)
ratios_list_ptr[iw][0] = det0_list_ptr[iw];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the bug and my original comment explains part of the cause.
mw_updateRatios<EXT_LEVEL> is only called when there is excitation.
Simply move the assignment out.

@ye-luo ye-luo requested a review from markdewing June 22, 2023 21:50
@ye-luo
Copy link
Contributor Author

ye-luo commented Jun 22, 2023

Test this please

Copy link
Contributor

@markdewing markdewing left a comment

Choose a reason for hiding this comment

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

Verified the fix on my build. Thanks!

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

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

LGTM

@ye-luo ye-luo merged commit a7dbd96 into QMCPACK:develop Jun 23, 2023
21 checks passed
@ye-luo ye-luo deleted the fix-batch-msd-1det branch June 23, 2023 14:56
@prckent prckent mentioned this pull request Aug 18, 2023
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.

Multiple determinants with detlist of size 1 fails for precomputed_table_method
3 participants