Skip to content

Update to OrdinaryDiffEq.jl v7 and related SciML packages#2910

Draft
github-actions[bot] wants to merge 45 commits intomainfrom
compathelper/new_version/2026-04-02-00-09-29-812-04017954462
Draft

Update to OrdinaryDiffEq.jl v7 and related SciML packages#2910
github-actions[bot] wants to merge 45 commits intomainfrom
compathelper/new_version/2026-04-02-00-09-29-812-04017954462

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 2, 2026

This pull request changes the compat entry for the RecursiveArrayTools package from 3.37 to 3.37, 4.
This keeps the compat entries for earlier versions.

Note: I have not tested your package with this new compat entry.
It is your responsibility to make sure that your package tests pass before you merge this pull request.

Closes #2918, closes #2919, closes #2949, closes #2950, closes #2960, closes #2961, closes #2962, closes #2963, closes #2965, closes #2966, closes #2967, closes #2968, closes #2969, closes #2970, closes #2971, closes #2972, closes #2973, closes #2981, closes #2983, closes #2984.

The required changes are:

  • Replacing u_modified! by derivative_discontinuity!
  • adapting the new controller interface
  • stage limiters are not allowed anymore as positional arguments, but need to be keyword arguments
  • iterating over a VectorOfArray of SVectors now returns the underlying floating values, not the SVector, fixed by replacing u by parent(u)
  • thread is now passed as FastBroadcast.Serial()/FastBroadcast.Threaded() instead of True()/False().

@ranocha ranocha force-pushed the compathelper/new_version/2026-04-02-00-09-29-812-04017954462 branch from 5d38e62 to 4a12427 Compare April 2, 2026 00:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 69.35484% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.87%. Comparing base (9a19e15) to head (b54a42a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
ext/TrixiOrdinaryDiffEqCoreExt.jl 16.67% 15 Missing ⚠️
src/callbacks_step/save_restart_dg.jl 81.82% 2 Missing ⚠️
src/callbacks_step/summary.jl 0.00% 1 Missing ⚠️
src/callbacks_step/trivial.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2910      +/-   ##
==========================================
- Coverage   97.13%   96.87%   -0.26%     
==========================================
  Files         625      626       +1     
  Lines       48512    48542      +30     
==========================================
- Hits        47121    47025      -96     
- Misses       1391     1517     +126     
Flag Coverage Δ
unittests 96.87% <69.35%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs dependencies like SummationByPartsOperators.jl to be updated first.

@JoshuaLampert
Copy link
Copy Markdown
Member

We need jlchan/StartUpDG.jl#219 to be merged and released before.

@JoshuaLampert JoshuaLampert marked this pull request as draft April 28, 2026 23:31
JoshuaLampert and others added 2 commits April 29, 2026 17:39
Co-authored-by: Copilot <copilot@github.com>
@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented Apr 29, 2026

@termi-official we are trying to adapt to OrdinaryDiff.jl v7 etc. in a backward-compatible way if possible. Could you help with the controller changes? I ported the changes from your PR #2773 with some small changes, but

using Trixi, OrdinaryDiffEqSSPRK
trixi_include("examples/tree_2d_dgsem/elixir_advection_restart.jl", alg = SSPRK43(), base_elixir = "elixir_advection_timeintegration_adaptive.jl");

gives

[...]
ERROR: LoadError: FieldError: type OrdinaryDiffEqCore.ODEIntegrator has no field `qold`, available fields: `sol`, `u`, `du`, `k`, `t`, `dt`, `f`, `p`, `uprev`, `uprev2`, `duprev`, `tprev`, `alg`, `dtcache`, `dtchangeable`, `dtpropose`, `tdir`, `eigen_est`, `controller_cache`, `success_iter`, `iter`, `saveiter`, `saveiter_dense`, `cache`, `callback_cache`, `kshortsize`, `force_stepfail`, `last_stepfail`, `just_hit_tstop`, `next_step_tstop`, `tstop_target`, `do_error_check`, `event_last_time`, `vector_event_last_time`, `last_event_error`, `accept_step`, `isout`, `reeval_fsal`, `derivative_discontinuity`, `reinitialize`, `isdae`, `opts`, `stats`, `initializealg`, `differential_vars`, `fsalfirst`, `fsallast`, `rng`, `W`, `P`, `sqdt`, `noise`, `c`, `rate_constants`
Stacktrace:
  [1] setproperty!(x::OrdinaryDiffEqCore.ODEIntegrator{…}, f::Symbol, v::Float64)
    @ Base ./Base_compiler.jl:56
  [2] load_controller!(integrator::OrdinaryDiffEqCore.ODEIntegrator{…}, controller::OrdinaryDiffEqCore.PIControllerCache{…}, file::HDF5.File)
    @ TrixiOrdinaryDiffEqCoreExt ~/.julia/dev/Trixi/ext/TrixiOrdinaryDiffEqCoreExt.jl:33
[...]

What are the fields we need to set in the new controller interface? Edit: I think I figured it out. But is it expected that the results change slightly (with a relative difference of the order of ~1e-6), see the first point of #2910 (comment).

@termi-official
Copy link
Copy Markdown

Can you first please test if the solution is already different before storing it? The controller API change was a refactor and no observable changes should be expected. If there are any, then we need to investigate and fux these, as it essentially means I messed up copying the code around in some place.

All dynamic stuff should be contained in the cache now, so only these have to be filled during load. Have you compared the integrator state after loading it vs before saving it (as I could not find tests related to this)? Related to the observed difference here might be that for the first time step iteration is now allowed to change dt more drastically. Can you also store/load iter?

might be acceptable to copy the new values in

I probably misunderstand this one. Is the reference analytical and are you controller tolerances (atol and rtol) small enough to be close enough to the real solution in these integration tests given the test tolerances?

@JoshuaLampert
Copy link
Copy Markdown
Member

Sorry, I should have been clearer. The main changes in the result (the "first two elixirs" from point 1 in the list above) don't have anything to do with restarting, and saving/loading of the controller. What makes them different compared to almost all other tests is that we explicitly pass a PIDController to solve.
With new OrdinaryDiffEq*.jl versions:

julia> trixi_include("examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl", tspan = (0.0, 1e-7));
[...]
julia> analysis_callback(sol)
(l2 = [0.011443084580409251, 10.24145497473291, 0.0036170868356439675, 4089.506746048727], linf = [3.4543954534547026, 3142.418224193642, 7.33755561607338, 1.2527944643119895e6])

(run) pkg> st
Status `~/.julia/dev/Trixi/run/Project.toml`
  [bbf590c4] OrdinaryDiffEqCore v4.0.0
  [669c94d9] OrdinaryDiffEqSSPRK v2.0.0
  [a7f1ee26] Trixi v0.16.7-DEV `..`
Info Packages marked with ⌃ have new versions available and may be upgradable.

With old OrdinaryDiffEq*.jl versions:

julia> trixi_include("examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl", tspan = (0.0, 1e-7));
[...]
julia> analysis_callback(sol)
(l2 = [0.011443079784345214, 10.241451663574523, 0.003617158399146704, 4089.5052326255754], linf = [3.4543899636994606, 3142.4152494780465, 7.33772972834869, 1.2527931359048043e6])

julia> analysis_callback(sol).l2 .- [0.011443084580409251, 10.24145497473291, 0.0036170868356439675, 4089.506746048727]
4-element StaticArraysCore.SizedVector{4, Float64, Vector{Float64}} with indices SOneTo(4):
 -4.796064037235204e-9
 -3.3111583874756434e-6
  7.156350273658518e-8
 -0.0015134231516640284

(run_v6) pkg> st
Status `~/.julia/dev/Trixi/run_v6/Project.toml`
  [7d9f7c33] Accessors v0.1.44
⌅ [bbf590c4] OrdinaryDiffEqCore v3.33.1
⌃ [669c94d9] OrdinaryDiffEqSSPRK v1.14.0
  [a7f1ee26] Trixi v0.16.7-DEV `..`
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`

Regarding the reference values for the L2 and Linf errors we use in the tests: In our tests we compute these errors with respect to the analytical solution if available and with respect to the initial condition otherwise. In this case, there is no known analytical solution. So these are not analytical values, but come from manually validated previous runs. I.e., these are only regression tests to catch cases like this where changes, which are not expected to change the numerical result, actually do change them. However, it is not easy to say, which of the two versions gives a "more correct" solution. In this example we use default tolerances for the adaptive time stepping.

@termi-official
Copy link
Copy Markdown

I see, thanks for elaborating.

Note that the test is not really safe then, because even minor changes in the implementation, like changing some intermediate computation from 10 // 1 to 10.0 can tank the test. I am a bit puzzled that it only happens if you pass the PIDController manually. This probably means that one of the parameters is not picked up correctly anymore. Can you check if the other parameters (like qsteady_min/max) differ now?

Also, try to put qmax_first_step = 10 // 1. This is another thing that has changed, that the first time step can increase dt quite drastically.

To bisect this, the commit on master right before the controller interface update is 1dfa9ba8b248720ddd741b3d92bc76aba17235d1 and the one with update is 80097def27da339f712a28d7a7bb10d54ec5a250 . Just to confirm that this is really the interface update being faulty or something else happened.

@termi-official
Copy link
Copy Markdown

Also note that the results differ by you tolerance (about 1e-6), which tells me that the controllers are on both versions intact.

@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented Apr 30, 2026

First of all, thanks for your help!

Note that the test is not really safe then, because even minor changes in the implementation, like changing some intermediate computation from 10 // 1 to 10.0 can tank the test.

Yes, but we allow for small deviations, which come from different architectures or order of floating point operations. Whenever a version update of downstream packages exceeds this small tolerance, it is very likely due to a true change in the downstream package, which yields different numerical solutions. Even though the new version still might satisfy the tolerances and might be a valid solution, we want to first know there are changes affecting the numerical result (that's what these regression tests tell us), then understand what exactly caused this to finally approve it after validating the changes are fine (or file a bug report/fix the underlying issue if we do not approve the changes). If you say numerical results should not change at all since it is only refactoring (up to maybe floating point differences), but we still see differences (within or not within time stepping tolerances) and do not understand where they come from, we should investigate. I will do that with the hints you have given.

In addition, the jobs, where MPI gets stuck (maybe because the controllers on different ranks have a different state?) definitely need to be debugged.

Since we talked about that @ranocha, I want to note that currently, the restarted elixir gives exactly the same results as if we would have run the simulation for the complete time span:

julia> trixi_include(joinpath("examples", "tree_2d_dgsem", "elixir_advection_timeintegration_adaptive.jl"),
                     alg = SSPRK43(), tspan = (0.0, 10.0));
[...]

julia> l2_expected, linf_expected = analysis_callback(sol)
(l2 = [0.00010686315659397209], linf = [0.001133742851433972])

julia> trixi_include(joinpath("examples", "tree_2d_dgsem", "elixir_advection_restart.jl"),
                     alg = SSPRK43(), base_elixir = "elixir_advection_timeintegration_adaptive.jl");
[...]

julia> l2_actual, linf_actual = analysis_callback(sol)
(l2 = [0.00010686315659397209], linf = [0.001133742851433972])

julia> linf_expected == linf_actual
true

julia> l2_expected == l2_actual
true

So to me it looks like saving and loading of the controller is actually fine.

@vchuravy
Copy link
Copy Markdown
Member

Looking at the MPI situations,

it looks like we have a barrier mismatch together with t8code.

One process is in:

0x00007f86b1cafa73 in MPIDI_CH3I_Progress () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
(gdb) bt
#0  0x00007f86b1cafa73 in MPIDI_CH3I_Progress ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#1  0x00007f86b1bfe208 in MPIR_Wait_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#2  0x00007f86b1bfe2c5 in MPIR_Wait () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#3  0x00007f86b1bb48ee in MPIC_Wait () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#4  0x00007f86b1bb5151 in MPIC_Sendrecv () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#5  0x00007f86b1b2e762 in MPIR_Barrier_intra_dissemination ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#6  0x00007f86b1b2eb5e in MPIR_Barrier_intra_k_dissemination ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#7  0x00007f86b1b97245 in MPIR_Barrier_allcomm_auto ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#8  0x00007f86b1b97302 in MPIR_Barrier_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#9  0x00007f86b1b2ec5c in MPIR_Barrier_intra_smp ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#10 0x00007f86b1b97232 in MPIR_Barrier_allcomm_auto ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#11 0x00007f86b1b97302 in MPIR_Barrier_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#12 0x00007f86b1ca72f9 in MPID_Win_free () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#13 0x00007f86b1b027c1 in PMPI_Win_free () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#14 0x00007f86b58a6920 in sc_shmem_free () from /home/vchuravy/.julia/artifacts/c4e4aead2400d536f3c56b0e7750d09c9bc9036d/lib/libsc.so.2.0.0
#15 0x00007f86b55b0baa in t8_shmem_array_destroy ()
   from /home/vchuravy/.julia/artifacts/c4e4aead2400d536f3c56b0e7750d09c9bc9036d/lib/libt8.so
#16 0x00007f86b55b952c in t8_forest_unref () from /home/vchuravy/.julia/artifacts/c4e4aead2400d536f3c56b0e7750d09c9bc9036d/lib/libt8.so
#17 0x00007f867a082365 in ?? ()
#18 0x0000000000000001 in ?? ()
#19 0x00007f86a7063280 in jl_system_image_data () from /home/vchuravy/.julia/compiled/v1.10/T8code/wl1mR_TTa3p.so
#20 0x0000000075362f00 in ?? ()
#21 0x0000000000007f97 in ?? ()
#22 0x0000000000000008 in ?? ()
#23 0x000000007dc5e750 in ?? ()
#24 0x0000000000000000 in ?? ()

The other two processes are in:

0x00007fae3a0af9e4 in MPIDI_CH3I_Progress () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
(gdb) bt
#0  0x00007fae3a0af9e4 in MPIDI_CH3I_Progress ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#1  0x00007fae39ffe208 in MPIR_Wait_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#2  0x00007fae39ffe2c5 in MPIR_Wait () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#3  0x00007fae39fb48ee in MPIC_Wait () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#4  0x00007fae39fb5151 in MPIC_Sendrecv () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#5  0x00007fae39f2e762 in MPIR_Barrier_intra_dissemination ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#6  0x00007fae39f2eb5e in MPIR_Barrier_intra_k_dissemination ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#7  0x00007fae39f97245 in MPIR_Barrier_allcomm_auto ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#8  0x00007fae39f97302 in MPIR_Barrier_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#9  0x00007fae39f2ec5c in MPIR_Barrier_intra_smp ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#10 0x00007fae39f97232 in MPIR_Barrier_allcomm_auto ()
   from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#11 0x00007fae39f97302 in MPIR_Barrier_impl () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#12 0x00007fae39e4e728 in PMPI_Barrier () from /home/vchuravy/.julia/artifacts/117d9048128625bb3418b0b4cca48739c5d28740/lib/libmpi.so
#13 0x00007faec58a4172 in ?? ()
#14 0x00007ffc438da8c0 in ?? ()
#15 0x00007faec5a583a7 in jfptr_joinpath_76553 () from /home/vchuravy/.julia/juliaup/julia-1.10.11+0.x64.linux.gnu/lib/julia/sys.so
#16 0x00007faec58a425a in ?? ()
#17 0x00007fae28612020 in ?? ()
#18 0x00007ffc438daab8 in ?? ()
#19 0x00007ffc438daa90 in ?? ()
#20 0x00007faedcc470ce in _jl_invoke (world=<optimized out>, mfunc=0x7fae39e4e570 <PMPI_Barrier>, nargs=32764, args=0x7fae1c4565e0, 
    F=0x7faedcc39948 <jl_inst_arg_tuple_type+56>) at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2897
#21 ijl_apply_generic (F=<optimized out>, args=0x7fae1c4565e0, nargs=<optimized out>)

The backtraces are lacking Julia details.

@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented Apr 30, 2026

Can you check if the other parameters (like qsteady_min/max) differ now?

Yes, that was it. On the old OrdinaryDiffEq.jl version, the default for qsteady_max (saved in integrator.opts.qsteady_max) seems to have been 1.0 while on OrdinaryDiffEqCore.jl v4 (saved in integrator.controller_cache.controller.qsteady_max) it is 1.2. After resetting it to 1.0 again in v4, I get exactly the same errors on both versions. So the change of default value is the cause of the difference here. I didn't see that mentioned in the release notes. Would have saved me quite some time. Thanks for the hint @termi-official! Can you explain the change of the default value? If the new value is better for some reasons, I think adjusting the reference values is fine. Otherwise we could explicitly pass qsteady_max = 1.0 to the PIDController again.

Edit: Ah, digging a bit deeper I see there is OrdinaryDiffEqCore.qsteady_max_default, which is 1 for SSPRK43 in both versions. So it looks like it's better to pick 1 instead of 1.2. It is a bit unfortunate that the default value is not picked up, when explicitly constructing and passing the controller to solve because when constructing the controller it does not know about, which algorithm we use.

@termi-official
Copy link
Copy Markdown

If you say numerical results should not change at all since it is only refactoring (up to maybe floating point differences), but we still see differences (within or not within time stepping tolerances) and do not understand where they come from, we should investigate.

Please note that I can only speak for the controller refactoring here. The v7 update has a lot more changes and fixes.

On the old OrdinaryDiffEq.jl version, the default for qsteady_max (saved in integrator.opts.qsteady_max) seems to have been 1.0 while on OrdinaryDiffEqCore.jl v4 (saved in integrator.controller_cache.controller.qsteady_max) it is 1.2. [...] Can you explain the change of the default value?

I had to decide for either 1 or 1.2 (see https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/alg_utils.jl#L468) and arbitrarily picked the 1.2 to have some play in the controller. If you have some suggestion how that part of the decision process for the parameters should be incorporated, then lets discuss. I guess the only sane way to recover the v6 behavior is to use this constructor instead: https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl#L574

@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented Apr 30, 2026

I had to decide for either 1 or 1.2 (see https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/alg_utils.jl#L468) and arbitrarily picked the 1.2 to have some play in the controller.

As far as I can tell this is the line where we are hitting the 1.2.

If you have some suggestion how that part of the decision process for the parameters should be incorporated, then lets discuss. I guess the only sane way to recover the v6 behavior is to use this constructor instead: https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl#L574

Looks like we cannot pass different values for the betas as we do in

controller = PIDController(0.55, -0.27, 0.05),

@JoshuaLampert
Copy link
Copy Markdown
Member

I am fine with passing qsteady_max explicitly and getting it from OrdinaryDiffEqCore.qsteady_max_default if others agree. It could only be noted in the release notes that the change in the controller interface can have the consequence of different default values (but that is up to @ChrisRackauckas to decide; I won't create a PR to add that).
Now only the MPI issue has to be addressed.

@termi-official
Copy link
Copy Markdown

termi-official commented Apr 30, 2026

I had to decide for either 1 or 1.2 (see https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/alg_utils.jl#L468) and arbitrarily picked the 1.2 to have some play in the controller.

As far as I can tell this is the line where we are hitting the 1.2.

Yes, but since we do not have the alg in that call we cannot pull the dynamic value.

If you have some suggestion how that part of the decision process for the parameters should be incorporated, then lets discuss. I guess the only sane way to recover the v6 behavior is to use this constructor instead: https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl#L574

Looks like we cannot pass different values for the betas as we do in

controller = PIDController(0.55, -0.27, 0.05),

PIDController(Float64, alg, beta = (1.0, 0.0, 0.0)) should work here.

@JoshuaLampert
Copy link
Copy Markdown
Member

PIDController(Float64, alg, beta = (1.0, 0.0, 0.0)) should work here.

Ah, true. I misread that. Thanks!

@JoshuaLampert
Copy link
Copy Markdown
Member

@vchuravy, what did you run to debug the MPI issues? When I execute example/tree_2d_dgsem/elixir_advection_basic.jl or examples/tree_2d_dgsem/elixir_advection_restart.jl locally on Ubuntu with MPI it works just fine. From the CI logs it also looks like the tests get already stuck when trying to run the first elixir, which is example/tree_2d_dgsem/elixir_advection_basic.jl.

@ChrisRackauckas
Copy link
Copy Markdown

could only be noted in the release notes that the change in the controller interface can have the consequence of different default values (but that is up to @ChrisRackauckas to decide; I won't create a PR to add that).

@ChrisRackauckas
Copy link
Copy Markdown

They shouldn't change the default values? What's a case where the default is changed?

@termi-official
Copy link
Copy Markdown

They shouldn't change the default values? What's a case where the default is changed?

E.g. in this constructor https://github.com/SciML/OrdinaryDiffEq.jl/blob/cc0a47bb3418e4f4ce7ff875c4a05c88853fc167/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl#L559 we do not have access to the algorithm and hence for some algorithms the default changes. We could default here to nothing and reresolve the missing pieces in a second step inside init.

@ChrisRackauckas
Copy link
Copy Markdown

It should default to nothing since those values are algorithm-dependent.

@termi-official
Copy link
Copy Markdown

So the new getters in SciML/OrdinaryDiffEq.jl#3570 should resolve these or the cache setup step?

@ChrisRackauckas
Copy link
Copy Markdown

Yes, that would be the direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants