From ead4411ecd205bd1a005cdcb0a1ff543d57b5f18 Mon Sep 17 00:00:00 2001 From: Michael Campbell Date: Wed, 3 Feb 2021 08:22:01 -0600 Subject: [PATCH 1/6] Separate pytest CI into sections, wave, diffusion, and euler. --- .github/workflows/ci.yaml | 4 +++- test/{ => diffusion}/test_diffusion.py | 0 test/{ => euler}/test_bc.py | 0 test/{ => euler}/test_eos.py | 0 test/{ => euler}/test_euler.py | 0 test/{ => euler}/test_init.py | 0 test/{ => wave}/test_wave.py | 0 7 files changed, 3 insertions(+), 1 deletion(-) rename test/{ => diffusion}/test_diffusion.py (100%) rename test/{ => euler}/test_bc.py (100%) rename test/{ => euler}/test_eos.py (100%) rename test/{ => euler}/test_euler.py (100%) rename test/{ => euler}/test_init.py (100%) rename test/{ => wave}/test_wave.py (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7c8509f9..bbbe1176b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,7 +88,9 @@ jobs: if [[ ${{ matrix.os }} == "macos-latest" ]]; then export PYOPENCL_TEST=port:pthread fi - python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw . + python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./euler + python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./wave + python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./diffusion examples: name: Examples ${{ matrix.os }} diff --git a/test/test_diffusion.py b/test/diffusion/test_diffusion.py similarity index 100% rename from test/test_diffusion.py rename to test/diffusion/test_diffusion.py diff --git a/test/test_bc.py b/test/euler/test_bc.py similarity index 100% rename from test/test_bc.py rename to test/euler/test_bc.py diff --git a/test/test_eos.py b/test/euler/test_eos.py similarity index 100% rename from test/test_eos.py rename to test/euler/test_eos.py diff --git a/test/test_euler.py b/test/euler/test_euler.py similarity index 100% rename from test/test_euler.py rename to test/euler/test_euler.py diff --git a/test/test_init.py b/test/euler/test_init.py similarity index 100% rename from test/test_init.py rename to test/euler/test_init.py diff --git a/test/test_wave.py b/test/wave/test_wave.py similarity index 100% rename from test/test_wave.py rename to test/wave/test_wave.py From 1cd9afef86fdfe5466e8b55cf77805d9be3865d2 Mon Sep 17 00:00:00 2001 From: Michael Campbell Date: Wed, 3 Feb 2021 08:23:47 -0600 Subject: [PATCH 2/6] Re-enable out-of-control memory hog test in diffusion suite. --- test/diffusion/test_diffusion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/diffusion/test_diffusion.py b/test/diffusion/test_diffusion.py index 1d4214876..9fd79e64d 100644 --- a/test/diffusion/test_diffusion.py +++ b/test/diffusion/test_diffusion.py @@ -238,7 +238,7 @@ def sym_diffusion(dim, sym_alpha, sym_u): (get_static_trig_var_diff(2), 50, 5.e-5, [8, 12, 16]), (get_static_trig_var_diff(3), 50, 5.e-5, [8, 10, 12]), ]) -def disable_test_diffusion_accuracy(actx_factory, problem, nsteps, dt, scales, order, +def test_diffusion_accuracy(actx_factory, problem, nsteps, dt, scales, order, visualize=False): """ Checks the accuracy of the diffusion operator by solving the heat equation for a From b4d50b63e87f0c4a5e84f4e819dea5fee56257d7 Mon Sep 17 00:00:00 2001 From: Michael Campbell Date: Wed, 3 Feb 2021 13:05:55 -0600 Subject: [PATCH 3/6] Call tests in a loop. --- .github/workflows/ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bbbe1176b..6b05d36b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,9 +88,10 @@ jobs: if [[ ${{ matrix.os }} == "macos-latest" ]]; then export PYOPENCL_TEST=port:pthread fi - python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./euler - python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./wave - python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./diffusion + for dirname in */ ; do + echo "Running tests in: $dirname" + python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./"$dirname" + done examples: name: Examples ${{ matrix.os }} From 65be23ad73b0fd6e61855720e850c1114fbd6e84 Mon Sep 17 00:00:00 2001 From: Michael Campbell Date: Wed, 3 Feb 2021 14:23:16 -0600 Subject: [PATCH 4/6] Run each py file individually (temporarily), comment reminds us why --- .github/workflows/ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b05d36b7..3dbce5760 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,9 +88,10 @@ jobs: if [[ ${{ matrix.os }} == "macos-latest" ]]; then export PYOPENCL_TEST=port:pthread fi - for dirname in */ ; do - echo "Running tests in: $dirname" - python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./"$dirname" + # One test at a time to address ballooning memory. See MIRGE-Com issue: + # https://github.com/illinois-ceesd/mirgecom/issues/212 + for filename in *.py ; do + python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./"$filename" done examples: From 1052c595ad871f864338fa2c0e1c4837b2e235df Mon Sep 17 00:00:00 2001 From: Michael Campbell Date: Wed, 3 Feb 2021 14:25:31 -0600 Subject: [PATCH 5/6] Move tests back to top level test directory, slight tweak to CI to detect the tests. --- .github/workflows/ci.yaml | 2 +- test/{euler => }/test_bc.py | 0 test/{diffusion => }/test_diffusion.py | 0 test/{euler => }/test_eos.py | 0 test/{euler => }/test_euler.py | 0 test/{euler => }/test_init.py | 0 test/{wave => }/test_wave.py | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename test/{euler => }/test_bc.py (100%) rename test/{diffusion => }/test_diffusion.py (100%) rename test/{euler => }/test_eos.py (100%) rename test/{euler => }/test_euler.py (100%) rename test/{euler => }/test_init.py (100%) rename test/{wave => }/test_wave.py (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3dbce5760..ae54ea246 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: fi # One test at a time to address ballooning memory. See MIRGE-Com issue: # https://github.com/illinois-ceesd/mirgecom/issues/212 - for filename in *.py ; do + for filename in test_*.py ; do python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./"$filename" done diff --git a/test/euler/test_bc.py b/test/test_bc.py similarity index 100% rename from test/euler/test_bc.py rename to test/test_bc.py diff --git a/test/diffusion/test_diffusion.py b/test/test_diffusion.py similarity index 100% rename from test/diffusion/test_diffusion.py rename to test/test_diffusion.py diff --git a/test/euler/test_eos.py b/test/test_eos.py similarity index 100% rename from test/euler/test_eos.py rename to test/test_eos.py diff --git a/test/euler/test_euler.py b/test/test_euler.py similarity index 100% rename from test/euler/test_euler.py rename to test/test_euler.py diff --git a/test/euler/test_init.py b/test/test_init.py similarity index 100% rename from test/euler/test_init.py rename to test/test_init.py diff --git a/test/wave/test_wave.py b/test/test_wave.py similarity index 100% rename from test/wave/test_wave.py rename to test/test_wave.py From 93c512e5f4d65421ef391e9e16bf49d39fac119f Mon Sep 17 00:00:00 2001 From: Mike Campbell Date: Wed, 3 Feb 2021 19:12:20 -0600 Subject: [PATCH 6/6] Extricate superfluous verbiage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andreas Klöckner --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ae54ea246..e5196d135 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,7 +88,7 @@ jobs: if [[ ${{ matrix.os }} == "macos-latest" ]]; then export PYOPENCL_TEST=port:pthread fi - # One test at a time to address ballooning memory. See MIRGE-Com issue: + # One test at a time to address ballooning memory. # https://github.com/illinois-ceesd/mirgecom/issues/212 for filename in test_*.py ; do python -m pytest --durations=10 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw ./"$filename"