Skip to content

Commit

Permalink
Merge pull request #53 from fmalatino/fix/computegridoption
Browse files Browse the repository at this point in the history
Changes to test configurations options and externals for parsing
  • Loading branch information
fmalatino authored Jun 20, 2024
2 parents a37f641 + fc21a7d commit 921de90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 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
8 changes: 4 additions & 4 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 @@ -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

0 comments on commit 921de90

Please sign in to comment.