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

Add Tests/OpenMP/atomicAdd #3805

Merged
merged 5 commits into from Mar 15, 2024
Merged

Conversation

WeiqunZhang
Copy link
Member

No description provided.

@WeiqunZhang WeiqunZhang requested a review from ax3l March 14, 2024 22:13
@ax3l ax3l added the test label Mar 14, 2024
Tests/CMakeLists.txt Outdated Show resolved Hide resolved
@WeiqunZhang
Copy link
Member Author

WeiqunZhang commented Mar 15, 2024

Oh, I did it the original way because the code does not work with GPU unless managed memory is used, but it does work even when OMP is off.

@WeiqunZhang
Copy link
Member Author

If we let it run for GPU builds, we have to fix the source code. Use RunOn::Device and add a streamSychronize, and possible disable tiling when GPU is on. Also note that when both GPU and OMP are on, atomicAdd and lockAdd will do it on GPU. That effectively disable OMP.

@ax3l
Copy link
Member

ax3l commented Mar 15, 2024

Oh, ok. I checked the logs and I could not find the test being built in it o.0

@WeiqunZhang
Copy link
Member Author

Oh, I had an extra NOT in the logic of testing the backend

@WeiqunZhang
Copy link
Member Author

It should read AMReX_GPU_BACKEND STREQUAL NONE, but somehow I had an extra NOT.

Tests/CMakeLists.txt Outdated Show resolved Hide resolved
@ax3l
Copy link
Member

ax3l commented Mar 15, 2024

Looking through the build logs: should this show up as Test_OpenMP...?

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Now I see the Test_OpenMP_atomicAdd_*d targets being built.

@ax3l ax3l enabled auto-merge (squash) March 15, 2024 04:11
@ax3l ax3l merged commit 3fe7aad into AMReX-Codes:development Mar 15, 2024
69 checks passed
@ax3l
Copy link
Member

ax3l commented Apr 22, 2024

@WeiqunZhang should this test be included in AMReX_TEST_TYPE=Small so we can run it in CI of package managers (e.g., conda-forge #3795)?

@WeiqunZhang
Copy link
Member Author

@WeiqunZhang should this test be included in AMReX_TEST_TYPE=Small so we can run it in CI of package managers (e.g., conda-forge #3795)?

Sure

@WeiqunZhang WeiqunZhang deleted the lockadd_test branch May 1, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants