-
Notifications
You must be signed in to change notification settings - Fork 545
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
update scrip_remap_conservative to use MPI #1268
base: develop
Are you sure you want to change the base?
Conversation
@ErickRogers pinging you as you were suggested as a possible reviewer. |
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.
This looks safe to me, since it's put behind a switch. I'm not proficient with MPI programming, so I can't comment on that, but I expect that it is good, since John says it works. Let me know if you want an MPI-fluent reviewer.
NB: We have some rudimentary MPI in WMGHGH. However, it splits things up like "one process per remapping", e.g., if you have 2 grid-pairs, it only splits into 2 processes. So this "within grid" parallelism should be significantly faster.
Thanks for submitting @jcwarner-usgs. I'll start reviewing. |
Thanks for reviewing @ErickRogers. |
I think the MPI could be re-written to be more WW3 centric. And my switches in there are not active. |
Hi @jcwarner-usgs, thanks for this follow up. I had two thoughts on the switches you mentioned. Currently they are Regarding re-writing to be more WW3 centric. Being as WW3 centric as possible is obviously best for the code base, though I can say in my initial review nothing jumped out as being problematic in that regard. It seemed clean and well commented which is great. We do have a Code Style Standards page though that may help out here. I would currently just make the suggestion of renaming some of these to something more descriptive if possible. |
@jcwarner-usgs I'm not sure I understand what you mean re: WW3 centric. What was your motivation for adding this feature? For you to use in your WW3 applications? Or some other applications? |
oh. I just meant like I used:
but in other parts of the WW3 the mpi calls look like:
should i go thru and make the variables all capitals? |
@jcwarner-usgs OK, I see. Matt and Jessica may disagree, but from my point of view, it is fine to use the conventions of the original file, rather than the conventions of WW3. I think of the stuff in the /SCRIP/ subdirectory as not strictly part of the WW3 code proper, but rather as a semi-external library that is adapted (with as light a touch as possible) to work with WW3, to be compiled into WW3. We maintain it in the same version control with WW3 because maintaining it separately would just result in extra work. (2 cents) |
All that aside, renaming the My* variables wouldn't hurt, for clarity purposes. |
I agree that keeping styles matching to what is in the routine is okay. It's more of the using your initials or "my" variable names versus just making them generic/descriptive to what they are. That's really great to hear from @aliabdolali that it sped things up, we'll have to see if that can help us in some set-ups here. I don't see any regression tests that are using these updates. @jcwarner-usgs Can you tell me a little more about your tests that you've run on your end so we can help advise how to best put in a test for the regression tests so we ensure this feature continues to work? Also, did you obtain identical results with and without this update? |
@jcwarner-usgs - I realized I wasn't clear that this question was to you so I updated my comment and am pinging you on this. |
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.
@jcwarner-usgs I wanted to touch base following the discussion on code style. I only have one request here, that is to rename the switch W3_SCRIP_JCW
to something without your initials (maybe W3_SCRIP_MPI
or other).
Also, I wanted to mention that a couple Github CI jobs failed. I'm re-running these manually now to see if they will resolve themselves.
Thanks for checking back.
|
SCRIPMPI is fine with me. |
Hi @jcwarner-usgs, just a note to say we are taking a short pause on our PR processing do to some temporary changes for our group. I just posted our group on the Commit Queue: Temporary PR Policy. Look forward to picking back up after our short break. |
Getting back onto this pull request now.
Can you try this merge again? |
Hi @jcwarner-usgs, thank you for addressing the previous comments with these updates, and including the description of the changes. Much appreciated. A few weeks ago we posted a temporary PR Policy. It is in response to temporary resource reductions, where we don't have the manpower to review PRs, and so are limiting what we take on to just what is needed for the next GFS/GEFS releases being worked on. This is just till mid-November. I really apologize because I know you submitted this prior to that. We will pick this back up from our end just as soon as our temporary status ends sometime in November. We'll look forward to completing the review then. Thanks for understanding. |
All good! no worries. |
Awesome. thanks so much for understanding. having some more time to ensure it's working is a side benefit! |
@jcwarner-usgs just to let you know we are back from our temporary PR policy, and I've started working on the review for this. I'll be back in touch again next week. |
Update |
Hi @jcwarner-usgs. I'm about to submit a PR to this PR, which makes a slight fix to a couple of OMP sections. It will require you to review what I've submitted, then merge it if you are OK with it. After that I'll finish the review on this main PR. The PR I will submit only makes two re-ordering edits to the To remove these extra changes before you merge you can sync your branch, or merging in the PR will bring those in with the PR. Since we will Squash Merge the main PR, I think either is fine. I'm happy to answer any questions on doing the merge if you like. |
@jcwarner-usgs the PR has been submitted, jcwarner-usgs#1. |
Pull Request Summary
When using nesting, the SCRIP routines are called to compute remapping weights. But each processor computes all the weights. Here we updated SCRIP/scrip_remap_conservative.F to use all the MPI processors to compute separate portions of the remap weights, and then distribute a full set of weights to all the nodes.
Description
The results should be identical with or without this update.
Reviewer could be: Erick Rogers, NRL
Issue(s) addressed
Related to Discussion #1252
Commit Message
Update scrip_remap_conservative to be more efficient on first use.
Check list
Testing