From 05397dba9fba5a614bbcc582ecf2074537634c89 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 29 Jan 2025 11:49:45 +0100 Subject: [PATCH 01/12] Remove coverage_override and use primary test run for code coverage --- .github/workflows/ci.yml | 9 +--- test/test_mpi_p4est_2d.jl | 11 ++--- test/test_mpi_p4est_3d.jl | 28 +++--------- test/test_mpi_t8code_2d.jl | 11 ++--- test/test_mpi_t8code_3d.jl | 22 ++------- test/test_mpi_tree.jl | 20 +++------ test/test_p4est_2d.jl | 27 +++-------- test/test_p4est_3d.jl | 45 ++++++------------- ...est_paper_self_gravitating_gas_dynamics.jl | 3 +- test/test_parabolic_2d.jl | 5 +-- test/test_structured_2d.jl | 30 ++++--------- test/test_structured_3d.jl | 20 +++------ test/test_t8code_2d.jl | 19 +++----- test/test_t8code_3d.jl | 25 +++-------- test/test_threaded.jl | 5 +-- test/test_tree_1d_advection.jl | 6 +-- test/test_tree_1d_euler.jl | 21 +++------ test/test_tree_1d_mhd.jl | 9 ++-- test/test_tree_1d_mhdmulti.jl | 3 +- test/test_tree_2d_advection.jl | 22 +++------ test/test_tree_2d_euler.jl | 38 +++++----------- test/test_tree_2d_mhd.jl | 5 +-- test/test_tree_3d_advection.jl | 9 +--- test/test_tree_3d_euler.jl | 21 +++------ test/test_trixi.jl | 16 +------ test/test_unstructured_2d.jl | 10 +---- 26 files changed, 112 insertions(+), 328 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54f23758c59..072e19dcf4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,14 +112,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 env: PYTHON: '' - - name: Run tests without coverage - uses: julia-actions/julia-runtest@v1 - with: - coverage: false - env: - PYTHON: '' - TRIXI_TEST: ${{ matrix.trixi_test }} - - name: Run tests with coverage + - name: Run tests uses: julia-actions/julia-runtest@v1 with: coverage: true diff --git a/test/test_mpi_p4est_2d.jl b/test/test_mpi_p4est_2d.jl index 6ac8133f5d2..f1648e2540a 100644 --- a/test/test_mpi_p4est_2d.jl +++ b/test/test_mpi_p4est_2d.jl @@ -81,8 +81,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_2d_dgsem") "elixir_advection_amr_solution_independent.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[4.949660644033807e-5], - linf=[0.0004867846262313763], - coverage_override=(maxiters = 6,)) + linf=[0.0004867846262313763],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -98,8 +97,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_2d_dgsem") @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_unstructured_flag.jl"), l2=[0.0012808538770535593], - linf=[0.01752690016659812], - coverage_override=(maxiters = 6,)) + linf=[0.01752690016659812],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -114,10 +112,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_2d_dgsem") @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[4.507575525876275e-6], - linf=[6.21489667023134e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[6.21489667023134e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_mpi_p4est_3d.jl b/test/test_mpi_p4est_3d.jl index 663732b4ded..df376a46256 100644 --- a/test/test_mpi_p4est_3d.jl +++ b/test/test_mpi_p4est_3d.jl @@ -48,13 +48,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[9.773852895157622e-6], - linf=[0.0005853874124926162], - # override values are different from the serial tests to ensure each process holds at least - # one element, otherwise OrdinaryDiffEq fails during initialization - coverage_override=(maxiters = 6, - initial_refinement_level = 2, - base_level = 2, med_level = 3, - max_level = 4)) + linf=[0.0005853874124926162],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -71,11 +65,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") "elixir_advection_amr_unstructured_curved.jl"), l2=[1.6163120948209677e-5], linf=[0.0010572201890564834], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6, - initial_refinement_level = 0, - base_level = 0, med_level = 1, - max_level = 2)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -90,10 +80,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.002590388934758452], - linf=[0.01840757696885409], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.01840757696885409],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -195,8 +182,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") 0.45574161423218573, 0.8099577682187109 ], - tspan=(0.0, 0.2), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -261,8 +247,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") 0.005104176909383168, 9.738081186490818e-6 ], - tspan=(0.0, 0.25), - coverage_override=(trees_per_dimension = (1, 1, 1),)) + tspan=(0.0, 0.25),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -299,8 +284,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem") 0.05701669133068068, 0.00024182906501186622 ], - tspan=(0.0, 0.25), trees_per_dimension=(1, 1, 1), - coverage_override=(trees_per_dimension = (1, 1, 1),)) + tspan=(0.0, 0.25), trees_per_dimension=(1, 1, 1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_mpi_t8code_2d.jl b/test/test_mpi_t8code_2d.jl index af558c22aed..3b8ff5008d6 100644 --- a/test/test_mpi_t8code_2d.jl +++ b/test/test_mpi_t8code_2d.jl @@ -81,8 +81,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_2d_dgsem") "elixir_advection_amr_solution_independent.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[4.949660644033807e-5], - linf=[0.0004867846262313763], - coverage_override=(maxiters = 6,), atol=1e-9) + linf=[0.0004867846262313763],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -99,8 +98,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_2d_dgsem") "elixir_advection_amr_unstructured_flag.jl"), l2=[0.002019623611753929], linf=[0.03542375961299987], - dynamic_load_balancing=false, - coverage_override=(maxiters = 6,)) + dynamic_load_balancing=false,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -115,10 +113,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_2d_dgsem") @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[4.507575525876275e-6], - linf=[6.21489667023134e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[6.21489667023134e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_mpi_t8code_3d.jl b/test/test_mpi_t8code_3d.jl index cc8af63f03e..138d9ee0267 100644 --- a/test/test_mpi_t8code_3d.jl +++ b/test/test_mpi_t8code_3d.jl @@ -48,13 +48,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_3d_dgsem") @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[1.1302812803902801e-5], - linf=[0.0007889950196294793], - # override values are different from the serial tests to ensure each process holds at least - # one element, otherwise OrdinaryDiffEq fails during initialization - coverage_override=(maxiters = 6, - initial_refinement_level = 2, - base_level = 2, med_level = 3, - max_level = 4)) + linf=[0.0007889950196294793],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -71,11 +65,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_3d_dgsem") "elixir_advection_amr_unstructured_curved.jl"), l2=[2.0535121347526814e-5], linf=[0.0010586603797777504], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6, - initial_refinement_level = 0, - base_level = 0, med_level = 1, - max_level = 2)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -90,10 +80,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_3d_dgsem") @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.002590388934758452], - linf=[0.01840757696885409], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.01840757696885409],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -180,8 +167,7 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_3d_dgsem") 0.45574161423218573, 0.8099577682187109 ], - tspan=(0.0, 0.2), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_mpi_tree.jl b/test/test_mpi_tree.jl index 1e51da02c69..a20845c6d3c 100644 --- a/test/test_mpi_tree.jl +++ b/test/test_mpi_tree.jl @@ -57,8 +57,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as in the serial test! l2=[4.913300828257469e-5], - linf=[0.00045263895394385967], - coverage_override=(maxiters = 6,)) + linf=[0.00045263895394385967],) end @trixi_testset "elixir_advection_amr_nonperiodic.jl" begin @@ -66,8 +65,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() "elixir_advection_amr_nonperiodic.jl"), # Expected errors are exactly the same as in the serial test! l2=[3.2207388565869075e-5], - linf=[0.0007508059772436404], - coverage_override=(maxiters = 6,)) + linf=[0.0007508059772436404],) end @trixi_testset "elixir_advection_restart_amr.jl" begin @@ -88,8 +86,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_refine_twice.jl"), l2=[0.00020547512522578292], - linf=[0.007831753383083506], - coverage_override=(maxiters = 6,)) + linf=[0.007831753383083506],) meshfiles = filter(file -> endswith(file, ".h5") && startswith(file, "mesh"), readdir(outdir)) @test length(meshfiles) > 1 @@ -99,8 +96,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_coarsen_twice.jl"), l2=[0.0014321062757891826], - linf=[0.0253454486893413], - coverage_override=(maxiters = 6,)) + linf=[0.0253454486893413],) end # Hyperbolic diffusion @@ -205,10 +201,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() 0.0002973166773747593, 0.0002973166773760916, 0.001154106793870291 - ], - # Let this test run until the end to cover the time-dependent lines - # of the indicator and the MPI-specific AMR code. - coverage_override=(maxiters = 10^5,)) + ],) end end @@ -323,8 +316,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows() 0.03857193149447702, 0.031090457959835893, 0.12125130332971423 - ], - coverage_override=(maxiters = 6,)) + ],) end if !CI_ON_WINDOWS # see comment on `CI_ON_WINDOWS` in `test/test_mpi.jl` diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 51e9bc015ba..98e289d6bd2 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -63,8 +63,7 @@ end "elixir_advection_amr_solution_independent.jl"), # Expected errors are exactly the same as with StructuredMesh! l2=[4.949660644033807e-5], - linf=[0.0004867846262313763], - coverage_override=(maxiters = 6,)) + linf=[0.0004867846262313763],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -79,8 +78,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_unstructured_flag.jl"), l2=[0.0012808538770535593], - linf=[0.01752690016659812], - coverage_override=(maxiters = 6,)) + linf=[0.01752690016659812],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -94,10 +92,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[4.507575525876275e-6], - linf=[6.21489667023134e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 25,)) + linf=[6.21489667023134e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -111,10 +106,7 @@ end @trixi_testset "elixir_advection_restart_amr.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart_amr.jl"), l2=[2.869137983727866e-6], - linf=[3.8353423270964804e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 25,)) + linf=[3.8353423270964804e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -396,8 +388,7 @@ end 2.3258078438689673, 2.1577683028925416 ], - tspan=(0.0, 0.3), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.3),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -779,10 +770,7 @@ end base_level=0, med_level=1, max_level=1, tspan=(0.0, 0.0001), adapt_initial_condition=false, - adapt_initial_condition_only_refine=false, - # With the default `maxiters = 1` in coverage tests, - # the values for `drag` and `lift` below would differ. - coverage_override=(maxiters = 100_000,)) + adapt_initial_condition_only_refine=false,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -850,8 +838,7 @@ end 0.8266797080712205, 3.9792506230548317 ], - tspan=(0.0, 0.1), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_p4est_3d.jl b/test/test_p4est_3d.jl index 3d2db528a14..97644d5a676 100644 --- a/test/test_p4est_3d.jl +++ b/test/test_p4est_3d.jl @@ -62,9 +62,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[9.773852895157622e-6], - linf=[0.0005853874124926162], - coverage_override=(maxiters = 6, initial_refinement_level = 1, - base_level = 1, med_level = 2, max_level = 3)) + linf=[0.0005853874124926162],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -80,9 +78,7 @@ end "elixir_advection_amr_unstructured_curved.jl"), l2=[1.6163120948209677e-5], linf=[0.0010572201890564834], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6, initial_refinement_level = 0, - base_level = 0, med_level = 1, max_level = 2)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -110,10 +106,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.002590388934758452], - linf=[0.01840757696885409], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.01840757696885409],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -330,8 +323,7 @@ end 0.45574161423218573, 0.8099577682187109 ], - tspan=(0.0, 0.2), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -359,8 +351,7 @@ end 0.7999141641954051 ], tspan=(0.0, 0.2), - volume_flux=flux_chandrashekar, - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + volume_flux=flux_chandrashekar,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -387,8 +378,7 @@ end 3.21754792e-01, 4.76151527e+00 ], - tspan=(0.0, 0.3), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.3),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -445,8 +435,7 @@ end 0.00016833038543762058 ], # Decrease tolerance of adaptive time stepping to get similar results across different systems - abstol=1.0e-11, reltol=1.0e-11, - coverage_override=(trees_per_cube_face = (1, 1), polydeg = 3)) # Prevent long compile time in CI + abstol=1.0e-11, reltol=1.0e-11,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -474,8 +463,7 @@ end 0.0005129931254772464, 0.7942778058932163 ], - tspan=(0.0, 2e2), - coverage_override=(trees_per_cube_face = (1, 1), polydeg = 3)) # Prevent long compile time in CI + tspan=(0.0, 2e2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -505,8 +493,7 @@ end ], tspan=(0.0, 1e2), # Decrease tolerance of adaptive time stepping to get similar results across different systems - abstol=1.0e-9, reltol=1.0e-9, - coverage_override=(trees_per_cube_face = (1, 1), polydeg = 3)) # Prevent long compile time in CI + abstol=1.0e-9, reltol=1.0e-9,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -569,8 +556,7 @@ end 0.005104176909383168, 9.738081186490818e-6 ], - tspan=(0.0, 0.25), - coverage_override=(trees_per_dimension = (1, 1, 1),)) + tspan=(0.0, 0.25),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -605,9 +591,7 @@ end 0.16808957604979002, 0.0005083795485317637 ], - tspan=(0.0, 0.04), - coverage_override=(maxiters = 6, initial_refinement_level = 1, - base_level = 1, max_level = 2)) + tspan=(0.0, 0.04),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -642,9 +626,7 @@ end 0.18947822281424997, 0.0005083794158781671 ], - tspan=(0.0, 0.04), - coverage_override=(maxiters = 6, initial_refinement_level = 1, - base_level = 1, max_level = 2)) + tspan=(0.0, 0.04),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -693,8 +675,7 @@ end 0.5647252867336123, 3.6462732329242566 ], - tspan=(0.0, 0.025), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.025),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_paper_self_gravitating_gas_dynamics.jl b/test/test_paper_self_gravitating_gas_dynamics.jl index 1e097efd51b..b7437888ce6 100644 --- a/test/test_paper_self_gravitating_gas_dynamics.jl +++ b/test/test_paper_self_gravitating_gas_dynamics.jl @@ -312,8 +312,7 @@ end 4.07876384374792, 16.23914384809855 ], - tspan=(0.0, 0.05), - coverage_override=(maxiters = 2,)) + tspan=(0.0, 0.05),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_parabolic_2d.jl b/test/test_parabolic_2d.jl index b4591d8c0de..0bf69fa85b3 100644 --- a/test/test_parabolic_2d.jl +++ b/test/test_parabolic_2d.jl @@ -723,10 +723,7 @@ end 1.199362305026636, 0.9077214424040279, 5.666071182328691], tspan=(0.0, 0.001), - initial_refinement_level=0, - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 10_000,)) + initial_refinement_level=0,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index ea3584db92f..28553eb00a5 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -59,8 +59,7 @@ end 6.314906965187994e-5, 6.31490696496595e-5, 6.314906965032563e-5 - ], - coverage_override=(maxiters = 10^5,)) + ],) @testset "analysis_callback(sol) for AnalysisCallbackCoupled" begin errors = analysis_callback(sol) @@ -96,8 +95,7 @@ end linf=[ 6.627000273318195e-5, 6.62700027264096e-5 - ], - coverage_override=(maxiters = 10^5,)) + ],) @testset "analysis_callback(sol) for AnalysisCallbackCoupled" begin # Ensure that we do not have excessive memory allocations @@ -278,10 +276,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[4.219208035582454e-6], - linf=[3.438434404412494e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[3.438434404412494e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -298,10 +293,7 @@ end linf=[0.0015194252169410394], rtol=5.0e-5, # Higher tolerance to make tests pass in CI (in particular with macOS) elixir_file="elixir_advection_waving_flag.jl", - restart_file="restart_000000021.h5", - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + restart_file="restart_000000021.h5",) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -317,10 +309,7 @@ end l2=[7.841217436552029e-15], linf=[1.0857981180834031e-13], elixir_file="elixir_advection_free_stream.jl", - restart_file="restart_000000036.h5", - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + restart_file="restart_000000036.h5",) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -893,8 +882,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_hypdiff_nonperiodic.jl"), l2=[0.8799744480157664, 0.8535008397034816, 0.7851383019164209], linf=[1.0771947577311836, 1.9143913544309838, 2.149549109115789], - tspan=(0.0, 0.1), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.1),) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -922,8 +910,7 @@ end 0.8344372248051408, 0.8344372248051408 ], - tspan=(0.0, 0.1), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.1),) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -1077,8 +1064,7 @@ end 0.06180314632253597, 9.487023254761695e-7, 0.04370156101034084, 0.04370147392153745, 0.06180318786081015, 3.430672973680963e-8 - ], - coverage_override=(maxiters = 10^5,)) + ],) @testset "analysis_callback(sol) for AnalysisCallbackCoupled" begin errors = analysis_callback(sol) diff --git a/test/test_structured_3d.jl b/test/test_structured_3d.jl index f4864e45d58..757d3eef556 100644 --- a/test/test_structured_3d.jl +++ b/test/test_structured_3d.jl @@ -62,10 +62,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.0025903889347585777], - linf=[0.018407576968841655], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.018407576968841655],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -199,8 +196,7 @@ end 0.19313636558790004, 0.707563913727584 ], - tspan=(0.0, 0.25), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.25),) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -273,9 +269,7 @@ end 0.01282206030593043, 0.03911437990598213, 0.021962225923304324, 0.03169774571258743, 0.021591564663781426, 0.034028148178115364, - 0.020084593242858988], - # Use same polydeg as everything else to prevent long compile times in CI - coverage_override=(polydeg = 3,)) + 0.020084593242858988],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -298,9 +292,7 @@ end 0.02126543791857216, 0.031563506812970266, 0.02116105422516923, 0.03419432640106229, 0.020324891223351533], - surface_flux=(flux_lax_friedrichs, flux_nonconservative_powell), - # Use same polydeg as everything else to prevent long compile times in CI - coverage_override=(polydeg = 3,)) + surface_flux=(flux_lax_friedrichs, flux_nonconservative_powell),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -323,9 +315,7 @@ end 0.9620943261873176, 0.181632512204141, 0.15995711137712265, 0.1791807940466812, 0.015138421396338456], - tspan=(0.0, 0.25), - # Use same polydeg as everything else to prevent long compile times in CI - coverage_override=(polydeg = 3,)) + tspan=(0.0, 0.25),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_t8code_2d.jl b/test/test_t8code_2d.jl index ddede0e737e..55265c8881d 100644 --- a/test/test_t8code_2d.jl +++ b/test/test_t8code_2d.jl @@ -117,8 +117,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_unstructured_flag.jl"), l2=[0.002019623611753929], - linf=[0.03542375961299987], - coverage_override=(maxiters = 6,)) + linf=[0.03542375961299987],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -135,8 +134,7 @@ end "elixir_advection_amr_solution_independent.jl"), # Expected errors are exactly the same as with StructuredMesh! l2=[4.949660644033807e-5], - linf=[0.0004867846262313763], - coverage_override=(maxiters = 6,)) + linf=[0.0004867846262313763],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -150,10 +148,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[4.507575525876275e-6], - linf=[6.21489667023134e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[6.21489667023134e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -169,10 +164,7 @@ end # This test is identical to the one in `test_p4est_2d.jl`. @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart_amr.jl"), l2=[2.869137983727866e-6], - linf=[3.8353423270964804e-5], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 25,)) + linf=[3.8353423270964804e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -371,8 +363,7 @@ end 0.834485181423738, 3.923553028014343 ], - tspan=(0.0, 0.1), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_t8code_3d.jl b/test/test_t8code_3d.jl index 82bec769f28..1e5152a0523 100644 --- a/test/test_t8code_3d.jl +++ b/test/test_t8code_3d.jl @@ -78,9 +78,7 @@ mkdir(outdir) @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as with TreeMesh! l2=[1.1302812803902801e-5], - linf=[0.0007889950196294793], - coverage_override=(maxiters = 6, initial_refinement_level = 1, - base_level = 1, med_level = 2, max_level = 3)) + linf=[0.0007889950196294793],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -98,9 +96,7 @@ mkdir(outdir) "elixir_advection_amr_unstructured_curved.jl"), l2=[2.0535121347526814e-5], linf=[0.0010586603797777504], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6, initial_refinement_level = 0, - base_level = 0, med_level = 1, max_level = 2)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -131,10 +127,7 @@ mkdir(outdir) @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.002590388934758452], - linf=[0.01840757696885409], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.01840757696885409],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -276,8 +269,7 @@ mkdir(outdir) 0.45574161423218573, 0.8099577682187109 ], - tspan=(0.0, 0.2), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.2),) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -306,8 +298,7 @@ mkdir(outdir) 3.21754792e-01, 4.76151527e+00 ], - tspan=(0.0, 0.3), - coverage_override=(polydeg = 3,)) # Prevent long compile time in CI + tspan=(0.0, 0.3),) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -372,8 +363,7 @@ mkdir(outdir) ], tspan=(0.0, 1e2), # Decrease tolerance of adaptive time stepping to get similar results across different systems - abstol=1.0e-9, reltol=1.0e-9, - coverage_override=(trees_per_cube_face = (1, 1), polydeg = 3)) # Prevent long compile time in CI + abstol=1.0e-9, reltol=1.0e-9,) # Prevent long compile time in CI # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -400,8 +390,7 @@ mkdir(outdir) 0.570663236219957, 3.5496520808512027 ], - tspan=(0.0, 0.025), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.025),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_threaded.jl b/test/test_threaded.jl index 83544aa0072..bcc5f21b8ea 100644 --- a/test/test_threaded.jl +++ b/test/test_threaded.jl @@ -209,10 +209,7 @@ end linf=[0.0015194252169410394], rtol=5.0e-5, # Higher tolerance to make tests pass in CI (in particular with macOS) elixir_file="elixir_advection_waving_flag.jl", - restart_file="restart_000000021.h5", - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + restart_file="restart_000000021.h5",) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_tree_1d_advection.jl b/test/test_tree_1d_advection.jl index 0665a1be105..7193dfd4ea6 100644 --- a/test/test_tree_1d_advection.jl +++ b/test/test_tree_1d_advection.jl @@ -27,8 +27,7 @@ end @trixi_testset "elixir_advection_amr.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), l2=[0.3540206249507417], - linf=[0.9999896603382347], - coverage_override=(maxiters = 6,)) + linf=[0.9999896603382347],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -42,8 +41,7 @@ end @trixi_testset "elixir_advection_amr_nonperiodic.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_nonperiodic.jl"), l2=[4.283508859843524e-6], - linf=[3.235356127918171e-5], - coverage_override=(maxiters = 6,)) + linf=[3.235356127918171e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_1d_euler.jl b/test/test_tree_1d_euler.jl index 1386c5f5c4d..b97e403f2f3 100644 --- a/test/test_tree_1d_euler.jl +++ b/test/test_tree_1d_euler.jl @@ -21,10 +21,7 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem") 1.6205433861493646e-7, 1.465427772462391e-7, 5.372255111879554e-7 - ], - # With the default `maxiters = 1` in coverage tests, - # there would be no time series to check against. - coverage_override=(maxiters = 20,)) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -284,8 +281,7 @@ end 2.9766770877037168, 0.16838100902295852, 2.6655773445485798 - ], - coverage_override=(maxiters = 6,)) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -320,9 +316,7 @@ end 3.4296365168219216, 0.17635583964559245, 2.6574584326179505 - ], - # Let this test run longer to cover some lines in flux_hllc - coverage_override=(maxiters = 10^5, tspan = (0.0, 0.1))) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -342,8 +336,7 @@ end 2.6650170188241047 ], shock_indicator_variable=pressure, - cfl=0.2, - coverage_override=(maxiters = 6,)) + cfl=0.2,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -363,8 +356,7 @@ end 2.666689753470263 ], shock_indicator_variable=density, - cfl=0.2, - coverage_override=(maxiters = 6,)) + cfl=0.2,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -378,8 +370,7 @@ end @trixi_testset "elixir_euler_positivity.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_positivity.jl"), l2=[1.6493820253458906, 0.19793887460986834, 0.9783506076125921], - linf=[4.71751203912051, 0.5272411022735763, 2.7426163947635844], - coverage_override=(maxiters = 3,)) + linf=[4.71751203912051, 0.5272411022735763, 2.7426163947635844],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_1d_mhd.jl b/test/test_tree_1d_mhd.jl index e27a075b090..3505e62d4e8 100644 --- a/test/test_tree_1d_mhd.jl +++ b/test/test_tree_1d_mhd.jl @@ -187,8 +187,7 @@ end 5.995204332975845e-15, 1.5122922036932964, 0.0 - ], - coverage_override=(maxiters = 6,)) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -311,8 +310,7 @@ end 2.83556069e+00, 0.00000000e+00 ], - tspan=(0.0, 0.2), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -350,8 +348,7 @@ end ], initial_condition=initial_condition_shu_osher_shock_tube_flipped, boundary_conditions=BoundaryConditionDirichlet(initial_condition_shu_osher_shock_tube_flipped), - tspan=(0.0, 0.2), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_1d_mhdmulti.jl b/test/test_tree_1d_mhdmulti.jl index 9bf34634886..9c23158f7dc 100644 --- a/test/test_tree_1d_mhdmulti.jl +++ b/test/test_tree_1d_mhdmulti.jl @@ -110,8 +110,7 @@ end 0.9541678878162702, 5.773159728050814e-15, 1.4595119339458051, 0.0, 0.18201910908829552, - 0.36403821817659104], - coverage_override=(maxiters = 6,)) + 0.36403821817659104],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_advection.jl b/test/test_tree_2d_advection.jl index f62239c7e93..524de54d570 100644 --- a/test/test_tree_2d_advection.jl +++ b/test/test_tree_2d_advection.jl @@ -14,9 +14,7 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem") @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"), # Expected errors are exactly the same as in the parallel test! l2=[8.311947673061856e-6], - linf=[6.627000273229378e-5], - # Let the small basic test run to the end - coverage_override=(maxiters = 10^5,)) + linf=[6.627000273229378e-5],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -81,9 +79,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), # Expected errors are exactly the same as in the parallel test! l2=[4.913300828257469e-5], - linf=[0.00045263895394385967], - # Let this test run to the end to cover some AMR code - coverage_override=(maxiters = 10^5,)) + linf=[0.00045263895394385967],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -98,8 +94,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_nonperiodic.jl"), # Expected errors are exactly the same as in the parallel test! l2=[3.2207388565869075e-5], - linf=[0.0007508059772436404], - coverage_override=(maxiters = 6,)) + linf=[0.0007508059772436404],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -114,8 +109,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_solution_independent.jl"), l2=[4.949660644033807e-5], - linf=[0.0004867846262313763], - coverage_override=(maxiters = 6,)) + linf=[0.0004867846262313763],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -137,8 +131,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr_visualization.jl"), l2=[0.0007225529919720868], - linf=[0.005954447875428925], - coverage_override=(maxiters = 6,)) + linf=[0.005954447875428925],) # Restore GKSwstype to previous value (if it was set) if !isinteractive() @@ -153,10 +146,7 @@ end @trixi_testset "elixir_advection_timeintegration.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_timeintegration.jl"), l2=[2.4976030518356626e-5], - linf=[0.0005531580316338533], - # Let this test terminate by time instead of maxiters to cover some lines - # in time_integration/methods_2N.jl - coverage_override=(maxiters = 10^5, tspan = (0.0, 0.1))) + linf=[0.0005531580316338533],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index 479a07b97a2..c3bfb4c6520 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -314,9 +314,7 @@ end 1.5486788679247812, 2.4656795949035857 ], - tspan=(0.0, 0.5), - # Let this test run longer to cover some lines in flux_hllc - coverage_override=(maxiters = 10^5, tspan = (0.0, 0.1))) + tspan=(0.0, 0.5),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -341,8 +339,7 @@ end 1.7967508302506658, 3.040149575567518 ], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -369,8 +366,7 @@ end 2.4216027326405487 ], tspan=(0.0, 0.5), - initial_refinement_level=4, - coverage_override=(maxiters = 6,)) + initial_refinement_level=5,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -399,8 +395,7 @@ end 1.2916089289001427, 6.474699399394252 ], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -429,7 +424,6 @@ end ], tspan=(0.0, 1.0), initial_refinement_level=4, - coverage_override=(maxiters = 6,), save_errors=true) lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == @@ -501,8 +495,7 @@ end 1.2910938760258899, 6.473385481404865 ], - tspan=(0.0, 1.0), - coverage_override=(maxiters = 3,)) + tspan=(0.0, 1.0),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -552,9 +545,7 @@ end 6.863554388300223, 303.58813147491134 ], - tspan=(0.0, 0.12), - # Let this test run longer to cover the ControllerThreeLevelCombined lines - coverage_override=(maxiters = 10^5,)) + tspan=(0.0, 0.12),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -632,8 +623,7 @@ end 0.12321616095649354, 0.269046666668995 ], - tspan=(0.0, 0.2), - coverage_override=(maxiters = 2,)) + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -661,7 +651,6 @@ end 0.7300051017382696 ], tspan=(0.0, 2.0), - coverage_override=(maxiters = 7,), save_errors=true) lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == "# iter, simu_time, rho_min, pressure_min" @@ -720,8 +709,7 @@ end 0.0003528986458217968, 22.435474993016918 ], - tspan=(0.0, 0.1), - coverage_override=(maxiters = 2,)) + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -748,8 +736,7 @@ end 47.284459667934684 ], tspan=(0.0, 1.0), - dt=2.5e-2, adaptive=false, - coverage_override=(maxiters = 10^3,)) + dt=2.5e-2, adaptive=false,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -774,8 +761,7 @@ end 8.031723414357423, 1.1918867260293828e6 ], - tspan=(0.0, 1.0e-7), - coverage_override=(maxiters = 6,)) + tspan=(0.0, 1.0e-7),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -922,9 +908,7 @@ end 0.03857193149447702, 0.031090457959835893, 0.12125130332971423 - ], - # Let this test run longer to cover some lines in the AMR indicator - coverage_override=(maxiters = 10^5, tspan = (0.0, 10.5))) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_mhd.jl b/test/test_tree_2d_mhd.jl index 5d52f4a5d42..e0f05fa6a15 100644 --- a/test/test_tree_2d_mhd.jl +++ b/test/test_tree_2d_mhd.jl @@ -346,10 +346,7 @@ end 0.0, 0.5285917066723818 ], - tspan=(0.0, 0.003), - # Calling the AnalysisCallback before iteration 9 causes the interpolation - # of this IC to have negative density/pressure values, crashing the simulation. - coverage_override=(maxiters = 9,)) + tspan=(0.0, 0.003),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_3d_advection.jl b/test/test_tree_3d_advection.jl index ae53a2df52f..1d894d23793 100644 --- a/test/test_tree_3d_advection.jl +++ b/test/test_tree_3d_advection.jl @@ -27,10 +27,7 @@ end @trixi_testset "elixir_advection_restart.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_restart.jl"), l2=[0.00016017848135651983], - linf=[0.0014175368788298393], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + linf=[0.0014175368788298393],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -106,9 +103,7 @@ end @trixi_testset "elixir_advection_amr.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_amr.jl"), l2=[9.773852895157622e-6], - linf=[0.0005853874124926162], - coverage_override=(maxiters = 6, initial_refinement_level = 1, - base_level = 1, med_level = 1, max_level = 3)) + linf=[0.0005853874124926162],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_tree_3d_euler.jl b/test/test_tree_3d_euler.jl index 03ff2c53784..c412a13a1b9 100644 --- a/test/test_tree_3d_euler.jl +++ b/test/test_tree_3d_euler.jl @@ -25,10 +25,7 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_3d_dgsem") 0.032179231640894645, 0.032179231640895534, 0.0655408023333299 - ], - # With the default `maxiters = 1` in coverage tests, - # there would be no time series to check against. - coverage_override=(maxiters = 20,)) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -188,9 +185,7 @@ end 0.07390396464027305, 0.11085594696041134 ], - tspan=(0.0, 0.1), - coverage_override=(maxiters = 6, initial_refinement_level = 0, - base_level = 0, med_level = 0, max_level = 1)) + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -273,8 +268,7 @@ end 0.2749304638368023, 1.4053942765487641 ], - maxiters=10, - coverage_override=(maxiters = 2,)) + maxiters=10,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -462,10 +456,7 @@ end 10.319859082570487, 195.1066220797401 ], - tspan=(0.0, 0.2), - # Let this test run longer to cover some lines in the positivity preserving limiter - # and some AMR lines - coverage_override=(maxiters = 10^5,)) + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -493,9 +484,7 @@ end 2.397746252817731 ], maxiters=5, max_level=6, - surface_flux=FluxHLL(min_max_speed_naive), - coverage_override=(maxiters = 2, initial_refinement_level = 1, - base_level = 1, max_level = 3)) + surface_flux=FluxHLL(min_max_speed_naive),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 024f3654ea0..038b8d4cf3a 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -35,11 +35,6 @@ macro test_trixi_include(elixir, args...) local atol = get_kwarg(args, :atol, atol_default) local rtol = get_kwarg(args, :rtol, rtol_default) local skip_coverage = get_kwarg(args, :skip_coverage, false) - local coverage_override = expr_to_named_tuple(get_kwarg(args, :coverage_override, :())) - if !(:maxiters in keys(coverage_override)) - # maxiters in coverage_override defaults to 1 - coverage_override = (; coverage_override..., maxiters = 1) - end local cmd = string(Base.julia_cmd()) local coverage = occursin("--code-coverage", cmd) && @@ -48,19 +43,12 @@ macro test_trixi_include(elixir, args...) local kwargs = Pair{Symbol, Any}[] for arg in args if (arg.head == :(=) && - !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol, :coverage_override, - :skip_coverage)) - && !(coverage && arg.args[1] in keys(coverage_override))) + !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol, + :skip_coverage))) push!(kwargs, Pair(arg.args...)) end end - if coverage - for key in keys(coverage_override) - push!(kwargs, Pair(key, coverage_override[key])) - end - end - if coverage && skip_coverage return quote if Trixi.mpi_isroot() diff --git a/test/test_unstructured_2d.jl b/test/test_unstructured_2d.jl index fed71e49f0b..b99f4728165 100644 --- a/test/test_unstructured_2d.jl +++ b/test/test_unstructured_2d.jl @@ -120,10 +120,7 @@ end 0.005243995459478956, 0.004685630332338153, 0.01750217718347713 - ], - # With the default `maxiters = 1` in coverage tests, - # there would be no time steps after the restart. - coverage_override=(maxiters = 100_000,)) + ],) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -212,10 +209,7 @@ end 0.0005656680962440319, 0.0013910024779804075 ], - tspan=(0.0, 0.2), - # With the default `maxiters = 1` in coverage tests, - # there would be no time series to check against. - coverage_override=(maxiters = 20,)) + tspan=(0.0, 0.2),) # Extra test that the `TimeSeries` callback creates reasonable data point_data_1 = time_series.affect!.point_data[1] @test all(isapprox.(point_data_1[1:4], From a979a01ea661176a396c2aa63fed0b92768fe917 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 30 Jan 2025 13:14:49 +0100 Subject: [PATCH 02/12] fixup! Remove coverage_override and use primary test run for code coverage --- test/test_tree_2d_euler.jl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index c3bfb4c6520..2917346682f 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -428,16 +428,7 @@ end lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == "# iter, simu_time, rho_min, rho_max, entropy_guermond_etal_min, pressure_min" - cmd = string(Base.julia_cmd()) - coverage = occursin("--code-coverage", cmd) && - !occursin("--code-coverage=none", cmd) - if coverage - # Run with coverage takes 6 time steps. - @test startswith(lines[end], "6") - else - # Run without coverage takes 138 time steps. - @test startswith(lines[end], "138") - end + @test startswith(lines[end], "138") # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From f7b97b4d088f9c5b3a9518d7d1ae09a33a3f2809 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 1 Feb 2025 17:06:45 +0100 Subject: [PATCH 03/12] remove other mentions of coverage --- test/test_p4est_2d.jl | 57 ++++++------- test/test_special_elixirs.jl | 143 +++++++++++++------------------- test/test_structured_3d.jl | 2 +- test/test_t8code_3d.jl | 2 +- test/test_tree_2d_euler.jl | 4 +- test/test_tree_2d_eulermulti.jl | 4 +- test/test_tree_2d_kpp.jl | 19 ++--- test/test_trixi.jl | 21 +---- 8 files changed, 98 insertions(+), 154 deletions(-) diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 98e289d6bd2..7c1342d04e3 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -439,17 +439,14 @@ end 17.750333649853616 ], tspan=(0.0, 0.0001), - rtol=1.0e-7, - skip_coverage=true) - if @isdefined sol # Skipped in coverage run - # Ensure that we do not have excessive memory allocations - # (e.g., from type instabilities) - let - t = sol.t[end] - u_ode = sol.u[end] - du_ode = similar(u_ode) - @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 - end + rtol=1.0e-7,) + # Ensure that we do not have excessive memory allocations + # (e.g., from type instabilities) + let + t = sol.t[end] + u_ode = sol.u[end] + du_ode = similar(u_ode) + @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 end end @@ -467,17 +464,14 @@ end 24.241610279839758, 561.0630401858057 ], - tspan=(0.0, 0.0001), - skip_coverage=true) - if @isdefined sol # Skipped in coverage run - # Ensure that we do not have excessive memory allocations - # (e.g., from type instabilities) - let - t = sol.t[end] - u_ode = sol.u[end] - du_ode = similar(u_ode) - @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 - end + tspan=(0.0, 0.0001),) + # Ensure that we do not have excessive memory allocations + # (e.g., from type instabilities) + let + t = sol.t[end] + u_ode = sol.u[end] + du_ode = similar(u_ode) + @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 end end @@ -495,17 +489,14 @@ end 6.857777546171545, 31.749285097390576 ], - tspan=(0.0, 0.001), - skip_coverage=true) - if @isdefined sol # Skipped in coverage run - # Ensure that we do not have excessive memory allocations - # (e.g., from type instabilities) - let - t = sol.t[end] - u_ode = sol.u[end] - du_ode = similar(u_ode) - @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 - end + tspan=(0.0, 0.001),) + # Ensure that we do not have excessive memory allocations + # (e.g., from type instabilities) + let + t = sol.t[end] + u_ode = sol.u[end] + du_ode = similar(u_ode) + @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 end end diff --git a/test/test_special_elixirs.jl b/test/test_special_elixirs.jl index c268c923c0d..a8eeb3ebda3 100644 --- a/test/test_special_elixirs.jl +++ b/test/test_special_elixirs.jl @@ -14,101 +14,74 @@ isdir(outdir) && rm(outdir, recursive = true) const EXAMPLES_DIR = pkgdir(Trixi, "examples") -cmd = string(Base.julia_cmd()) -coverage = occursin("--code-coverage", cmd) && !occursin("--code-coverage=none", cmd) - @testset "Special elixirs" begin #! format: noindent @testset "Convergence test" begin - if !coverage - @timed_testset "tree_2d_dgsem" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "tree_2d_dgsem", - "elixir_advection_extended.jl"), - 3, initial_refinement_level = 2) - @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) - end + @timed_testset "tree_2d_dgsem" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, "tree_2d_dgsem", + "elixir_advection_extended.jl"), + 3, initial_refinement_level = 2) + @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) + end - @timed_testset "structured_2d_dgsem" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, - "structured_2d_dgsem", - "elixir_advection_extended.jl"), - 3, cells_per_dimension = (5, 9)) - @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) - end + @timed_testset "structured_2d_dgsem" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, + "structured_2d_dgsem", + "elixir_advection_extended.jl"), + 3, cells_per_dimension = (5, 9)) + @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) + end - @timed_testset "structured_2d_dgsem coupled" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, - "structured_2d_dgsem", - "elixir_advection_coupled.jl"), - 3) - @test isapprox(mean_convergence[1][:l2], [4.0], rtol = 0.05) - @test isapprox(mean_convergence[2][:l2], [4.0], rtol = 0.05) - end + @timed_testset "structured_2d_dgsem coupled" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, + "structured_2d_dgsem", + "elixir_advection_coupled.jl"), + 3) + @test isapprox(mean_convergence[1][:l2], [4.0], rtol = 0.05) + @test isapprox(mean_convergence[2][:l2], [4.0], rtol = 0.05) + end - @timed_testset "p4est_2d_dgsem" begin - # Run convergence test on unrefined mesh - no_refine = @cfunction((p4est, which_tree, quadrant)->Cint(0), Cint, - (Ptr{Trixi.p4est_t}, Ptr{Trixi.p4est_topidx_t}, - Ptr{Trixi.p4est_quadrant_t})) - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "p4est_2d_dgsem", - "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), - 2, refine_fn_c = no_refine) - @test isapprox(mean_convergence[:linf], [3.2, 3.2, 4.0, 3.7], rtol = 0.05) - end + @timed_testset "p4est_2d_dgsem" begin + # Run convergence test on unrefined mesh + no_refine = @cfunction((p4est, which_tree, quadrant)->Cint(0), Cint, + (Ptr{Trixi.p4est_t}, Ptr{Trixi.p4est_topidx_t}, + Ptr{Trixi.p4est_quadrant_t})) + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, "p4est_2d_dgsem", + "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), + 2, refine_fn_c = no_refine) + @test isapprox(mean_convergence[:linf], [3.2, 3.2, 4.0, 3.7], rtol = 0.05) + end - @timed_testset "structured_3d_dgsem" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, - "structured_3d_dgsem", - "elixir_advection_basic.jl"), - 2, cells_per_dimension = (7, 4, 5)) - @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) - end + @timed_testset "structured_3d_dgsem" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, + "structured_3d_dgsem", + "elixir_advection_basic.jl"), + 2, cells_per_dimension = (7, 4, 5)) + @test isapprox(mean_convergence[:l2], [4.0], rtol = 0.05) + end - @timed_testset "p4est_3d_dgsem" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "p4est_3d_dgsem", - "elixir_advection_unstructured_curved.jl"), - 2, initial_refinement_level = 0) - @test isapprox(mean_convergence[:l2], [2.7], rtol = 0.05) - end + @timed_testset "p4est_3d_dgsem" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, "p4est_3d_dgsem", + "elixir_advection_unstructured_curved.jl"), + 2, initial_refinement_level = 0) + @test isapprox(mean_convergence[:l2], [2.7], rtol = 0.05) + end - @timed_testset "paper_self_gravitating_gas_dynamics" begin - mean_convergence = convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, - "paper_self_gravitating_gas_dynamics", - "elixir_eulergravity_convergence.jl"), - 2, tspan = (0.0, 0.25), - initial_refinement_level = 1) - @test isapprox(mean_convergence[:l2], 4 * ones(4), atol = 0.4) - end - else - # Without coverage, just run simple convergence tests to cover - # the convergence test logic - @test_nowarn_mod convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "tree_2d_dgsem", - "elixir_advection_basic.jl"), 2) - @test_nowarn_mod convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "tree_2d_dgsem", - "elixir_advection_extended.jl"), 2, - initial_refinement_level = 0, - tspan = (0.0, 0.1)) - @test_nowarn_mod convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "structured_2d_dgsem", - "elixir_advection_basic.jl"), 2) - @test_nowarn_mod convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "structured_2d_dgsem", - "elixir_advection_coupled.jl"), 2) - @test_nowarn_mod convergence_test(@__MODULE__, - joinpath(EXAMPLES_DIR, "structured_2d_dgsem", - "elixir_advection_extended.jl"), 2, - cells_per_dimension = (1, 1), - tspan = (0.0, 0.1)) + @timed_testset "paper_self_gravitating_gas_dynamics" begin + mean_convergence = convergence_test(@__MODULE__, + joinpath(EXAMPLES_DIR, + "paper_self_gravitating_gas_dynamics", + "elixir_eulergravity_convergence.jl"), + 2, tspan = (0.0, 0.25), + initial_refinement_level = 1) + @test isapprox(mean_convergence[:l2], 4 * ones(4), atol = 0.4) end end diff --git a/test/test_structured_3d.jl b/test/test_structured_3d.jl index 757d3eef556..30dc69d3bdb 100644 --- a/test/test_structured_3d.jl +++ b/test/test_structured_3d.jl @@ -196,7 +196,7 @@ end 0.19313636558790004, 0.707563913727584 ], - tspan=(0.0, 0.25),) # Prevent long compile time in CI + tspan=(0.0, 0.25),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_t8code_3d.jl b/test/test_t8code_3d.jl index 1e5152a0523..fa1397e1266 100644 --- a/test/test_t8code_3d.jl +++ b/test/test_t8code_3d.jl @@ -363,7 +363,7 @@ mkdir(outdir) ], tspan=(0.0, 1e2), # Decrease tolerance of adaptive time stepping to get similar results across different systems - abstol=1.0e-9, reltol=1.0e-9,) # Prevent long compile time in CI + abstol=1.0e-9, reltol=1.0e-9,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index 2917346682f..858c5bce5a9 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -645,8 +645,8 @@ end save_errors=true) lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == "# iter, simu_time, rho_min, pressure_min" - # Run without (with) coverage takes 745 (7) time steps - @test startswith(lines[end], "7") + # Run takes 745 time steps + @test startswith(lines[end], "745") # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_eulermulti.jl b/test/test_tree_2d_eulermulti.jl index d6dc3ef94f4..de2944eb40d 100644 --- a/test/test_tree_2d_eulermulti.jl +++ b/test/test_tree_2d_eulermulti.jl @@ -83,8 +83,8 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem") save_errors=true) lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == "# iter, simu_time, rho1_min, rho2_min" - # Runs with and without coverage take 1 and 15 time steps. - @test startswith(lines[end], "1") + # Runs 15 time steps. + @test startswith(lines[end], "15") # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_kpp.jl b/test/test_tree_2d_kpp.jl index c9af68c6cc4..c7408355ab8 100644 --- a/test/test_tree_2d_kpp.jl +++ b/test/test_tree_2d_kpp.jl @@ -17,17 +17,14 @@ EXAMPLES_DIR = joinpath(examples_dir(), "tree_2d_dgsem") max_refinement_level=6, tspan=(0.0, 0.01), atol=1e-6, - rtol=1e-6, - skip_coverage=true) - if @isdefined sol # Skipped in coverage run - # Ensure that we do not have excessive memory allocations - # (e.g., from type instabilities) - let - t = sol.t[end] - u_ode = sol.u[end] - du_ode = similar(u_ode) - @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 - end + rtol=1e-6,) + # Ensure that we do not have excessive memory allocations + # (e.g., from type instabilities) + let + t = sol.t[end] + u_ode = sol.u[end] + du_ode = similar(u_ode) + @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 end end end diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 038b8d4cf3a..32b24585004 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -34,32 +34,15 @@ macro test_trixi_include(elixir, args...) end local atol = get_kwarg(args, :atol, atol_default) local rtol = get_kwarg(args, :rtol, rtol_default) - local skip_coverage = get_kwarg(args, :skip_coverage, false) - - local cmd = string(Base.julia_cmd()) - local coverage = occursin("--code-coverage", cmd) && - !occursin("--code-coverage=none", cmd) local kwargs = Pair{Symbol, Any}[] for arg in args if (arg.head == :(=) && - !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol, - :skip_coverage))) + !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol,))) push!(kwargs, Pair(arg.args...)) end end - if coverage && skip_coverage - return quote - if Trixi.mpi_isroot() - println("═"^100) - println("Skipping coverage test of ", $elixir) - println("═"^100) - println("\n\n") - end - end - end - quote Trixi.mpi_isroot() && println("═"^100) Trixi.mpi_isroot() && println($elixir) @@ -78,7 +61,7 @@ macro test_trixi_include(elixir, args...) @test_nowarn_mod trixi_include(@__MODULE__, $elixir; $kwargs...) additional_ignore_content # if present, compare l2 and linf errors against reference values - if !$coverage && (!isnothing($l2) || !isnothing($linf)) + if !isnothing($l2) || !isnothing($linf) l2_measured, linf_measured = analysis_callback(sol) if Trixi.mpi_isroot() && !isnothing($l2) From ef7d1110989b55058c3c65915a50c7ddb48d3a2c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 1 Feb 2025 17:07:38 +0100 Subject: [PATCH 04/12] Update test/test_trixi.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- test/test_trixi.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 32b24585004..e352077a15d 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -38,7 +38,7 @@ macro test_trixi_include(elixir, args...) local kwargs = Pair{Symbol, Any}[] for arg in args if (arg.head == :(=) && - !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol,))) + !(arg.args[1] in (:l2, :linf, :RealT, :atol, :rtol))) push!(kwargs, Pair(arg.args...)) end end From e09078c1942b51149ff1dbc2a4707ef4732c69fb Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 2 Feb 2025 14:51:05 +0100 Subject: [PATCH 05/12] fix rebase --- test/test_structured_2d.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index 28553eb00a5..6727c511f39 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -119,7 +119,6 @@ end 6.627000273318195e-5, 6.62700027264096e-5 ], - coverage_override=(maxiters = 10^5,), stepsize_callback=StepsizeCallback(cfl = x -> 1.6)) @testset "analysis_callback(sol) for AnalysisCallbackCoupled" begin From 0a2423a426431dec4840ed459b830b4213d5155c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 3 Feb 2025 13:37:51 +0100 Subject: [PATCH 06/12] ensure RealT=Float32 for elixir_mhd_ec_float32 --- test/test_tree_2d_mhd.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_tree_2d_mhd.jl b/test/test_tree_2d_mhd.jl index e0f05fa6a15..4f1edf4834c 100644 --- a/test/test_tree_2d_mhd.jl +++ b/test/test_tree_2d_mhd.jl @@ -167,7 +167,8 @@ end 0.09208107, 0.09208131, 0.14795369, - 2.2078211f-6]) + 2.2078211f-6], + RealT=Float32) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From 494ed5ddcde01bdfbc0f12f70b0e9058822a51cf Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 3 Feb 2025 13:43:00 +0100 Subject: [PATCH 07/12] adjust tolerances test_unstructured_2d --- test/test_unstructured_2d.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_unstructured_2d.jl b/test/test_unstructured_2d.jl index b99f4728165..cec7152f4fc 100644 --- a/test/test_unstructured_2d.jl +++ b/test/test_unstructured_2d.jl @@ -678,7 +678,7 @@ end 0.0006164432358186644, 0.001363103391379461], tspan=(0.0, 0.05), - atol=1.0e-10) + atol=2.0e-10) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -725,7 +725,7 @@ end 1.148153794261475e-11, 7.461231632532872e-10], tspan=(0.0, 0.05), - atol=1.0e-10) + atol=1.0e-9) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From 7966c46a6dbe63d638a272615587c088582b5dce Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 3 Feb 2025 14:48:10 +0100 Subject: [PATCH 08/12] two more small fixes --- test/runtests.jl | 18 +++--------------- test/test_parabolic_1d.jl | 3 ++- test/test_tree_1d_shallowwater.jl | 3 ++- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 836488d0d8e..a9dfc4cb999 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,21 +18,9 @@ const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3) # cf. https://github.com/JuliaParallel/MPI.jl/pull/391 @test true - # There are spurious test failures of Trixi.jl with MPI on Windows, see - # https://github.com/trixi-framework/Trixi.jl/issues/901 - # To reduce their impact, we do not test MPI with coverage on Windows. - # This reduces the chance to hit a spurious test failure by one half. - # In addition, it looks like the Linux GitHub runners run out of memory during the 3D tests - # with coverage, so we currently do not test MPI with coverage on Linux. For more details, - # see the discussion at https://github.com/trixi-framework/Trixi.jl/pull/1062#issuecomment-1035901020 - cmd = string(Base.julia_cmd()) - coverage = occursin("--code-coverage", cmd) && - !occursin("--code-coverage=none", cmd) - if !(coverage && Sys.iswindows()) && !(coverage && Sys.isapple()) - # We provide a `--heap-size-hint` to avoid/reduce out-of-memory errors during CI testing - mpiexec() do cmd - run(`$cmd -n $TRIXI_MPI_NPROCS $(Base.julia_cmd()) --threads=1 --check-bounds=yes --heap-size-hint=0.5G $(abspath("test_mpi.jl"))`) - end + # We provide a `--heap-size-hint` to avoid/reduce out-of-memory errors during CI testing + mpiexec() do cmd + run(`$cmd -n $TRIXI_MPI_NPROCS $(Base.julia_cmd()) --threads=1 --check-bounds=yes --heap-size-hint=0.5G $(abspath("test_mpi.jl"))`) end end diff --git a/test/test_parabolic_1d.jl b/test/test_parabolic_1d.jl index c640be3c8b8..b0fa4797650 100644 --- a/test/test_parabolic_1d.jl +++ b/test/test_parabolic_1d.jl @@ -138,7 +138,8 @@ end 0.0029963751636357117, 0.0028639041695096433, 0.012691132694550689 - ]) + ], + atol=1e-11) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_1d_shallowwater.jl b/test/test_tree_1d_shallowwater.jl index 79fd3131489..cfab027201a 100644 --- a/test/test_tree_1d_shallowwater.jl +++ b/test/test_tree_1d_shallowwater.jl @@ -357,7 +357,8 @@ end 2.220446049250313e-16, 8.881784197001252e-16 ], - tspan=(0.0, 100.0)) + tspan=(0.0, 100.0), + atol=1e-12) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From 443edc7709323536409ec90c9fb74a96dea05c0c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 4 Feb 2025 16:07:40 +0100 Subject: [PATCH 09/12] Update test/test_tree_2d_euler.jl Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- test/test_tree_2d_euler.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index 858c5bce5a9..4f75d3c2a45 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -366,7 +366,7 @@ end 2.4216027326405487 ], tspan=(0.0, 0.5), - initial_refinement_level=5,) + initial_refinement_level=4,) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From 93f9a57b07132bf4230a12f6780147c16c72cfa5 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 4 Feb 2025 17:00:44 +0100 Subject: [PATCH 10/12] update tolerances in parabolic --- test/test_parabolic_1d.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test_parabolic_1d.jl b/test/test_parabolic_1d.jl index b0fa4797650..1ea2f6bde8b 100644 --- a/test/test_parabolic_1d.jl +++ b/test/test_parabolic_1d.jl @@ -139,7 +139,7 @@ end 0.0028639041695096433, 0.012691132694550689 ], - atol=1e-11) + atol=1e-10) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -166,7 +166,8 @@ end 0.0027548031865172184, 0.0028567713569609024, 0.012941793735691931 - ]) + ], + atol=1e-9) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -192,7 +193,8 @@ end 0.0001466387202588848, 0.00019422419092429135, 0.0009556449835592673 - ]) + ], + atol=1e-9) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -219,7 +221,8 @@ end 0.00011850494672183132, 0.00018987676556476442, 0.0009597461727750556 - ]) + ], + atol=1e-9) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let From 4f705d142114feba34a3910b4db0e51ed720fc95 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 5 Feb 2025 10:45:38 +0100 Subject: [PATCH 11/12] update --- test/test_p4est_2d.jl | 3 ++- test/test_parabolic_1d.jl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 7c1342d04e3..aa0ae0b35cc 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -515,7 +515,8 @@ end 6.265341002817672, 24.077904874883338 ], - tspan=(0.0, 0.02)) + tspan=(0.0, 0.02), + atol=1e-7) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_parabolic_1d.jl b/test/test_parabolic_1d.jl index 1ea2f6bde8b..49cf359c51d 100644 --- a/test/test_parabolic_1d.jl +++ b/test/test_parabolic_1d.jl @@ -220,7 +220,7 @@ end linf=[ 0.00011850494672183132, 0.00018987676556476442, - 0.0009597461727750556 + 0.0009597423024825247 ], atol=1e-9) # Ensure that we do not have excessive memory allocations From b91121062355481ba7101514bc7e1f79b33a95df Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 5 Feb 2025 11:52:14 +0100 Subject: [PATCH 12/12] Apply suggestions from code review Co-authored-by: Hendrik Ranocha --- test/test_structured_2d.jl | 4 ++-- test/test_t8code_3d.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index 6727c511f39..7e017552721 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -881,7 +881,7 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_hypdiff_nonperiodic.jl"), l2=[0.8799744480157664, 0.8535008397034816, 0.7851383019164209], linf=[1.0771947577311836, 1.9143913544309838, 2.149549109115789], - tspan=(0.0, 0.1),) # Prevent long compile time in CI + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -909,7 +909,7 @@ end 0.8344372248051408, 0.8344372248051408 ], - tspan=(0.0, 0.1),) # Prevent long compile time in CI + tspan=(0.0, 0.1),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_t8code_3d.jl b/test/test_t8code_3d.jl index fa1397e1266..352d73df7d0 100644 --- a/test/test_t8code_3d.jl +++ b/test/test_t8code_3d.jl @@ -269,7 +269,7 @@ mkdir(outdir) 0.45574161423218573, 0.8099577682187109 ], - tspan=(0.0, 0.2),) # Prevent long compile time in CI + tspan=(0.0, 0.2),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -298,7 +298,7 @@ mkdir(outdir) 3.21754792e-01, 4.76151527e+00 ], - tspan=(0.0, 0.3),) # Prevent long compile time in CI + tspan=(0.0, 0.3),) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let