Skip to content

Commit

Permalink
testing edits
Browse files Browse the repository at this point in the history
  • Loading branch information
nfarabullini committed Jan 14, 2025
1 parent 15e9e4b commit 5387e73
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestComputePpmAllFaceValues(helpers.StencilTest):
PROGRAM = compute_ppm_all_face_values
OUTPUTS = ("p_face",)
MARKER = (pytest.mark.embedded_skip,)
# MARKER = (pytest.mark.embedded_skip,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class TestApplyDiffusionToThetaAndExner(StencilTest):
PROGRAM = apply_diffusion_to_theta_and_exner
OUTPUTS = ("theta_v", "exner")
MARKER = (pytest.mark.embedded_skip, pytest.mark.miss_neighbors)
MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestCalculateNabla2AndSmagCoefficientsForVn(StencilTest):
PROGRAM = calculate_nabla2_and_smag_coefficients_for_vn
OUTPUTS = ("kh_smag_e", "kh_smag_ec", "z_nabla2_e")
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def calculate_nabla4_numpy(
class TestCalculateNabla4(StencilTest):
PROGRAM = calculate_nabla4
OUTPUTS = ("z_nabla4_e2",)
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestAddVerticalWindDerivativeToDivergenceDamping(StencilTest):
PROGRAM = add_vertical_wind_derivative_to_divergence_damping
OUTPUTS = ("z_graddiv_vn",)
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def compute_advective_normal_wind_tendency_numpy(
class TestComputeAdvectiveNormalWindTendency(StencilTest):
PROGRAM = compute_advective_normal_wind_tendency
OUTPUTS = ("ddt_vn_apc",)
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestComputeBtraj(StencilTest):
PROGRAM = compute_horizontal_advection_of_rho_and_theta
OUTPUTS = ("z_rho_e", "z_theta_v_e")
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def compute_btraj_numpy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestComputeHorizontalGradientOfExnerPressureForFlatCoordinates(StencilTest):
PROGRAM = compute_horizontal_gradient_of_exner_pressure_for_flat_coordinates
OUTPUTS = ("z_gradh_exner",)
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(grid, inv_dual_edge_length: np.array, z_exner_ex_pr: np.array, **kwargs) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class TestComputeHorizontalGradientOfExnerPressureForMultipleLevels(StencilTest):
PROGRAM = compute_horizontal_gradient_of_exner_pressure_for_multiple_levels
OUTPUTS = ("z_gradh_exner",)
MARKER = (pytest.mark.embedded_skip, pytest.mark.miss_neighbors)
MARKER = (pytest.mark.embedded_skip,) # pytest.mark.miss_neighbors)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class TestComputeHorizontalGradientOfExnerPressureForNonflatCoordinates(StencilTest):
PROGRAM = compute_horizontal_gradient_of_exner_pressure_for_nonflat_coordinates
OUTPUTS = ("z_gradh_exner",)
MARKER = (pytest.mark.miss_neighbors,)
# MARKER = (pytest.mark.miss_neighbors,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class TestComputeHydrostaticCorrectionTerm(StencilTest):
OUTPUTS = ("z_hydro_corr",)
PROGRAM = compute_hydrostatic_correction_term
MARKER = (pytest.mark.embedded_skip, pytest.mark.miss_neighbors)
MARKER = (pytest.mark.embedded_skip,) # pytest.mark.miss_neighbors)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TestFusedVelocityAdvectionStencil8To13(StencilTest):
"w_concorr_c",
"z_w_con_c",
)
MARKER = (pytest.mark.embedded_skip,)
# MARKER = (pytest.mark.embedded_skip,)

@staticmethod
def reference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ def test_run_solve_nonhydro_single_step(
atol=1e-14,
)


@pytest.mark.embedded_skip
@pytest.mark.datatest
@pytest.mark.parametrize("experiment", [dt_utils.REGIONAL_EXPERIMENT])
Expand Down
2 changes: 0 additions & 2 deletions model/common/tests/grid_tests/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ def test_compute_inverse_edge_length(backend, grid_savepoint, grid_file, experim
(dt_utils.R02B04_GLOBAL, dt_utils.GLOBAL_EXPERIMENT, 1e-11),
],
)
# stencil from geomtery factory does not get compute in the second case, i.e. only regional experiment fields are outputted
# hence if running global alone, it does verify but with teh additional of regional it does not
@pytest.mark.datatest
def test_compute_dual_edge_length(backend, grid_savepoint, grid_file, experiment, rtol):
grid_geometry = grid_utils.get_grid_geometry(backend, experiment, grid_file)
Expand Down
6 changes: 3 additions & 3 deletions model/testing/src/icon4py/model/testing/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def _test_validation(self, grid, backend, input_data):
def _test_execution_benchmark(self, pytestconfig, grid, backend, input_data, benchmark):
if self.MARKER is not None:
for marker in self.MARKER:
if marker.markname == "embedded_skip":
pytest.skip("test not compatible with embedded backend")
elif marker.markname == "miss_neighbors":
# if marker.markname == "embedded_skip":
# pytest.skip("test not compatible with embedded backend")
if marker.markname == "miss_neighbors":
pytest.xfail("Stencil does not support missing neighbors.")
if pytestconfig.getoption(
"--benchmark-disable"
Expand Down

0 comments on commit 5387e73

Please sign in to comment.