Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: disable high memory test case #223

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ jobs:
- uses: actions/checkout@v3
- name: "Main Script"
run: |
export SUMPY_FFT_BACKEND=loopy
export PYTEST_PARALLEL_FLAGS='-n 2'
export SUMPY_FORCE_SYMBOLIC_BACKEND=sympy
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest'"}
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest and not memory'"}

curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
Expand All @@ -104,10 +106,12 @@ jobs:
echo "- compilers" >> .test-conda-env.yml
echo "- llvm-openmp" >> .test-conda-env.yml

export SUMPY_FFT_BACKEND=loopy
export PYTEST_PARALLEL_FLAGS='-n 2'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export CONDA_ENVIRONMENT=.test-conda-env.yml
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest'"}
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest and not memory'"}

curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
Expand All @@ -121,8 +125,10 @@ jobs:
- uses: actions/checkout@v3
- name: "Main Script"
run: |
export SUMPY_FFT_BACKEND=loopy
export PYTEST_PARALLEL_FLAGS='-n 2'
export SUMPY_FORCE_SYMBOLIC_BACKEND=symengine
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest'"}
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-"-m 'not slowtest and not memory'"}

curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
numpy != 1.22.0

git+https://github.com/inducer/pytools.git#egg=pytools
git+https://github.com/inducer/pymbolic.git#egg=pymbolic
git+https://github.com/inducer/pymbolic.git@attrs#egg=pymbolic
sympy
git+https://github.com/inducer/modepy.git#egg=modepy
git+https://github.com/inducer/pyopencl.git#egg=pyopencl
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ multiline-quotes = """
[tool:pytest]
markers=
slowtest: mark a test as slow
memory: mark test as using too much memory

[mypy]
python_version = 3.8
Expand Down
6 changes: 5 additions & 1 deletion test/test_layer_pot.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ def test_unregularized_off_surface_fmm_vs_direct(actx_factory):

# {{{ test 3D jump relations

@pytest.mark.parametrize("relation", ["sp", "nxcurls", "div_s"])
@pytest.mark.parametrize("relation", [
pytest.param("sp", marks=pytest.mark.memory),
"nxcurls",
"div_s",
])
def test_3d_jump_relations(actx_factory, relation, visualize=False):
pytest.importorskip("pyfmmlib")
actx = actx_factory()
Expand Down
4 changes: 2 additions & 2 deletions test/test_layer_pot_eigenvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
[
(1, 5, 3, False),
(1, 6, 3, False),
(2, 5, 3, False),
pytest.param((2, 5, 3, False), marks=pytest.mark.memory),
(1, 5, 4, False),
(1, 7, 5, False),
(2, 7, 5, False),
pytest.param((2, 7, 5, False), marks=pytest.mark.memory),

(2, 7, 5, True),
])
Expand Down
20 changes: 8 additions & 12 deletions test/test_layer_pot_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,22 +199,16 @@ def check(self):

# {{{ integral identity tester


@pytest.mark.slowtest
@pytest.mark.parametrize("case", [
DynamicTestCase(SphereTestCase(), GreenExpr(), 0),
])
def test_identity_convergence_slow(actx_factory, case):
test_identity_convergence(actx_factory, case)


@pytest.mark.parametrize("case", [
# 2d
DynamicTestCase(ied.StarfishTestCase(), GreenExpr(), 0),
DynamicTestCase(ied.StarfishTestCase(), GreenExpr(), 1.2),
DynamicTestCase(ied.StarfishTestCase(), GradGreenExpr(), 0),
DynamicTestCase(ied.StarfishTestCase(), GradGreenExpr(), 1.2),
DynamicTestCase(ied.StarfishTestCase(), ZeroCalderonExpr(), 0),
pytest.param(DynamicTestCase(ied.StarfishTestCase(), GradGreenExpr(), 0),
marks=pytest.mark.memory),
pytest.param(DynamicTestCase(ied.StarfishTestCase(), GradGreenExpr(), 1.2),
marks=pytest.mark.memory),
pytest.param(DynamicTestCase(ied.StarfishTestCase(), ZeroCalderonExpr(), 0),
marks=pytest.mark.memory),
# test target derivatives with direct evaluation
DynamicTestCase(
ied.StarfishTestCase(), ZeroCalderonExpr(), 0, fmm_order=False),
Expand All @@ -223,6 +217,8 @@ def test_identity_convergence_slow(actx_factory, case):
DynamicTestCase(
ied.StarfishTestCase(), GreenExpr(), 1.2, fmm_backend="fmmlib"),
# 3d
pytest.param(DynamicTestCase(SphereTestCase(), GreenExpr(), 0),
marks=pytest.mark.slowtest),
DynamicTestCase(SphereTestCase(), GreenExpr(), 0, fmm_backend="fmmlib"),
DynamicTestCase(SphereTestCase(), GreenExpr(), 1.2, fmm_backend="fmmlib"),
DynamicTestCase(QuadSphereTestCase(), GreenExpr(), 0, fmm_backend="fmmlib"),
Expand Down
25 changes: 17 additions & 8 deletions test/test_scalar_int_eq.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
THE SOFTWARE.
"""

from typing import List, Union

import pytest
import _pytest

import numpy as np
import numpy.linalg as la
Expand Down Expand Up @@ -445,7 +448,7 @@ def run_int_eq_test(actx,

# {{{ test frontend

cases = [
cases: List[Union[inteq.EllipseTestCase, _pytest.mark.ParameterSet]] = [
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=helmholtz_k,
bc_type=bc_type,
Expand All @@ -457,13 +460,19 @@ def run_int_eq_test(actx,


cases += [
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=BiharmonicKernel,
bc_type="clamped_plate", side=-1, fmm_backend=None),
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=BiharmonicKernel,
bc_type="clamped_plate", side=-1, fmm_backend="sumpy", fmm_order=15,
gmres_tol=1e-9),
# FIXME: this crashes the Github CI with the pymbolic dataclass port in
# https://github.com/inducer/pymbolic/pull/125
pytest.param(
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=BiharmonicKernel,
bc_type="clamped_plate", side=-1, fmm_backend=None),
marks=pytest.mark.memory),
pytest.param(
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=BiharmonicKernel,
bc_type="clamped_plate", side=-1, fmm_backend="sumpy", fmm_order=15,
gmres_tol=1e-9),
marks=pytest.mark.memory),
inteq.EllipseTestCase(
knl_class_or_helmholtz_k=BiharmonicKernel,
bc_type="clamped_plate", side=-1, fmm_backend="sumpy", fmm_order=15,
Expand Down
Loading