Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
375 commits
Select commit Hold shift + click to select a range
271d70b
fix some typting in test_parallel_grid_manager.py
Sep 18, 2025
eca2a8f
make test run again
Sep 19, 2025
ab0f21e
Merge branch 'main' into halo_construction
Sep 19, 2025
3698b9a
fixes from merge
Sep 20, 2025
7a4170c
Merge branch 'main' into halo_construction
Oct 7, 2025
c9be1d0
fix merge: global grid params
Oct 7, 2025
0a2d126
fix typings
Oct 8, 2025
785f7d1
remove obsolete TODO
Oct 8, 2025
c5ad92b
fix parallel diffusion tests
Oct 10, 2025
8791be0
fix parallel non hydro test
Oct 10, 2025
ef3b494
delete files unrelated to this PR
Oct 14, 2025
c87800c
delete files unrelated to this PR
Oct 14, 2025
6a73bf0
Merge branch 'main' into halo_construction
Oct 16, 2025
e484e0c
Merge branch 'main' into halo_construction
Nov 17, 2025
ed51c58
Merge branch 'main' into halo_construction
Nov 19, 2025
935b113
get grid tests to run again
Nov 19, 2025
179d4b7
get parallel test to run again
Nov 19, 2025
45bbbf6
get parallel test to run again
Nov 19, 2025
bb190ec
start/end index for halos (I)
Nov 20, 2025
e89c5e5
fix parallel test for start_index/end_index
Nov 25, 2025
464302a
add tests WIP(1)
Nov 26, 2025
b0746c3
fix typing
Dec 1, 2025
12dbe47
pre-commit
Dec 1, 2025
88ae0ec
add tests (WIP)
Dec 1, 2025
3c35b61
simple fixes
Dec 3, 2025
def79a5
fix reading of additional edge fields
Dec 10, 2025
b418ac2
make all tests run
Dec 10, 2025
7f5973d
fixing some things
Dec 10, 2025
3a7d474
Merge branch 'main' into halo_construction
Dec 10, 2025
73e6a08
fix typings
Dec 10, 2025
378d269
use dummy props on test to make them simple unit tests
Dec 11, 2025
927e7d1
add test to check skip value configuration
Dec 12, 2025
3f64b2a
simple clean ups in PR
Dec 12, 2025
799ac8a
move function only used in test
Dec 12, 2025
e796b74
fix imports in parallel tests
Dec 12, 2025
7f0dedf
add doc strings for compute_domain bounds
Dec 14, 2025
0ca46f0
Merge branch 'main' into halo_construction
Dec 14, 2025
b50691e
pre-commit
Dec 14, 2025
09d4aaf
move serializable tests to unit_tests
Dec 15, 2025
5df9adc
doc string for IconLikeHaloConstructor
Dec 15, 2025
4c8adf3
fix test_local_connectivity to run on grid_manager
Dec 15, 2025
34c61c4
move global_to_local function
Dec 16, 2025
3bee001
Merge branch 'main' into halo_construction
Dec 16, 2025
0a79fdf
add pymetis to standard common dependencies, fix old gt4py version in…
Dec 16, 2025
1fb0c25
mypy
Dec 16, 2025
305d7a0
add missing datatest annotation
Dec 16, 2025
aa95ce8
rename test functions
Jan 1, 2026
d1234ed
fix halo construction: additional vertices for second level edges
Jan 1, 2026
3aaef7d
fix: add "corner" cell
Jan 2, 2026
e5692f1
remove duplicate test
Jan 2, 2026
cddc724
fix edge DecompositionFlag.THIRD
Jan 2, 2026
bb94545
add embedded markers
Jan 2, 2026
43c933d
Merge branch 'main' into halo_construction
Jan 2, 2026
d738ee9
add xfail for dace
Jan 2, 2026
52ddcea
fix ordering
Jan 2, 2026
f211473
cleanup of docstring including @msimberg 's review
jcanton Jan 19, 2026
336db99
little cleanup
jcanton Jan 19, 2026
a983ed7
one more grid for testing
jcanton Jan 26, 2026
3dba11f
fix filename
jcanton Jan 26, 2026
9ec0045
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Jan 28, 2026
d20f82e
Remove outdated xfails
msimberg Jan 28, 2026
be499fe
Remove another xfail
msimberg Jan 28, 2026
b1cea99
Remove old TODO
msimberg Jan 29, 2026
ff4e7db
Pass num cells to global grid params
msimberg Jan 29, 2026
dbbf829
Revert "refactor: testing infrastructure (#1002)"
msimberg Jan 29, 2026
eed64eb
Fix cupy/numpy issues
msimberg Jan 29, 2026
5440d2b
Fix another cupy/numpy issue
msimberg Jan 30, 2026
dbde86b
More cupy/numpy
msimberg Jan 30, 2026
05ba45f
TODO for distributed check in IconGrid constructor
msimberg Jan 30, 2026
0ae367c
Formatting
msimberg Jan 30, 2026
221d364
Add name to TODO
msimberg Jan 30, 2026
6475ead
Linting
msimberg Jan 30, 2026
bee4bc2
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Jan 30, 2026
460be4b
Unrevert data download changes
msimberg Jan 30, 2026
de480b5
Rename single_node to is_single_rank
msimberg Feb 3, 2026
59fa8a3
Rename *single_node test to *single_rank
msimberg Feb 3, 2026
44038d5
Minor formatting change
msimberg Feb 3, 2026
cc1839b
Remove unused variable
msimberg Feb 3, 2026
4b26503
Remove another unused variable
msimberg Feb 3, 2026
8c8876b
Add extra assert to test_props
msimberg Feb 3, 2026
0c20e61
Rename MissingConnectivity to MissingConnectivityError
msimberg Feb 3, 2026
39bcbfd
Update halo cut example
msimberg Feb 3, 2026
a69c3c7
Reformat halo construction docstring
msimberg Feb 3, 2026
df3bb06
Remove unnecessary numpy.unique from halo construction
msimberg Feb 3, 2026
05e992c
Minor renamings in grid_manager.py
msimberg Feb 3, 2026
0c6942a
Simplify some returns in halo.py
msimberg Feb 3, 2026
34a8eb2
Simplify _find_neighbors
msimberg Feb 3, 2026
5c11cb4
Remove some trivial helper functions in halo.py
msimberg Feb 3, 2026
3a67b94
Clean up and fix typo in docstring in decomposition utils
msimberg Feb 3, 2026
0fc37b8
Add fixture for global grids (not limited area grids)
msimberg Feb 3, 2026
f895bb3
Minor bugfix for LAM/distributed configuration
msimberg Feb 3, 2026
412c554
Rename SimpleMetisDecomposer to MetisDecomposer
msimberg Feb 3, 2026
d33c0da
Minor reformatting and more torus tests in test_gridfile.py
msimberg Feb 3, 2026
0d95056
Fix connectivity
msimberg Feb 3, 2026
9ebc747
Remove debugging
msimberg Feb 3, 2026
aaaa514
Add simple test to check that metis decomposition is roughly balanced
msimberg Feb 3, 2026
2ed874e
Expand test_local_connectivity parametrization
msimberg Feb 3, 2026
19fc9d5
Add note about partitioning being deterministic
msimberg Feb 3, 2026
294956b
Rename face to cell in halo.py
msimberg Feb 4, 2026
95e5ef1
Move decomposer to a separate file
msimberg Feb 4, 2026
3926eaa
Revert num_levels/vertical config change
msimberg Feb 4, 2026
8068529
Remove helper next_halo_line
msimberg Feb 4, 2026
5e7b984
Simplify owned_cells
msimberg Feb 4, 2026
32fc3dc
Remove unnecessary xfail
msimberg Feb 4, 2026
cc642c7
Remove owned_cells helper
msimberg Feb 4, 2026
d275bf8
Add check to disallow limited area grids with distributed runs
msimberg Feb 4, 2026
0706f6e
Revert "Remove helper next_halo_line"
msimberg Feb 5, 2026
d2919af
Simplify, but don't remove, next_halo_line helper
msimberg Feb 5, 2026
d284330
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Feb 6, 2026
4637105
Refactor test_parallel_grid_manager.py
msimberg Feb 6, 2026
dcf72b5
Minor cleanup and todo in test_parallel_halo.py
msimberg Feb 6, 2026
f7eb9be
Cleanup and todo
msimberg Feb 6, 2026
48e9a21
Clean up todos
msimberg Feb 6, 2026
f29e554
Remove global_grid_descriptor fixture, try to add metrics test
msimberg Feb 6, 2026
e1d05f5
Fix decomposer import
msimberg Feb 6, 2026
f52a883
Update comments in halo.py
msimberg Feb 9, 2026
774900c
Small renaming
msimberg Feb 9, 2026
571d0f6
Copy owner mask
msimberg Feb 9, 2026
bcedac6
Remove UNDEFINED flag from DecompositionFlag
msimberg Feb 9, 2026
8cc732b
Small renaming
msimberg Feb 9, 2026
3877652
Add assertion
msimberg Feb 9, 2026
c7f5ef8
Small update to docstring
msimberg Feb 9, 2026
57c5d06
Check singlenodedecomposer num_partitions
msimberg Feb 9, 2026
204a5ab
Remove test_geometry_stencils.py
msimberg Feb 9, 2026
67cd219
Revert changes in test_geometry.py
msimberg Feb 9, 2026
9f298c9
Small refactoring
msimberg Feb 9, 2026
6ff1bd2
Revert "Minor bugfix for LAM/distributed configuration"
msimberg Feb 9, 2026
aecfb5f
xfail lam grid
msimberg Feb 9, 2026
777a396
Assert there are no invalid indices in adjacency matrix for metis
msimberg Feb 9, 2026
5609570
Small refactoring of test_local_connectivity
msimberg Feb 9, 2026
d55a20d
Fix test_local_connectivity
msimberg Feb 9, 2026
b814c9f
More tests for test_parallel_icon.py
msimberg Feb 9, 2026
60a0c8e
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Feb 9, 2026
079f3ac
Clean up todo
msimberg Feb 9, 2026
3fd4d31
Add todos
msimberg Feb 9, 2026
a94be5a
Update icon grid skip values again
msimberg Feb 9, 2026
0274189
Revert "Remove UNDEFINED flag from DecompositionFlag"
msimberg Feb 10, 2026
e97b1c4
Revert "Remove owned_cells helper"
msimberg Feb 10, 2026
0e24b76
Fix decomposer import
msimberg Feb 10, 2026
356695a
Use low enough index in test for all tested grids
msimberg Feb 10, 2026
ee8ce4a
Add rbf fields to test_parallel_grid_manager.py
msimberg Feb 10, 2026
395553f
Remove todo
msimberg Feb 10, 2026
cd74e0c
xfail some distributed geometry tests with embedded backend
msimberg Feb 11, 2026
f0baaa3
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Feb 11, 2026
672cd93
Remove duplicated test
msimberg Feb 11, 2026
a9b24fc
Remove unused imports
msimberg Feb 11, 2026
fe38371
Fix pytest.mark.xfail to pytest.xfail
msimberg Feb 11, 2026
f7f3724
Clean up docstring for Zone
msimberg Feb 11, 2026
c7d8a74
Don't use get on dict to ensure exception on missing entries
msimberg Feb 11, 2026
c8bfbc6
Fix import for ToZeroBasedIndexTransformation
msimberg Feb 11, 2026
86da004
Remove unused import
msimberg Feb 11, 2026
814814f
Rename single/multi-node to single/multi-rank
msimberg Feb 11, 2026
f7dae6e
Add missing word
msimberg Feb 11, 2026
7abfc3d
Remove todos
msimberg Feb 11, 2026
3973bfb
Remove todo
msimberg Feb 11, 2026
85b091d
Remove unused logger
msimberg Feb 11, 2026
8e85390
Small refactor in halo.py
msimberg Feb 11, 2026
9e3f0fc
Revert horizontal_size/horizontal_config rename
msimberg Feb 11, 2026
2bd04a7
Fix typo
msimberg Feb 11, 2026
2bf0d2a
Small renaming related to index offset/transformation
msimberg Feb 11, 2026
e72803b
Small simplification
msimberg Feb 11, 2026
aa54fea
Replace prints with logging in distributed tests
msimberg Feb 12, 2026
1c1247a
Update model/common/tests/common/grid/mpi_tests/test_parallel_grid_ma…
msimberg Feb 12, 2026
5248993
Update model/common/tests/common/decomposition/unit_tests/test_halo.py
msimberg Feb 12, 2026
c6ef577
Update model/common/tests/common/grid/mpi_tests/test_parallel_grid_ma…
msimberg Feb 12, 2026
cea742c
Fix typo
msimberg Feb 12, 2026
e7428e6
Fix typo
msimberg Feb 12, 2026
9d7e88a
Remove model/common/tests/common/grid/fixtures.py
msimberg Feb 12, 2026
fde16aa
Fix distributed metrics test
msimberg Feb 12, 2026
0f06c6b
Revert horizontal_size/config rename
msimberg Feb 12, 2026
fcf7821
Fix some inconsistent renames
msimberg Feb 12, 2026
6f8fcd4
Update model/common/src/icon4py/model/common/decomposition/halo.py
msimberg Feb 12, 2026
66abfe1
Update model/common/src/icon4py/model/common/decomposition/halo.py
msimberg Feb 12, 2026
fec9a29
Clean up assignment
msimberg Feb 12, 2026
de988bc
Prefix private member functions with _
msimberg Feb 12, 2026
eae8bde
Remove MPI import for type checking
msimberg Feb 12, 2026
1288824
Minor cleanup
msimberg Feb 12, 2026
1fcee72
Use field_type_aliases in compute_cell_2_vertex_interpolation.py
msimberg Feb 12, 2026
3d9f018
Simplify skipping mpi tests
msimberg Feb 12, 2026
d41ea85
Remove is not None
msimberg Feb 13, 2026
cccbe97
Simplify return
msimberg Feb 13, 2026
2b6be6d
Revert "Remove is not None"
msimberg Feb 13, 2026
b5115c2
Minor consistency renaming
msimberg Feb 13, 2026
1370754
Small cleanup in grid refinement
msimberg Feb 13, 2026
822549e
Add distributed property to GridConfig
msimberg Feb 13, 2026
cf19a0f
Small reordering of fields
msimberg Feb 24, 2026
54ba6b5
Add more fields to be tested in test_parallel_grid_manager.py
msimberg Feb 24, 2026
bac1faf
Change computational domain for some geometry fields
msimberg Feb 24, 2026
789a7ff
Sort geometry fields
msimberg Feb 24, 2026
b40ff92
Add more interpolation fields to parallel grid manager test
msimberg Feb 24, 2026
67e054b
Test more metrics fields
msimberg Feb 24, 2026
f864ec6
Remove unused fixture
msimberg Feb 24, 2026
0fbfb62
Fix figure reference
msimberg Feb 24, 2026
2bc143e
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Feb 24, 2026
4fb0936
Remove deleted field from test
msimberg Feb 24, 2026
7290b81
Update model/common/src/icon4py/model/common/decomposition/definition…
msimberg Feb 27, 2026
135172d
Update model/common/src/icon4py/model/common/decomposition/definition…
msimberg Feb 27, 2026
171d23f
Update model/common/src/icon4py/model/common/decomposition/halo.py
msimberg Feb 27, 2026
7fa119a
Update model/common/src/icon4py/model/common/decomposition/definition…
msimberg Feb 27, 2026
18ebc10
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Feb 27, 2026
f47e5f3
Work on failing test_parallel_grid_geometry.py fields
msimberg Feb 27, 2026
20e4a8b
Comment one more field out for now
msimberg Feb 27, 2026
02a9650
Add assertions for halo construction consistency
msimberg Mar 2, 2026
63a2520
Change implementation of array_ns_from_array
msimberg Mar 2, 2026
23d7c83
Fix inverse dual edge length and c_lin_e fields
msimberg Mar 2, 2026
ad485d0
"Fix" more parallel tests
msimberg Mar 3, 2026
abcc29c
grid description fixture and tiny grid
jcanton Mar 4, 2026
8c83811
Add tests to check consistency of owner masks and domain bounds
msimberg Mar 4, 2026
895b5b4
Fix vertex/edge decomposition ownership masks
msimberg Mar 4, 2026
88b83ba
Update compute bounds in factories now that ownership bug is fixed
msimberg Mar 4, 2026
44e3708
Add tests to check that halo levels are sorted
msimberg Mar 4, 2026
82466c1
Clean up test_halo.py and fix a few parameters
msimberg Mar 4, 2026
38be5e5
Add missing is_sorted helper function
msimberg Mar 4, 2026
7cac885
Remove todo
msimberg Mar 4, 2026
eda26ef
Clean up and enable more tests in test_parallel_grid_manager.py
msimberg Mar 4, 2026
a397e0a
Add specialized mask_prog_halo_c test
msimberg Mar 4, 2026
d0acad4
Merge remote-tracking branch 'origin/halo_construction' into halo_con…
msimberg Mar 4, 2026
d949e44
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Mar 4, 2026
d2d8faf
Update array_ns_from_array after merge
msimberg Mar 4, 2026
95a676f
Update tested fields in test_parallel_grid_manager.py after merge
msimberg Mar 4, 2026
214fbe9
Simplify test_halo.py
msimberg Mar 4, 2026
0d33ee4
Remove empty pytest file
msimberg Mar 4, 2026
1f632ab
Disable r01b01 grid for testing for now
msimberg Mar 5, 2026
a62e6e3
Fix formatting
msimberg Mar 5, 2026
c367428
Ignore commented out code
msimberg Mar 5, 2026
1975443
Small cleanup refactoring in halo construction
msimberg Mar 5, 2026
19abd25
Update decomposition info with_dimension call to set_dimension
msimberg Mar 5, 2026
0d10792
Explicitly convert np.bool_ to bool
msimberg Mar 5, 2026
f6fd95f
Remove unnecessary test
msimberg Mar 5, 2026
c343334
Constrain xfail a bit more
msimberg Mar 5, 2026
da60b19
Add domain sizes
msimberg Mar 5, 2026
fd0c7f0
Remove rbf interpolation todo
msimberg Mar 6, 2026
b8fa94e
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Mar 6, 2026
80f1fa9
Fix second halo level cell computation
msimberg Mar 6, 2026
e9fc3fd
Merge remote-tracking branch 'origin/main' into halo_construction
msimberg Mar 6, 2026
182a843
Increase distributed CI pipeline timelimits
msimberg Mar 6, 2026
79d65f2
Allow None for halo_levels
msimberg Mar 6, 2026
5a6cc8e
Add more tests for test_compute_domain_bounds_for_global_grid
msimberg Mar 6, 2026
8efe35c
Enable grid data download in distributed pipeline
msimberg Mar 6, 2026
56f9cef
Add xfails for wrong halo, interior, local indices with torus grid
msimberg Mar 9, 2026
c6cf66b
Check INTERIOR indices with icon4py domain decomposition
msimberg Mar 9, 2026
301c041
Update ci/distributed.yml
msimberg Mar 9, 2026
d77f5d9
Less verbose xfail
msimberg Mar 9, 2026
37b196b
Download r01b01 grid in ci
msimberg Mar 9, 2026
39703b3
Enable download again
msimberg Mar 9, 2026
6df6af6
Disable download again
msimberg Mar 9, 2026
115aec8
Explicitly set ICON4PY_TEST_DATA_PATH in github workflows
msimberg Mar 9, 2026
f204644
More explicit path
msimberg Mar 9, 2026
dc339dc
Enable grid download for grid download step
msimberg Mar 9, 2026
fc0a445
Remove todos
msimberg Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/validation_grid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@


VALIDATION_GRIDS = (
definitions.Grids.R01B01_GLOBAL,
definitions.Grids.R02B04_GLOBAL,
definitions.Grids.MCH_CH_R04B09_DSL,
definitions.Grids.MCH_OPR_R04B07_DOMAIN01,
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/icon4py-test-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ on:
branches:
- main
types: [opened, reopened, synchronize]

env:
ICON4PY_TEST_DATA_PATH: "${{ github.workspace }}/testdata"
NUM_PROCESSES: auto
ICON4PY_ENABLE_GRID_DOWNLOAD: false
ICON4PY_ENABLE_TESTDATA_DOWNLOAD: false
PYTEST_ADDOPTS: "--durations=0"

jobs:
test-model:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,25 +55,17 @@ jobs:

- name: download grids
if: steps.grid-cache.outputs.cache-hit != 'true'
env:
ICON4PY_ENABLE_GRID_DOWNLOAD: true
run: |
.github/validation_grid_utils.py download

- name: run nox session - unit tests
shell: bash
env:
NUM_PROCESSES: auto
ICON4PY_ENABLE_GRID_DOWNLOAD: false
ICON4PY_ENABLE_TESTDATA_DOWNLOAD: false
PYTEST_ADDOPTS: "--durations=0"
run: |
uvx nox -s "test_model-${{matrix.python-version}}(basic, ${{ matrix.component }})" -- --backend=${{ matrix.backend }}

- name: run nox session - stencil tests
shell: bash
env:
NUM_PROCESSES: auto
ICON4PY_ENABLE_GRID_DOWNLOAD: false
ICON4PY_ENABLE_TESTDATA_DOWNLOAD: false
PYTEST_ADDOPTS: "--durations=0"
run: |
uvx nox -s "test_model-${{matrix.python-version}}(stencils, ${{ matrix.component }})" -- --backend=${{ matrix.backend }} --grid=icon_regional
6 changes: 3 additions & 3 deletions ci/distributed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ build_distributed_cpu:
rules:
- if: $COMPONENT == 'atmosphere/diffusion'
variables:
SLURM_TIMELIMIT: '00:05:00'
SLURM_TIMELIMIT: '00:10:00'
- if: $COMPONENT == 'atmosphere/dycore' && $BACKEND == 'dace_cpu'
variables:
SLURM_TIMELIMIT: '00:20:00'
SLURM_TIMELIMIT: '00:30:00'
- if: $COMPONENT == 'atmosphere/dycore'
variables:
SLURM_TIMELIMIT: '00:15:00'
- when: on_success
variables:
SLURM_TIMELIMIT: '00:30:00'
SLURM_TIMELIMIT: '00:45:00'
artifacts:
when: always
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause

import logging
from typing import Any

import pytest
Expand All @@ -21,6 +22,12 @@
from ..fixtures import * # noqa: F403


if mpi_decomposition.mpi4py is None:
pytest.skip("Skipping parallel tests on single node installation", allow_module_level=True)

_log = logging.getLogger(__file__)


@pytest.mark.mpi
@pytest.mark.uses_concat_where
@pytest.mark.parametrize(
Expand Down Expand Up @@ -63,24 +70,24 @@ def test_parallel_diffusion(
raise pytest.skip("This test is only executed for `dace` backends.")
caplog.set_level("INFO")
parallel_helpers.check_comm_size(processor_props)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: initializing diffusion for experiment '{definitions.Experiments.MCH_CH_R04B09}'"
)
print(
_log.info(
f"local cells = {decomposition_info.global_index(dims.CellDim, decomposition.DecompositionInfo.EntryType.ALL).shape} "
f"local edges = {decomposition_info.global_index(dims.EdgeDim, decomposition.DecompositionInfo.EntryType.ALL).shape} "
f"local vertices = {decomposition_info.global_index(dims.VertexDim, decomposition.DecompositionInfo.EntryType.ALL).shape}"
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: GHEX context setup: from {processor_props.comm_name} with {processor_props.comm_size} nodes"
)

print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: using local grid with {icon_grid.num_cells} Cells, {icon_grid.num_edges} Edges, {icon_grid.num_vertices} Vertices"
)
config = definitions.construct_diffusion_config(experiment, ndyn_substeps=ndyn_substeps)
dtime = savepoint_diffusion_init.get_metadata("dtime").get("dtime")
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: setup: using {processor_props.comm_name} with {processor_props.comm_size} nodes"
)
vertical_config = v_grid.VerticalGridConfig(
Expand Down Expand Up @@ -113,7 +120,7 @@ def test_parallel_diffusion(
orchestration=orchestration,
)

print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")

diagnostic_state = diffusion_states.DiffusionDiagnosticState(
hdef_ic=savepoint_diffusion_init.hdef_ic(),
Expand All @@ -135,15 +142,15 @@ def test_parallel_diffusion(
prognostic_state=prognostic_state,
dtime=dtime,
)
print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")

utils.verify_diffusion_fields(
config=config,
diagnostic_state=diagnostic_state,
prognostic_state=prognostic_state,
diffusion_savepoint=savepoint_diffusion_exit,
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: running diffusion step - using {processor_props.comm_name} with {processor_props.comm_size} nodes - DONE"
)

Expand Down Expand Up @@ -190,19 +197,19 @@ def test_parallel_diffusion_multiple_steps(
######################################################################
caplog.set_level("INFO")
parallel_helpers.check_comm_size(processor_props)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: initializing diffusion for experiment '{definitions.Experiments.MCH_CH_R04B09}'"
)
print(
_log.info(
f"local cells = {decomposition_info.global_index(dims.CellDim, decomposition.DecompositionInfo.EntryType.ALL).shape} "
f"local edges = {decomposition_info.global_index(dims.EdgeDim, decomposition.DecompositionInfo.EntryType.ALL).shape} "
f"local vertices = {decomposition_info.global_index(dims.VertexDim, decomposition.DecompositionInfo.EntryType.ALL).shape}"
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: GHEX context setup: from {processor_props.comm_name} with {processor_props.comm_size} nodes"
)

print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: using local grid with {icon_grid.num_cells} Cells, {icon_grid.num_edges} Edges, {icon_grid.num_vertices} Vertices"
)
cell_geometry = grid_savepoint.construct_cell_geometry()
Expand All @@ -218,7 +225,7 @@ def test_parallel_diffusion_multiple_steps(
config = definitions.construct_diffusion_config(experiment, ndyn_substeps=ndyn_substeps)
diffusion_params = diffusion_.DiffusionParams(config)
dtime = savepoint_diffusion_init.get_metadata("dtime").get("dtime")
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: setup: using {processor_props.comm_name} with {processor_props.comm_size} nodes"
)
exchange = decomposition.create_exchange(processor_props, decomposition_info)
Expand All @@ -245,7 +252,7 @@ def test_parallel_diffusion_multiple_steps(
orchestration=False,
)

print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")

diagnostic_state_dace_non_orch = diffusion_states.DiffusionDiagnosticState(
hdef_ic=savepoint_diffusion_init.hdef_ic(),
Expand All @@ -269,8 +276,8 @@ def test_parallel_diffusion_multiple_steps(
prognostic_state=prognostic_state_dace_non_orch,
dtime=dtime,
)
print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")
print(
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: running diffusion step - using {processor_props.comm_name} with {processor_props.comm_size} nodes - DONE"
)

Expand All @@ -296,7 +303,7 @@ def test_parallel_diffusion_multiple_steps(
backend=backend,
orchestration=True,
)
print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion initialized ")

diagnostic_state_dace_orch = diffusion_states.DiffusionDiagnosticState(
hdef_ic=savepoint_diffusion_init.hdef_ic(),
Expand All @@ -320,8 +327,8 @@ def test_parallel_diffusion_multiple_steps(
prognostic_state=prognostic_state_dace_orch,
dtime=dtime,
)
print(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")
print(
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: diffusion run ")
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: running diffusion step - using {processor_props.comm_name} with {processor_props.comm_size} nodes - DONE"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from icon4py.model.common.metrics import metrics_attributes, metrics_factory
from icon4py.model.common.states import prognostic_state as prognostics
from icon4py.model.common.utils import data_allocation as data_alloc
from icon4py.model.testing import grid_utils
from icon4py.model.testing.fixtures.benchmark import (
geometry_field_source,
interpolation_field_source,
Expand Down Expand Up @@ -62,8 +61,6 @@ def solve_nonhydro(

nonhydro_params = solve_nh.NonHydrostaticParams(config)

decomposition_info = grid_utils.construct_decomposition_info(mesh, allocator)

vertical_config = v_grid.VerticalGridConfig(
mesh.num_levels,
lowest_layer_thickness=50,
Expand Down Expand Up @@ -203,11 +200,7 @@ def solve_nonhydro(
vertical_params=vertical_grid,
edge_geometry=edge_geometry,
cell_geometry=cell_geometry,
owner_mask=gtx.as_field(
(dims.CellDim,),
decomposition_info.owner_mask(dims.CellDim), # type: ignore[arg-type] # mypy not take the type of owner_mask
allocator=allocator,
),
owner_mask=geometry_field_source.get("cell_owner_mask"),
backend=backend_like,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# SPDX-License-Identifier: BSD-3-Clause


import logging

import numpy as np
import pytest
from gt4py.next import typing as gtx_typing
Expand All @@ -22,6 +24,9 @@
from ..fixtures import * # noqa: F403


_log = logging.getLogger(__name__)


@pytest.mark.parametrize("processor_props", [True], indirect=True)
@pytest.mark.datatest
@pytest.mark.parametrize(
Expand Down Expand Up @@ -67,25 +72,25 @@ def test_run_solve_nonhydro_single_step(
pytest.xfail("ValueError: axes don't match array")

parallel_helpers.check_comm_size(processor_props)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: inializing dycore for experiment 'mch_ch_r04_b09_dsl"
)
print(
_log.info(
f"local cells = {decomposition_info.global_index(dims.CellDim, definitions.DecompositionInfo.EntryType.ALL).shape} "
f"local edges = {decomposition_info.global_index(dims.EdgeDim, definitions.DecompositionInfo.EntryType.ALL).shape} "
f"local vertices = {decomposition_info.global_index(dims.VertexDim, definitions.DecompositionInfo.EntryType.ALL).shape}"
)
owned_cells = decomposition_info.owner_mask(dims.CellDim)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: GHEX context setup: from {processor_props.comm_name} with {processor_props.comm_size} nodes"
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: number of halo cells {np.count_nonzero(np.invert(owned_cells))}"
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: number of halo edges {np.count_nonzero(np.invert(decomposition_info.owner_mask(dims.EdgeDim)))}"
)
print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: number of halo cells {np.count_nonzero(np.invert(owned_cells))}"
)

Expand Down Expand Up @@ -137,7 +142,7 @@ def test_run_solve_nonhydro_single_step(
exchange=exchange,
)

print(
_log.info(
f"rank={processor_props.rank}/{processor_props.comm_size}: entering : solve_nonhydro.time_step"
)

Expand All @@ -153,7 +158,7 @@ def test_run_solve_nonhydro_single_step(
at_first_substep=(substep_init == 1),
at_last_substep=(substep_init == ndyn_substeps),
)
print(f"rank={processor_props.rank}/{processor_props.comm_size}: dycore step run ")
_log.info(f"rank={processor_props.rank}/{processor_props.comm_size}: dycore step run ")

expected_theta_v = savepoint_nonhydro_step_final.theta_v_new().asnumpy()
calculated_theta_v = prognostic_states.next.theta_v.asnumpy()
Expand Down
1 change: 1 addition & 0 deletions model/common/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ io = [
"netcdf4>=1.6.1",
"numpy>=1.23.3",
"scikit-learn>=1.4.0",
"pymetis>2022.1",
# TODO(halungge): there are failing tests starting from uxarray==2024.4.0: when a data file does not have
# fields of a given dimension (eg 'edge') then something in uxarray goes wrong with the dimension
# mapping. It is not yet clear whether this is a uxarray bug or on our side.
Expand Down
Loading
Loading