From ba41cc0703327955d91867babcf3537936bba7e1 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 24 Jun 2021 07:05:39 +0200 Subject: [PATCH 1/7] CI on Julia v1.7 --- .github/workflows/Documenter.yml | 2 +- .github/workflows/ci.yml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 97029fb46b4..94fd50e905d 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 with: - version: '1.6' + version: '^1.7.0-0' show-versioninfo: true - uses: julia-actions/julia-buildpkg@v1 env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cc170ce668..1c0696318c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' + - '^1.7.0-0' # - 'nightly' os: - ubuntu-latest @@ -65,43 +65,43 @@ jobs: - paper-self-gravitating-gas-dynamics - misc include: - - version: '1.6' + - version: '^1.7.0-0' os: macOS-latest arch: x64 trixi_test: 2d_part1 - - version: '1.6' + - version: '^1.7.0-0' os: macOS-latest arch: x64 trixi_test: 2d_part2 - - version: '1.6' + - version: '^1.7.0-0' os: macOS-latest arch: x64 trixi_test: 2d_part3 - - version: '1.6' + - version: '^1.7.0-0' os: macOS-latest arch: x64 trixi_test: 2d_mpi - - version: '1.6' + - version: '^1.7.0-0' os: macOS-latest arch: x64 trixi_test: 2d_threaded - - version: '1.6' + - version: '^1.7.0-0' os: windows-latest arch: x64 trixi_test: 2d_part1 - - version: '1.6' + - version: '^1.7.0-0' os: windows-latest arch: x64 trixi_test: 2d_part2 - - version: '1.6' + - version: '^1.7.0-0' os: windows-latest arch: x64 trixi_test: 2d_part3 - - version: '1.6' + - version: '^1.7.0-0' os: windows-latest arch: x64 trixi_test: 2d_mpi - - version: '1.6' + - version: '^1.7.0-0' os: windows-latest arch: x64 trixi_test: 2d_threaded From d182aa569d91cd2ba9a5a32da6ba48f13ae530f6 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 20 Jul 2021 08:04:26 +0200 Subject: [PATCH 2/7] set compat bound of P4est to v0.2.2 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index bde106b2ec6..82be50302f1 100644 --- a/Project.toml +++ b/Project.toml @@ -36,7 +36,7 @@ LinearMaps = "2.7, 3.0" LoopVectorization = "0.12.35" MPI = "0.16, 0.17, 0.18" OffsetArrays = "1.3" -P4est = "0.2.1" +P4est = "0.2.2" Polyester = "0.3" RecipesBase = "1.1" Reexport = "1.0" From ed17318a7cc22c152e5954a5b3012b8c1251aeb9 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 22 Jul 2021 14:35:08 +0200 Subject: [PATCH 3/7] fix warnings --- test/test_trixi.jl | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 68d0e3d9981..e430a8bb549 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -31,8 +31,16 @@ macro test_trixi_include(elixir, args...) Trixi.mpi_isroot() && println("═"^100) Trixi.mpi_isroot() && println($elixir) + # if `maxiters` is set in tests, it is usually set to a small numer to + # run only a few steps - ignore possible warnings coming from that + if any(==(:maxiters) ∘ first, $kwargs) + additional_ignore_content = [r"┌ Warning: Interrupted\. Larger maxiters is needed\.\n└ @ SciMLBase .+\n"] + else + additional_ignore_content = [] + end + # evaluate examples in the scope of the module they're called from - @test_nowarn_mod trixi_include(@__MODULE__, $elixir; $kwargs...) + @test_nowarn_mod trixi_include(@__MODULE__, $elixir; $kwargs...) additional_ignore_content # if present, compare l2 and linf errors against reference values if !isnothing($l2) || !isnothing($linf) @@ -100,7 +108,7 @@ end # Modified version of `@test_nowarn` that prints the content of `stderr` when # it is not empty and ignnores module replacements. -macro test_nowarn_mod(expr) +macro test_nowarn_mod(expr, additional_ignore_content=String[]) quote let fname = tempname() try @@ -113,14 +121,25 @@ macro test_nowarn_mod(expr) if !isempty(stderr_content) println("Content of `stderr`:\n", stderr_content) end + + # Patterns matching the following ones will be ignored. Additional patterns + # passed as arguments can also be regular expressions, so we just use the + # type `Any` for `ignore_content`. + ignore_content = Any[ + # TODO: Upstream (PlotUtils). This should be removed again once the + # deprecated stuff is fixed upstream. + "WARNING: importing deprecated binding Colors.RGB1 into PlotUtils.\n", + "WARNING: importing deprecated binding Colors.RGB4 into PlotUtils.\n", + ] + append!(ignore_content, additional_ignore_content) + for pattern in ignore_content + stderr_content = replace(stderr_content, pattern => "") + end + # We also ignore simple module redefinitions for convenience. Thus, we # check whether every line of `stderr_content` is of the form of a # module replacement warning. - # TODO: Upstream (PlotUtils). This should be removed again once the - # deprecated stuff is fixed upstream. - if stderr_content != "WARNING: importing deprecated binding Colors.RGB1 into PlotUtils.\nWARNING: importing deprecated binding Colors.RGB4 into PlotUtils.\n" - @test occursin(r"^(WARNING: replacing module .+\.\n)*$", stderr_content) - end + @test occursin(r"^(WARNING: replacing module .+\.\n)*$", stderr_content) ret finally rm(fname, force=true) From 0bb171f956ce4edb8790e2faaaaa55adcab62c16 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 22 Jul 2021 17:09:23 +0200 Subject: [PATCH 4/7] download from Downloads --- .../p4est_3d_dgsem/elixir_advection_amr_unstructured_curved.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/p4est_3d_dgsem/elixir_advection_amr_unstructured_curved.jl b/examples/p4est_3d_dgsem/elixir_advection_amr_unstructured_curved.jl index ba15914a348..ecadd1a4445 100644 --- a/examples/p4est_3d_dgsem/elixir_advection_amr_unstructured_curved.jl +++ b/examples/p4est_3d_dgsem/elixir_advection_amr_unstructured_curved.jl @@ -1,4 +1,5 @@ +using Downloads: download using OrdinaryDiffEq using Trixi From 2e505b76498ccd10d71ce2232871f2a8fc7919b8 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 22 Jul 2021 17:09:37 +0200 Subject: [PATCH 5/7] ignore maxiters warning also from Trixi --- test/test_trixi.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index e430a8bb549..e904cafa7a7 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -34,7 +34,9 @@ macro test_trixi_include(elixir, args...) # if `maxiters` is set in tests, it is usually set to a small numer to # run only a few steps - ignore possible warnings coming from that if any(==(:maxiters) ∘ first, $kwargs) - additional_ignore_content = [r"┌ Warning: Interrupted\. Larger maxiters is needed\.\n└ @ SciMLBase .+\n"] + additional_ignore_content = [ + r"┌ Warning: Interrupted\. Larger maxiters is needed\.\n└ @ SciMLBase .+\n", + r"┌ Warning: Interrupted\. Larger maxiters is needed\.\n└ @ Trixi .+\n"] else additional_ignore_content = [] end From 128401783e2cd1795e06e98042b87cdcce6a2a0a Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 22 Jul 2021 18:04:10 +0200 Subject: [PATCH 6/7] move maxiters setting from APE monopole elixir to test setup --- examples/tree_2d_dgsem/elixir_ape_monopole.jl | 2 +- test/test_examples_2d_ape.jl | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/tree_2d_dgsem/elixir_ape_monopole.jl b/examples/tree_2d_dgsem/elixir_ape_monopole.jl index 4380061a872..6b347818276 100644 --- a/examples/tree_2d_dgsem/elixir_ape_monopole.jl +++ b/examples/tree_2d_dgsem/elixir_ape_monopole.jl @@ -59,7 +59,7 @@ callbacks = CallbackSet(summary_callback, analysis_callback, save_solution, step # OrdinaryDiffEq's `solve` method evolves the solution in time and executes the passed callbacks sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false), dt=1.0, # solve needs some value here but it will be overwritten by the stepsize_callback - save_everystep=false, callback=callbacks, maxiters=50) + save_everystep=false, callback=callbacks, maxiters=10^5) # Print the timer summary summary_callback() \ No newline at end of file diff --git a/test/test_examples_2d_ape.jl b/test/test_examples_2d_ape.jl index 7ad30958343..93a1a4519ee 100644 --- a/test/test_examples_2d_ape.jl +++ b/test/test_examples_2d_ape.jl @@ -29,18 +29,19 @@ EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2 @trixi_testset "elixir_ape_gauss_wall.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_ape_gauss_wall.jl"), - l2 = [0.019419398248465843, 0.019510701017551826, 0.04818246051887614, - 7.382060834820337e-17, 0.0, 1.4764121669640674e-16, 1.4764121669640674e-16], - linf = [0.18193631937316496, 0.1877464607867628, 1.0355388011792845, - 2.220446049250313e-16, 0.0, 4.440892098500626e-16, 4.440892098500626e-16]) + l2 = [0.019419398248465843, 0.019510701017551826, 0.04818246051887614, + 7.382060834820337e-17, 0.0, 1.4764121669640674e-16, 1.4764121669640674e-16], + linf = [0.18193631937316496, 0.1877464607867628, 1.0355388011792845, + 2.220446049250313e-16, 0.0, 4.440892098500626e-16, 4.440892098500626e-16]) end @trixi_testset "elixir_ape_monopole.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_ape_monopole.jl"), - l2 = [0.006816790293009947, 0.0065068948357351625, 0.008724512056168938, - 0.0009894398191644543, 0.0, 7.144325530679576e-17, 7.144325530679576e-17], - linf = [1.000633375007386, 0.5599788929862504, 0.5738432957070382, - 0.015590137026938428, 0.0, 2.220446049250313e-16, 2.220446049250313e-16]) + l2 = [0.006816790293009947, 0.0065068948357351625, 0.008724512056168938, + 0.0009894398191644543, 0.0, 7.144325530679576e-17, 7.144325530679576e-17], + linf = [1.000633375007386, 0.5599788929862504, 0.5738432957070382, + 0.015590137026938428, 0.0, 2.220446049250313e-16, 2.220446049250313e-16], + maxiters=50) end end From 007adec0dcccb90258b7fa84fda0ab9cfcfac36f Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 23 Jul 2021 07:10:41 +0200 Subject: [PATCH 7/7] Revert "CI on Julia v1.7" This reverts commit ba41cc0703327955d91867babcf3537936bba7e1. --- .github/workflows/Documenter.yml | 2 +- .github/workflows/ci.yml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 750000a29d6..e0cb361b9bf 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 with: - version: '^1.7.0-0' + version: '1.6' show-versioninfo: true - uses: julia-actions/julia-buildpkg@v1 env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0020fb3cba5..cd7e093cb09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: fail-fast: false matrix: version: - - '^1.7.0-0' + - '1.6' # - 'nightly' os: - ubuntu-latest @@ -70,43 +70,43 @@ jobs: - paper_self_gravitating_gas_dynamics - misc include: - - version: '^1.7.0-0' + - version: '1.6' os: macOS-latest arch: x64 trixi_test: 2d_part1 - - version: '^1.7.0-0' + - version: '1.6' os: macOS-latest arch: x64 trixi_test: 2d_part2 - - version: '^1.7.0-0' + - version: '1.6' os: macOS-latest arch: x64 trixi_test: 2d_part3 - - version: '^1.7.0-0' + - version: '1.6' os: macOS-latest arch: x64 trixi_test: 2d_mpi - - version: '^1.7.0-0' + - version: '1.6' os: macOS-latest arch: x64 trixi_test: 2d_threaded - - version: '^1.7.0-0' + - version: '1.6' os: windows-latest arch: x64 trixi_test: 2d_part1 - - version: '^1.7.0-0' + - version: '1.6' os: windows-latest arch: x64 trixi_test: 2d_part2 - - version: '^1.7.0-0' + - version: '1.6' os: windows-latest arch: x64 trixi_test: 2d_part3 - - version: '^1.7.0-0' + - version: '1.6' os: windows-latest arch: x64 trixi_test: 2d_mpi - - version: '^1.7.0-0' + - version: '1.6' os: windows-latest arch: x64 trixi_test: 2d_threaded