Tiled splineTransform! for RLR/SLR and multi-tile stride fix for 3D z-major layouts#23
Open
mmbell wants to merge 3 commits into
Open
Tiled splineTransform! for RLR/SLR and multi-tile stride fix for 3D z-major layouts#23mmbell wants to merge 3 commits into
mmbell wants to merge 3 commits into
Conversation
The 3-argument (sharedSpectral, patch, tile) form existed for RZ/RiRk, RL, SL, RLZ and SLZ but not RLR, so any distributed RLR run failed with a MethodError at the first spectral sync. Same per-z_b block layout as the RLZ method (k = 0 block, then real/imag pairs per azimuthal wavenumber), with the spline vertical's b_kDim blocks.
…lti-tile tests The 3-argument splineTransform! for the z-major 3D layouts (RLZ/SLZ, and the just-added RLR) computed the PATCH z-level base index with the TILE's wavenumber block count. Sub-blocks are aligned by wavenumber, but an inner tile carries fewer wavenumbers than the patch (its kDim follows its outermost ring), so every z level past the first read the wrong shared rows on inner tiles. Single-tile (tile = patch) behavior is unchanged: the strides coincide. Adds the missing SLR 3-argument method (same layout as RLR), and a multi-tile B->A round-trip test for RLZ/RLR/SLR that seeds wavenumber-1 content and reconstructs the physical field on every tile of a 3-way radial decomposition; verified to fail against the pre-fix stride math.
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
…l count num_columns(::RRR_Grid) returned b_jDim * b_kDim — a spectral block count — while every other grid with a vertical dimension returns the number of physical z-fastest columns (iDim for RZ/RiRk, jDim for RLZ/RLR/SLZ/SLR). Model drivers advance the state one vertical column at a time and stride by kDim, so the RRR value must be iDim * jDim. No caller used the old value.
Collaborator
Author
|
Added b0f664c: |
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.
Summary
Distributed support for the 3D spline-vertical grids, driven by the Scythe
moist_compressible_RLRequation set (radially tiled RLR runs are needed because the 3D cylindrical grids are computationally expensive):splineTransform!forRLR_Grid— it existed for RZ/RiRk, RL, SL, RLZ and SLZ but not RLR, so any distributed RLR run failed with aMethodErrorat the first spectral sync. Same per-z_b block layout as the RLZ method, with the spline vertical'sb_kDimblocks.SLR_Gridmethod (same layout; the spherical spline-vertical grid had no tiled form either).kDimfollows its outermost ring), so on inner tiles every z level past the first read the wrong shared rows. Single-tile (tile = patch) behavior is unchanged — the strides coincide, so existing single-worker results are bit-identical.Tests
3D multi-tile splineTransform!testset intest/tiling.jl: a B→A round trip over a 3-way radial decomposition for RLZ, RLR and SLR, seeded with wavenumber-1 content so the k ≥ 1 blocks are exercised. Verified to fail against the pre-fix stride math (the three value checks catch it) and pass with the fix.development): the samemoist_compressible_RLRwarm-bubble run with 1 worker vs 2 radial tiles for 300 steps agrees to ~4e-15 relative on every prognostic field.