From c6795aaafb925481b692b0f032c45334a9e8ec8e Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Tue, 10 Oct 2017 22:54:16 -0500 Subject: [PATCH 1/5] Skip SymEngine + LineTaylorLocalExpansion tests. Tests needing LineTaylorLocalExpansion and SymEngine don't work due a sumpy bug, so skip them. Related: #81 --- test/test_layer_pot_identity.py | 5 +++++ test/test_matrix.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_layer_pot_identity.py b/test/test_layer_pot_identity.py index fe001342..30fc4d89 100644 --- a/test/test_layer_pot_identity.py +++ b/test/test_layer_pot_identity.py @@ -39,6 +39,8 @@ from meshmode.mesh.generation import ( # noqa # from sumpy.visualization import FieldPlotter from pytential import bind, sym, norm from sumpy.kernel import LaplaceKernel, HelmholtzKernel +from sumpy.symbolic import USE_SYMENGINE + import logging logger = logging.getLogger(__name__) @@ -279,6 +281,9 @@ def test_identity_convergence(ctx_getter, case, visualize=False): from pytools.convergence import EOCRecorder eoc_rec = EOCRecorder() + if USE_SYMENGINE and case.fmm_order is None: + pytest.skip("https://gitlab.tiker.net/inducer/sumpy/issues/25") + for resolution in ( getattr(case, "resolutions", None) or case.geometry.resolutions diff --git a/test/test_matrix.py b/test/test_matrix.py index f626a024..d1558bcc 100644 --- a/test/test_matrix.py +++ b/test/test_matrix.py @@ -38,7 +38,8 @@ from pyopencl.tools import ( # noqa as pytest_generate_tests) -@pytest.mark.skipif(USE_SYMENGINE, reason="line taylor in SymEngine is broken") +@pytest.mark.skipif(USE_SYMENGINE, + reason="https://gitlab.tiker.net/inducer/sumpy/issues/25") def test_matrix_build(ctx_factory): cl_ctx = ctx_factory() queue = cl.CommandQueue(cl_ctx) -- GitLab From eb2e270ea236243964a69faa1829df595985a550 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 11 Oct 2017 02:52:58 -0500 Subject: [PATCH 2/5] Revert "Skip SymEngine + LineTaylorLocalExpansion tests." This reverts commit c6795aaafb925481b692b0f032c45334a9e8ec8e. --- test/test_layer_pot_identity.py | 5 ----- test/test_matrix.py | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/test/test_layer_pot_identity.py b/test/test_layer_pot_identity.py index 30fc4d89..fe001342 100644 --- a/test/test_layer_pot_identity.py +++ b/test/test_layer_pot_identity.py @@ -39,8 +39,6 @@ from meshmode.mesh.generation import ( # noqa # from sumpy.visualization import FieldPlotter from pytential import bind, sym, norm from sumpy.kernel import LaplaceKernel, HelmholtzKernel -from sumpy.symbolic import USE_SYMENGINE - import logging logger = logging.getLogger(__name__) @@ -281,9 +279,6 @@ def test_identity_convergence(ctx_getter, case, visualize=False): from pytools.convergence import EOCRecorder eoc_rec = EOCRecorder() - if USE_SYMENGINE and case.fmm_order is None: - pytest.skip("https://gitlab.tiker.net/inducer/sumpy/issues/25") - for resolution in ( getattr(case, "resolutions", None) or case.geometry.resolutions diff --git a/test/test_matrix.py b/test/test_matrix.py index d1558bcc..f626a024 100644 --- a/test/test_matrix.py +++ b/test/test_matrix.py @@ -38,8 +38,7 @@ from pyopencl.tools import ( # noqa as pytest_generate_tests) -@pytest.mark.skipif(USE_SYMENGINE, - reason="https://gitlab.tiker.net/inducer/sumpy/issues/25") +@pytest.mark.skipif(USE_SYMENGINE, reason="line taylor in SymEngine is broken") def test_matrix_build(ctx_factory): cl_ctx = ctx_factory() queue = cl.CommandQueue(cl_ctx) -- GitLab From 4988baea0298ce6e894a133e692793a6d9bedfa3 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 11 Oct 2017 02:53:43 -0500 Subject: [PATCH 3/5] Apply pytest.skip() to the correct test. --- test/test_layer_pot_identity.py | 1 + test/test_scalar_int_eq.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/test/test_layer_pot_identity.py b/test/test_layer_pot_identity.py index fe001342..b5871f0f 100644 --- a/test/test_layer_pot_identity.py +++ b/test/test_layer_pot_identity.py @@ -40,6 +40,7 @@ from meshmode.mesh.generation import ( # noqa from pytential import bind, sym, norm from sumpy.kernel import LaplaceKernel, HelmholtzKernel + import logging logger = logging.getLogger(__name__) diff --git a/test/test_scalar_int_eq.py b/test/test_scalar_int_eq.py index dbc7011a..bb62e7bd 100644 --- a/test/test_scalar_int_eq.py +++ b/test/test_scalar_int_eq.py @@ -37,8 +37,10 @@ from meshmode.mesh.generation import ( # noqa ellipse, cloverleaf, starfish, drop, n_gon, qbx_peanut, WobblyCircle, make_curve_mesh) from sumpy.visualization import FieldPlotter +from sumpy.symbolic import USE_SYMENGINE from pytential import bind, sym + import logging logger = logging.getLogger(__name__) @@ -767,6 +769,9 @@ def test_integral_equation(ctx_getter, case, visualize=False): if case.fmm_backend == "fmmlib": pytest.importorskip("pyfmmlib") + if USE_SYMENGINE and case.fmm_backend is None: + pytest.skip("https://gitlab.tiker.net/inducer/sumpy/issues/25") + # prevent cache 'splosion from sympy.core.cache import clear_cache clear_cache() -- GitLab From ca2d72e9fb343344fdca94cdd466d6c9895c5cae Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 11 Oct 2017 03:00:20 -0500 Subject: [PATCH 4/5] Fix test_matrix error message and fix whitespace in test_layer_pot_identity. --- test/test_layer_pot_identity.py | 1 - test/test_matrix.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_layer_pot_identity.py b/test/test_layer_pot_identity.py index b5871f0f..fe001342 100644 --- a/test/test_layer_pot_identity.py +++ b/test/test_layer_pot_identity.py @@ -40,7 +40,6 @@ from meshmode.mesh.generation import ( # noqa from pytential import bind, sym, norm from sumpy.kernel import LaplaceKernel, HelmholtzKernel - import logging logger = logging.getLogger(__name__) diff --git a/test/test_matrix.py b/test/test_matrix.py index f626a024..d1558bcc 100644 --- a/test/test_matrix.py +++ b/test/test_matrix.py @@ -38,7 +38,8 @@ from pyopencl.tools import ( # noqa as pytest_generate_tests) -@pytest.mark.skipif(USE_SYMENGINE, reason="line taylor in SymEngine is broken") +@pytest.mark.skipif(USE_SYMENGINE, + reason="https://gitlab.tiker.net/inducer/sumpy/issues/25") def test_matrix_build(ctx_factory): cl_ctx = ctx_factory() queue = cl.CommandQueue(cl_ctx) -- GitLab From d15390354a7af0d18559d32aa8b125e90ea85322 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 11 Oct 2017 04:02:13 -0400 Subject: [PATCH 5/5] Fix whitespace --- test/test_scalar_int_eq.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_scalar_int_eq.py b/test/test_scalar_int_eq.py index bb62e7bd..2fd80990 100644 --- a/test/test_scalar_int_eq.py +++ b/test/test_scalar_int_eq.py @@ -40,7 +40,6 @@ from sumpy.visualization import FieldPlotter from sumpy.symbolic import USE_SYMENGINE from pytential import bind, sym - import logging logger = logging.getLogger(__name__) -- GitLab