Skip to content

Commit 126f453

Browse files
authored
Merge pull request #253 from xylar/cosine-bell-decomp
Add a cosine-bell decomposition test
2 parents 018ae1a + b49992d commit 126f453

File tree

13 files changed

+159
-30
lines changed

13 files changed

+159
-30
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868

6969
intersphinx_mapping = {
7070
'geometric_features':
71-
('https://mpas-dev.github.io/geometric_features/stable', None),
71+
('https://mpas-dev.github.io/geometric_features/main', None),
7272
'matplotlib': ('https://matplotlib.org/stable', None),
73-
'mpas_tools': ('https://mpas-dev.github.io/MPAS-Tools/stable', None),
73+
'mpas_tools': ('https://mpas-dev.github.io/MPAS-Tools/master', None),
7474
'numpy': ('https://numpy.org/doc/stable', None),
7575
'python': ('https://docs.python.org', None),
7676
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),

docs/developers_guide/ocean/api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
viz.Viz
110110
viz.Viz.run
111111
112+
decomp.Decomp
113+
112114
restart.Restart
113115
114116
restart.RestartStep
@@ -320,8 +322,8 @@
320322
.. autosummary::
321323
:toctree: generated/
322324
323-
get_resolution_for_tasks
324-
get_timestep_for_tasks
325+
get_resolution_for_task
326+
get_timestep_for_task
325327
326328
forward.ConvergenceForward
327329
forward.ConvergenceForward.compute_cell_count

docs/developers_guide/ocean/tasks/barotropic_gyre.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ the `init` step. Namelist and streams files are updated in
3434
with time steps determined algorithmically based on config options. The
3535
number of cells is approximated from config options in
3636
{py:meth}`polaris.ocean.tasks.barotropic_gyre.forward.Forward.compute_cell_count()`
37-
so that this can be used to constrain the number of MPI tasks that Polaris
37+
so that this can be used to constrain the number of MPI tasks that Polaris
3838
tasks have as their target and minimum (if the resources are not explicitly
3939
prescribed). For MPAS-Ocean, PIO namelist options are modified and a
40-
graph partition is generated as part of `runtime_setup()`. Next, the ocean
40+
graph partition is generated as part of `runtime_setup()`. Next, the ocean
4141
model is run. If `run_time_steps` is provided then this determines the run
4242
duration, otherwise the duration is 3 years. Finally, validation of
43-
`layerThickness` and `normalVelocity` in the `output.nc` file are performed
43+
`layerThickness` and `normalVelocity` in the `output.nc` file are performed
4444
against a baseline if one is provided when calling {ref}`dev-polaris-setup`.
4545

4646
### analysis
@@ -51,9 +51,9 @@ the analytical solution for the linearized dynamics. This step also produces a
5151
figure with the model solution, the analytical solution, and the difference
5252
between the two.
5353

54-
(dev-ocean-baroclinic-channel-default)=
54+
(dev-ocean-baroclinic-gyre-default)=
5555

5656
## default
5757

5858
The {py:class}`polaris.ocean.tasks.baroclinic_channel.default.Default`
59-
test performs a test of the linearized dynamics.
59+
test performs a test of the linearized dynamics.

docs/developers_guide/ocean/tasks/cosine_bell.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ colorbar_limits = 0.0, 1.0
8686

8787
See {ref}`dev-visualization-global` for more details.
8888

89+
## decomp
90+
91+
The class {py:class}`polaris.ocean.tasks.cosine_bell.decomp.Decomp` defines
92+
a decomposition test across core counts. It runs Cosine Bell test at coarse
93+
resolution once each on 12 and 24 cores to verify bit-for-bit reproducibility
94+
for tracer advection across different core counts.
95+
8996
## restart
9097

9198
The {py:class}`polaris.ocean.tasks.cosine_bell.restart.Restart` class defines

docs/tutorials/dev_add_test_group.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ constructor:
10111011
$ vi ${POLARIS_HEAD}/polaris/ocean/tasks/yet_another_channel/init.py
10121012
```
10131013
```{code-block} python
1014-
:emphasize-lines: 12-14
1014+
:emphasize-lines: 11-13
10151015
10161016
...
10171017
@@ -1270,7 +1270,7 @@ Next, we add inputs that are outputs from the `init` task:
12701270
$ vi ${POLARIS_HEAD}/polaris/ocean/tasks/yet_another_channel/forward.py
12711271
```
12721272
```{code-block} python
1273-
:emphasize-lines: 12-17
1273+
:emphasize-lines: 10-15
12741274
12751275
...
12761276

docs/users_guide/ocean/suites.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@ run of the same tasks.
88

99
(ocean-suite-cosine-bell)=
1010

11-
## cosine_bell and cosine_bell_cached_init suite
11+
## cosine_bell suite
1212

1313
```bash
1414
polaris suite -c ocean -t cosine_bell ...
1515
```
1616

17-
```bash
18-
polaris suite -c ocean -t cosine_bell_cached_init ...
19-
```
20-
21-
Both `cosine_bell` suites include the following tasks:
17+
The `cosine_bell` suite includes the following tasks:
2218

2319
```none
24-
ocean/global_convergence/icos/cosine_bell
25-
ocean/global_convergence/qu/cosine_bell
20+
ocean/spherical/icos/cosine_bell/convergence_space
21+
ocean/spherical/icos/cosine_bell/convergence_space/with_viz
22+
ocean/spherical/icos/cosine_bell/convergence_time
23+
ocean/spherical/icos/cosine_bell/convergence_time/with_viz
24+
ocean/spherical/icos/cosine_bell/convergence_both
25+
ocean/spherical/icos/cosine_bell/convergence_both/with_viz
26+
ocean/spherical/icos/cosine_bell/decomp
27+
ocean/spherical/icos/cosine_bell/restart
28+
ocean/spherical/qu/cosine_bell/convergence_space
29+
ocean/spherical/qu/cosine_bell/convergence_space/with_viz
30+
ocean/spherical/qu/cosine_bell/convergence_time
31+
ocean/spherical/qu/cosine_bell/convergence_time/with_viz
32+
ocean/spherical/qu/cosine_bell/convergence_both
33+
ocean/spherical/qu/cosine_bell/convergence_both/with_viz
34+
ocean/spherical/qu/cosine_bell/decomp
35+
ocean/spherical/qu/cosine_bell/restart
2636
```
2737

28-
The `cosine_bell` suite runs both tasks from
29-
{ref}`ocean-cosine-bell` in full, whereas the
30-
`cosine_bell_cached_init` suite only runs the ocean simulations from as set
31-
of meshes and initial conditions that have been saved from a previous run
32-
(see {ref}`dev-cache`).

docs/users_guide/ocean/tasks/cosine_bell.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ and final state on a lat-lon grid for each resolution. The visualization is
2828
not included in the other versions of the task in order to not slow down
2929
regression testing.
3030

31-
Another task, `cosine_bell/restart`, performs two time steps of the Cosine Bell
31+
Another task, `cosine_bell/decomp`, performs two runs of the Cosine Bell
32+
test at coarse resolution, once with 12 and once with 24 cores, to verify the
33+
bit-for-bit identical results for tracer advection across different core
34+
counts.
35+
36+
A final task, `cosine_bell/restart`, performs two time steps of the Cosine Bell
3237
test at coarse resolution, then performs reruns the second time step,
3338
as a restart run to verify the bit-for-bit restart capability for tracer
3439
advection.
@@ -51,13 +56,15 @@ ocean/spherical/icos/cosine_bell/convergence_time
5156
ocean/spherical/icos/cosine_bell/convergence_time/with_viz
5257
ocean/spherical/icos/cosine_bell/convergence_both
5358
ocean/spherical/icos/cosine_bell/convergence_both/with_viz
59+
ocean/spherical/icos/cosine_bell/decomp
5460
ocean/spherical/icos/cosine_bell/restart
5561
ocean/spherical/qu/cosine_bell/convergence_space
5662
ocean/spherical/qu/cosine_bell/convergence_space/with_viz
5763
ocean/spherical/qu/cosine_bell/convergence_time
5864
ocean/spherical/qu/cosine_bell/convergence_time/with_viz
5965
ocean/spherical/qu/cosine_bell/convergence_both
6066
ocean/spherical/qu/cosine_bell/convergence_both/with_viz
67+
ocean/spherical/icos/cosine_bell/decomp
6168
ocean/spherical/qu/cosine_bell/restart
6269
```
6370
The default resolutions used in the task depends on the mesh type.
@@ -99,7 +106,7 @@ your own config file (or add a `spherical_convergence` section to a config file
99106
if you're already using one). The resolutions are a comma-separated list of
100107
the resolution of the mesh in km. If you specify a different list
101108
before setting up `cosine_bell`, steps will be generated with the requested
102-
resolutions. (If you alter `icos_resolutions` or `qu_resolutions`) in the
109+
resolutions. (If you alter `icos_resolutions` or `qu_resolutions` in the
103110
task's config file in the work directory, nothing will happen.) For `icos`
104111
meshes, make sure you use a resolution close to those listed in
105112
{ref}`dev-spherical-meshes`. Each resolution will be rounded to the nearest

polaris/ocean/suites/cosine_bell.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ ocean/spherical/icos/cosine_bell/convergence_time
44
ocean/spherical/icos/cosine_bell/convergence_time/with_viz
55
ocean/spherical/icos/cosine_bell/convergence_both
66
ocean/spherical/icos/cosine_bell/convergence_both/with_viz
7+
ocean/spherical/icos/cosine_bell/decomp
78
ocean/spherical/icos/cosine_bell/restart
89
ocean/spherical/qu/cosine_bell/convergence_space
910
ocean/spherical/qu/cosine_bell/convergence_space/with_viz
1011
ocean/spherical/qu/cosine_bell/convergence_time
1112
ocean/spherical/qu/cosine_bell/convergence_time/with_viz
1213
ocean/spherical/qu/cosine_bell/convergence_both
1314
ocean/spherical/qu/cosine_bell/convergence_both/with_viz
15+
ocean/spherical/qu/cosine_bell/decomp
1416
ocean/spherical/qu/cosine_bell/restart

polaris/ocean/suites/nightly.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ ocean/planar/ice_shelf_2d/5km/z-star/default/with_restart
55
ocean/planar/ice_shelf_2d/5km/z-level/default/with_restart
66
ocean/planar/inertial_gravity_wave/convergence_both
77
# ocean/planar/manufactured_solution
8+
ocean/spherical/icos/cosine_bell/decomp
89
ocean/spherical/icos/cosine_bell/restart

polaris/ocean/suites/omega_pr.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ocean/planar/manufactured_solution/convergence_both
2+
ocean/spherical/icos/cosine_bell/decomp
3+
ocean/spherical/icos/cosine_bell/restart

0 commit comments

Comments
 (0)