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

Bugfix/gunney/marching cubes large mesh #1325

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

gunney1
Copy link
Contributor

@gunney1 gunney1 commented Apr 20, 2024

Use bigger integer type for number of facets per parent cell

  • This PR is a bug fix
    It changes the type of the number-of-facets-per-parent-cell from uint16_t to IndexType.

The 16-bit type was problematic because, the sum scan on it apparently uses 16-bit adds instead of promoting the items to the output IndexType. The array doesn't need to be bigger than 16-bit, because it only has to store values in [0,5]. But this change is necessary to prevent the sum from rolling over at 2^16. On rzgenie and rzansel, the data did get promoted to 32-bit before adding, so the bug didn't affect them. RAJA issue LLNL/RAJA#1631 should address this inconsistency.

…build failure.

emplace_back causes a warning about calling a host function from a device function.
I don't see how it can happen, but it may be critical to the app's build.
Facet increments will never have values higher than 16, so uint16_t
should be fine, but when we scan it and store in the wider IndexType,
the addition seems to be done as uint16_t, which unexpectedly rolls
over.
@gunney1 gunney1 self-assigned this Apr 20, 2024
@gunney1 gunney1 marked this pull request as draft April 22, 2024 17:13
@gunney1
Copy link
Contributor Author

gunney1 commented Apr 22, 2024

Related to LLNL/RAJA#1631

@gunney1 gunney1 marked this pull request as ready for review April 22, 2024 21:01
@gunney1 gunney1 merged commit 6309852 into develop Apr 23, 2024
13 checks passed
@gunney1 gunney1 deleted the bugfix/gunney/marching-cubes-large-mesh branch April 23, 2024 16:38
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.

None yet

3 participants