Skip to content

Commit

Permalink
Merge branch 'develop' into ci-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalatino authored Jun 20, 2024
2 parents 7e0d08c + 5342b11 commit 93ff0dc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions ndsl/stencils/corners.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,6 @@ def fill_corners_dgrid_defn(
x_out: FloatField,
y_in: FloatField,
y_out: FloatField,
mysign: float,
):
"""
Args:
Expand All @@ -998,7 +997,7 @@ def fill_corners_dgrid_defn(
y_in (in):
y_out (inout):
"""
from __externals__ import i_end, i_start, j_end, j_start
from __externals__ import i_end, i_start, j_end, j_start, mysign

with computation(PARALLEL), interval(...):
# sw corner
Expand Down
14 changes: 7 additions & 7 deletions ndsl/stencils/testing/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def pytest_addoption(parser):
parser.addoption(
"--topology",
action="store",
default="cube-sphere",
help='Topology of the grid. "cube-sphere" means a 6-faced grid, "doubly-periodic" means a 1 tile grid. Default to "cube-sphere".',
default="cubed-sphere",
help='Topology of the grid. "cubed-sphere" means a 6-faced grid, "doubly-periodic" means a 1 tile grid. Default to "cubed-sphere".',
)


Expand Down Expand Up @@ -189,7 +189,7 @@ def get_ranks(metafunc, layout):
if only_rank is None:
if topology == "doubly-periodic":
total_ranks = layout[0] * layout[1]
elif topology == "cube-sphere":
elif topology == "cubed-sphere":
total_ranks = 6 * layout[0] * layout[1]
else:
raise NotImplementedError(f"Topology {topology} is unknown.")
Expand Down Expand Up @@ -238,7 +238,7 @@ def _savepoint_cases(
savepoint_names,
ranks,
stencil_config,
namelist,
namelist: Namelist,
backend: str,
data_path: str,
grid_mode: str,
Expand All @@ -248,8 +248,8 @@ def _savepoint_cases(
for rank in ranks:
if grid_mode == "default":
grid = Grid._make(
namelist.npx + 1,
namelist.npy + 1,
namelist.npx,
namelist.npy,
namelist.npz,
namelist.layout,
rank,
Expand Down Expand Up @@ -370,7 +370,7 @@ def generate_parallel_stencil_tests(metafunc, *, backend: str):


def get_communicator(comm, layout, topology_mode):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "doubly-periodic"):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "cubed-sphere"):
partitioner = CubedSpherePartitioner(TilePartitioner(layout))
communicator = CubedSphereCommunicator(comm, partitioner)
else:
Expand Down
2 changes: 1 addition & 1 deletion ndsl/stencils/testing/test_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def test_parallel_savepoint(
)
if case.testobj.skip_test:
return
if grid and not case.testobj.compute_grid_option:
if (grid == "compute") and not case.testobj.compute_grid_option:
pytest.xfail(f"Grid compute option not used for test {case.savepoint_name}")
input_data = dataset_to_dict(case.ds_in)
# run python version of functionality
Expand Down
4 changes: 2 additions & 2 deletions ndsl/stencils/testing/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import ndsl.dsl.gt4py_utils as utils
from ndsl.dsl.stencil import StencilFactory
from ndsl.dsl.typing import Field # noqa: F401
from ndsl.dsl.typing import Field, Float # noqa: F401
from ndsl.quantity import Quantity
from ndsl.stencils.testing.grid import Grid # type: ignore

Expand Down Expand Up @@ -168,7 +168,7 @@ def make_storage_data_input_vars(self, inputs, storage_vars=None):
if type(inputs_in[p]) in [np.int64, np.int32]:
inputs_out[p] = int(inputs_in[p])
else:
inputs_out[p] = inputs_in[p]
inputs_out[p] = Float(inputs_in[p])
for d, info in storage_vars.items():
serialname = info["serialname"] if "serialname" in info else d
self.update_info(info, inputs_in)
Expand Down

0 comments on commit 93ff0dc

Please sign in to comment.