From af684ca247a61f92a580b99e906dc408da63f718 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 21 Nov 2024 20:26:39 -0500 Subject: [PATCH] Add debug info --- .buildkite/pipeline.yml | 4 +++- docs/src/dev/compute_convergence.jl | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 292109872..f2e85cfb1 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -276,7 +276,9 @@ steps: - label: "Summarize convergence" command: "julia --color=yes --check-bounds=yes --project=.buildkite docs/src/dev/summarize_convergence.jl" - artifact_paths: "output/*" + artifact_paths: + - "output/*" + - "output/convergence_failure/*" depends_on: alg_convergence - label: "Summarize limiter analysis" diff --git a/docs/src/dev/compute_convergence.jl b/docs/src/dev/compute_convergence.jl index c009d095d..bed6843c5 100644 --- a/docs/src/dev/compute_convergence.jl +++ b/docs/src/dev/compute_convergence.jl @@ -169,7 +169,9 @@ function compute_convergence!( float_str(x) = @sprintf "%.4f" x pow_str(x) = "10^{$(@sprintf "%.1f" log10(x))}" function si_str(x) - x in (0, Inf, -Inf, NaN) && return string(x) + if isnan(x) || x in (0, Inf, -Inf) + return string(x) + end exponent = floor(Int, log10(x)) mantissa = x / 10.0^exponent return "$(float_str(mantissa)) \\times 10^{$exponent}" @@ -266,6 +268,19 @@ function compute_convergence!( callback = scb_cur_avg_sol_and_err, ) if any(isnan, plot2_values) + @show test_name + @show default_dt + @show count(isnan, plot2_values.u[end]) + @show length(plot2_values.u[end]) + @show count(isnan, plot2_values.u[1]) + @show length(plot2_values.u[1]) + out_path = joinpath("output", "convergence_failure") + mkpath(out_path) + fname(i) = "$(key1)_$(key2)_step_$(i).png" + for (i, u) in enumerate(plot2_values.u) + @show extrema(u.u) + Plots.png(Plots.plot(u.u), joinpath(out_path, fname(i))) + end error("NaN found in plot2_values in problem $(test_name)") end out_dict[key1][key2]["plot2_values"] = plot2_values