Read weights on pe0 - #675
Open
Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
Open
Conversation
Steve Mullerworth (stevemullerworth)
requested a review
from Mike Hobson (mike-hobson)
July 29, 2026 13:28
|
Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR. Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up. |
Steve Mullerworth (stevemullerworth)
marked this pull request as ready for review
July 29, 2026 13:31
Steve Mullerworth (stevemullerworth)
requested a review
from Lottie Turner (mo-lottieturner)
as a code owner
July 29, 2026 13:31
Mike Hobson (mike-hobson)
approved these changes
Jul 31, 2026
Mike Hobson (mike-hobson)
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me, This is exactly how I would have approached the issue. So. on to a code review with Lottie Turner (@mo-lottieturner).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Sci/Tech Reviewer: Mike Hobson (@mike-hobson)
Code Reviewer: Lottie Turner (@mo-lottieturner)
When run in parallel, all ranks of lfric2um and um2lfric read the regridding weights. However, regridding is only done on rank 0. The main purpose of this change is to read the weights only on rank 0. Doing so saves significant memory which is important when regridding at high resolution: the memory use of a C896-N1280 lfric2um run is reduced by 150GB when running on 108 ranks with 32 IO servers.
Unfortunately, to enable this to be done, some significant reordering of the application set-up needed to be done as MPI is not set up by the LFRic component till after the weights are read in. The reordering of the setup forms the bulk of the code changes in this branch.
The branch breaks the set-up into two. In the first part sets up MPI, but also the LFRic logger and XIOS. Setting up the LFRic logger early gives the benefit that a lot of log messages from the applications now go to the PET output whereas previously they ended up in stdout because they were sent before the logger had been initialised.
While lfric2um is the main target of this PR, parallel changes are made to um2lfric and the sciintelapi to maintain consistency between the applications.
closes #590
closes #642
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - read_weights_on_pe0/run1
Suite Information
Task Information
✅ succeeded tasks - 1208
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review