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 reductions ctest for nvidia on perlmutter #187

Conversation

amametjanov
Copy link
Member

@amametjanov amametjanov commented Dec 11, 2024

Release build with -O2 flag (from E3SM) incorrectly optimized out inner-loop if-true-stmt.
This re-orders for-loops to prevent branch prediction.

Fixes #161

Checklist

  • Testing
    • A comment in the PR documents testing used to verify the changes including any tests that are added/modified/impacted.
    • Unit tests have passed. Please provide a relevant CDash build entry for verification.

Release build with -O2 incorrectly optimized out inner-loop if-stmt.
This re-orders for-loops to avoid that.
@amametjanov
Copy link
Member Author

amametjanov commented Dec 11, 2024

Testing:

  • nvidia on pm-cpu:
    • release- and debug-builds:
25/29 Test #25: REDUCTIONS_TEST ....................   Passed    3.19 sec
...
25/29 Test #25: REDUCTIONS_TEST ....................   Passed   39.95 sec
  • nvidiagpu on pm-gpu:
    • release- and debug-builds:
25/29 Test #25: REDUCTIONS_TEST ....................   Passed  108.85 sec
...
25/29 Test #25: REDUCTIONS_TEST ....................   Passed   62.27 sec

@mark-petersen mark-petersen self-requested a review December 12, 2024 18:45
@mark-petersen mark-petersen self-assigned this Dec 12, 2024
Copy link

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

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

Thanks! I was able to repeat the tests above and they indeed work.

@mark-petersen mark-petersen merged commit cdaabc3 into E3SM-Project:develop Dec 12, 2024
2 checks passed
@amametjanov amametjanov deleted the ctests/fix-pm-nvidia-reductions branch December 12, 2024 19:12
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.

Seeing failure in reduction tests on Perlmutter-CPU with nvidia
2 participants