-
Notifications
You must be signed in to change notification settings - Fork 7
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 view_reduction to work with output variable coming from either private or shared memory #256
Conversation
test_view_reduction<Real,false,true,16,3> (1.0/3.0,2,11); | ||
test_view_reduction<Real, true,false,16,3> (1.0/3.0,2,11); | ||
test_view_reduction<Real,false,false,16,3> (1.0/3.0,2,11); | ||
test_view_reduction<Real, true,true,18,4> (1.0/3.0,2,11); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how 3 was not generating a compiler error. We don't allow packs of non-power-of-2 size. I could have looked into why this does not throw an error, but I figured I fixed it and call it a day.
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: EKAT_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Blake
Jenkins Parameters
Using Repos:
Pull Request Author: bartgol |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: EKAT_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Blake
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
@bartgol , note that I also needed to use local variables when using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Should be able to add back to SCREAM now.
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ tcclevenger ]! |
Status Flag 'Pull Request AutoTester' - Pull Request will be Automerged |
Merge on Pull Request# 256: IS A SUCCESS - Pull Request successfully merged |
Ah, it might be that
I'll add a fix for that too. |
Shoot, the AT beat me. I'll do a super quick separate PR |
I didn't get a chance to review before this was merged, but I agree with Jim that this PR is not complete. parallel_reduce needs to be reworked, too. |
Yeah, I'm working on it. |
@bartgol , another thought, do you think it would be worth adding a test that would have exposed the prior deficiency? |
That's something I was thinking about, yes. I will add a manifactured test, and verify it would have failed before. |
@bartgol @jgfouca another thing I wanted to discuss was my opinion that there should be a version of view_reduction that does not take |
@bartgol what is this PR for? Or, what i really want to know, will there be EKAT changes to scream master soon? Asking because i then would need to pull them into my branch, do not want to miss something. thanks! |
This PR requires no change in scream. The follow up one will require a small change in |
Not sure I was clear -- please, let me know when you change head commit of EKAT submodule in scream master. thanks! |
Motivation
In case
result
came from shared memory (e.g., an entry of a view), race conditions caused wrong results. This PR does the same thing that was done inimpl::parallel_reduce
, namely uses an automatic local var, then copies back in the output var.Related Issues
E3SM Stakeholder Feedback
Might help scream, even though there's already a fix there.