From 6a2fb70d3950fa065e85ea1b16faf94243a0c9fe Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sat, 7 Mar 2020 07:56:57 -0700 Subject: [PATCH 1/5] disable uniform metric tests for now --- test/data_for_test.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test/data_for_test.py b/test/data_for_test.py index 99feb03..1711bfd 100644 --- a/test/data_for_test.py +++ b/test/data_for_test.py @@ -87,24 +87,24 @@ def metrics_generator(): ("sine", "x", "wavy3d"), ("sine", "y", "wavy3d"), ("sine", "z", "wavy3d"), - ("sine", "x", "uniform"), - ("sine", "y", "uniform"), - ("sine", "z", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), - ("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), - ("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), - ("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), - ("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), - ("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), - ("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") + #("sine", "x", "uniform"), + #("sine", "y", "uniform"), + #("sine", "z", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), + #("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), + #("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), + #("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), + #("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), + #("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), + #("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") ]) def window_data(request, states_generator, metrics_generator): states_str = request.param[0] -- GitLab From a3c29dceb87bf86d8556fc23c5e9d11285290743 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sat, 7 Mar 2020 08:00:18 -0700 Subject: [PATCH 2/5] take marks off test_weno_weights_pos --- test/test_flux_window_ops.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test_flux_window_ops.py b/test/test_flux_window_ops.py index 8c22c13..37eee47 100644 --- a/test/test_flux_window_ops.py +++ b/test/test_flux_window_ops.py @@ -200,11 +200,9 @@ def test_dissipation_part_neg(queue, window_results): u.compare_arrays(dissipation_dev.get(), data.dissipation_neg) -@pytest.mark.slow +#@pytest.mark.slow def test_weno_weights_pos(queue, window_results): data = window_results - if not np.array_equal(data.metrics[0], data.metrics[1]): - pytest.xfail("expect failure with non-uniform metrics") prg = u.get_weno_program_with_root_kernel("weno_weights_pos") -- GitLab From 998b85d7bcbbea52182bfe7bb6f73d581a3a0d31 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sat, 7 Mar 2020 08:07:46 -0700 Subject: [PATCH 3/5] take marks off test_weno_weights_neg --- test/test_flux_window_ops.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test_flux_window_ops.py b/test/test_flux_window_ops.py index 37eee47..1408f78 100644 --- a/test/test_flux_window_ops.py +++ b/test/test_flux_window_ops.py @@ -219,11 +219,9 @@ def test_weno_weights_pos(queue, window_results): u.compare_arrays(weights_dev.get(), data.weno_weights_pos) -@pytest.mark.slow +#@pytest.mark.slow def test_weno_weights_neg(queue, window_results): data = window_results - if not np.array_equal(data.metrics[0], data.metrics[1]): - pytest.xfail("expect failure with non-uniform metrics") prg = u.get_weno_program_with_root_kernel("weno_weights_neg") -- GitLab From 6dc7d0ffd31bb8283be8ea1c1e7fcce116bd3505 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sun, 29 Mar 2020 15:19:55 -0600 Subject: [PATCH 4/5] revert changes to test enable/disable --- test/data_for_test.py | 36 ++++++++++++++++++------------------ test/test_flux_window_ops.py | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/data_for_test.py b/test/data_for_test.py index 1711bfd..99feb03 100644 --- a/test/data_for_test.py +++ b/test/data_for_test.py @@ -87,24 +87,24 @@ def metrics_generator(): ("sine", "x", "wavy3d"), ("sine", "y", "wavy3d"), ("sine", "z", "wavy3d"), - #("sine", "x", "uniform"), - #("sine", "y", "uniform"), - #("sine", "z", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), - #("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), - #("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), - #("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), - #("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), - #("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), - #("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") + ("sine", "x", "uniform"), + ("sine", "y", "uniform"), + ("sine", "z", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), + ("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), + ("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), + ("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), + ("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), + ("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), + ("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") ]) def window_data(request, states_generator, metrics_generator): states_str = request.param[0] diff --git a/test/test_flux_window_ops.py b/test/test_flux_window_ops.py index 1408f78..9685c38 100644 --- a/test/test_flux_window_ops.py +++ b/test/test_flux_window_ops.py @@ -200,7 +200,7 @@ def test_dissipation_part_neg(queue, window_results): u.compare_arrays(dissipation_dev.get(), data.dissipation_neg) -#@pytest.mark.slow +@pytest.mark.slow def test_weno_weights_pos(queue, window_results): data = window_results @@ -219,7 +219,7 @@ def test_weno_weights_pos(queue, window_results): u.compare_arrays(weights_dev.get(), data.weno_weights_pos) -#@pytest.mark.slow +@pytest.mark.slow def test_weno_weights_neg(queue, window_results): data = window_results -- GitLab From 6f322e31b50d77ec6938fa6efab0bd0b31a3f863 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sun, 29 Mar 2020 15:20:18 -0600 Subject: [PATCH 5/5] fix bug where metric term was not handled correctly in WENO weight computation --- WENO.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WENO.F90 b/WENO.F90 index 80780a4..f14987f 100644 --- a/WENO.F90 +++ b/WENO.F90 @@ -615,7 +615,7 @@ subroutine weno_weights_pos(nvars, characteristic_fluxes, combined_frozen_metric integer p, i, j real*8 sum_alpha(1) - eps = 1.0d-6!*combined_frozen_metric + eps = 1.0d-6*combined_frozen_metric p = 2 call oscillation_pos(nvars, characteristic_fluxes, IS) @@ -732,7 +732,7 @@ subroutine weno_weights_neg(nvars, characteristic_fluxes, combined_frozen_metric integer p, i, j real*8 sum_alpha(1) - eps = 1.0d-6!*combined_frozen_metric + eps = 1.0d-6*combined_frozen_metric p = 2 call oscillation_neg(nvars, characteristic_fluxes, IS) -- GitLab