3D chunking for chemistry full-domain mode - #36
Open
mn416 wants to merge 4 commits into
Open
Conversation
28 tasks
The new `ukca_config%ukca_asad_full_chunk_size` parameter controls the 3D chunk size. For example, ``` ukca_config%ukca_asad_full_chunk_size(:) = [8, 4, 2] ``` leads to a chunk size of 8x4x2, i.e. 8 elements per row, 4 rows, and 2 levels. A value <= 0 in any dimension will lead to a chunk size equal to the full-domain size in that dimension.
mn416
force-pushed
the
mn416-3d-chunking
branch
from
August 24, 2026 14:06
7b45b8d to
783ba21
Compare
mn416
marked this pull request as ready for review
August 25, 2026 09:11
Author
|
Mohit Dalvi (@mcdalvi) Might you be SciTech reviewer for this one as you've looked at our chemsitry chunking work in the past? |
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: Joe Wallwork (@joewallwork)
Code Reviewer: Pierre Siddall (@Pierre-siddall)
UKCA provides various ways to invoke the chemistry solver: level-wise mode (with 1D chunking), column mode (with 1D chunking), and full-domain mode. This PR introduces 3D chunking for full-domain mode, generalising and subsuming all previous modes of operation while enabling new kinds of chunking that were not expressible before. For example, the new namelist entry
(assuming
l_ukca_asad_full=.true.) specifies a chunk size of8x4x2, i.e. 8 grid points per row, 4 rows, and 2 levels. A value <= 0 in any dimension will lead to a chunk size equal to the full-domain size in that dimension. This extra flexibility leads to performance improvements both with and without OpenMP enabled, as it is better able to exploit the spatial proximity of hard-to-solve grid points. Here are results comparing full-domain chunking (with a chunk size of8x8x2) against the default UKCA configuration (column mode with a chunk size of a single column).Timings are of the form T_first + T_rest = T_all where T_first, T_rest, and T_all are the times taken for the first two UM time steps, the subsequent time steps, and all time steps respectively.
In summary, 3D chunking gives an overall improvement of 7.4-16.0%, broken down into a 17.8-39.5% improvement for the first two time steps, and a 3.8-4.7% improvement for subsequent time steps.
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
readability of the code
Testing
stem suites
acceptable (eg. kgo changes)
tests, unit tests, etc.)
The UM has been run locally on the N48 configuration for 1 MPI task and 6 time steps, with the following main results from
mule-cumf:Running full-domain mode with a chunk size equal to the full domain gives a perfect match when compared against the existing full-domain mode without chunking.
Running full-domain mode with a chunk size of
1x1x-1, i.e. 1 column, gives a perfect match when compared against column mode with a chunk size of a single column.The UM has been run locally with various values for the new namelist parameter, including: (1) the use of -1 to signify no chunking in particular dimension; (2) a chunk size dimension that exceeds the full-domain size of a dimension, in which case the chunk size is truncated; (3) a chunk size that divides perfectly into the full domain size; and (3) a chunk size that does not divide perfectly into the full domain size, in which case the chunk size in non uniform. In all cases, chunking is performed as intended.
trac.log
Testing branch: https://github.com/RobWatersMet/um/tree/testing-mn416-3d-chunking
Macro has been applied and
dependencies.shupdated with related UKCA branchTest Suite Results - um - testing_mn416_3d_chunking/run1
Suite Information
Approvals
Code Owners
Config Owners
No UM Config Owners Required
Task Information
✅ succeeded tasks - 2770
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy
(including attribution labels)
Documentation
confirmed that it builds correctly
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review