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

Workaround for assignment-after-reduction offload bug #4773

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

markdewing
Copy link
Contributor

Loop index over nw must be 32 bits in size, otherwise the assignment following the reduction will miss the second item.
Bug affects offload with NVidia.
See #4767

This PR represents the minimal changes needed to fix the real and complex offload builds for the multideterminant tests.
More changes could be made to make the type of nw consistent (A static analyzer would complain if run against the current code).

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

Delete the items that do not apply

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

local server (A2000), JLSE A40

Checklist

Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.

  • 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
  • No. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • N/A. Documentation has been added (if appropriate)

Loop index over nw must be 32 bits in size.
Bug affects offload with NVidia.
See QMCPACK#4767
Copy link
Contributor

@ye-luo ye-luo left a comment

Choose a reason for hiding this comment

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

Good fix. We probably better to change all the GPU offload related loop to uint32_t. I think all the GPUs naturally handle 32 bit integer with 64 bit addressing.

@markdewing
Copy link
Contributor Author

Test this please

@ye-luo ye-luo merged commit 687f341 into QMCPACK:develop Oct 13, 2023
21 checks passed
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