Skip to content

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

Merged
ranocha merged 77 commits into
mainfrom
compathelper/new_version/2026-04-02-00-09-29-812-04017954462
May 21, 2026
Merged

Update to OrdinaryDiffEq.jl v7 and related SciML packages#2910
ranocha merged 77 commits into
mainfrom
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.

Also closes #2938 and closes #2941.

The required changes, which keep backwards compatibility with older versions from the SciML ecosystem are:

Note that I used Claude to help me with refactoring some parts, but I reviewed the code and adapted it.

@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 48.14815% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.04%. Comparing base (bc1048b) to head (7a7d2d8).

Files with missing lines Patch % Lines
ext/TrixiOrdinaryDiffEqCoreExt.jl 33.33% 24 Missing ⚠️
src/callbacks_step/save_restart.jl 63.64% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2910      +/-   ##
==========================================
- Coverage   97.09%   97.04%   -0.05%     
==========================================
  Files         630      631       +1     
  Lines       48855    48898      +43     
==========================================
+ Hits        47435    47450      +15     
- Misses       1420     1448      +28     
Flag Coverage Δ
unittests 97.04% <48.15%> (-0.05%) ⬇️

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
@ChrisRackauckas
Copy link
Copy Markdown

I think I missed a bit of this, but good to see tests passing. From what I'm gathering, you're asking for an IO API? It would be good for ya'll to start it because you know your needs.

https://docs.sciml.ai/DiffEqDocs/stable/features/io/ is pretty much all we got, but I want to do more because large disk-based adjoints will need it anyways.

But, it's hard to know what exactly is needed here so please share your internal APIs and such as starting points.

@termi-official
Copy link
Copy Markdown

termi-official commented May 21, 2026

hard to know what exactly is needed here [...]

The TLDR is that we want to store/load the integrators for very long running tasks.

Will write up more details in a separate thread.

@vchuravy vchuravy requested review from termi-official and removed request for termi-official and vchuravy May 21, 2026 08:49
JoshuaLampert
JoshuaLampert previously approved these changes May 21, 2026
Comment thread src/callbacks_step/save_solution_dg.jl
ranocha
ranocha previously approved these changes May 21, 2026
@ranocha
Copy link
Copy Markdown
Member

ranocha commented May 21, 2026

Thanks a lot, @JoshuaLampert and everybody involved in making this possible!

@ranocha ranocha enabled auto-merge (squash) May 21, 2026 09:06
@ranocha ranocha disabled auto-merge May 21, 2026 09:17
@ranocha
Copy link
Copy Markdown
Member

ranocha commented May 21, 2026

Did something change in StructArrays.jl?

https://github.com/trixi-framework/Trixi.jl/actions/runs/26215678791/job/77137297189?pr=2910#step:7:12470

@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented May 21, 2026

Did something change in StructArrays.jl?

trixi-framework/Trixi.jl/actions/runs/26215678791/job/77137297189?pr=2910#step:7:12470

There hasn't been a new release from StructArrays.jl recently. The errors looks like they come from #2956. I guess, the changes from there need to be adapted to v4 of RecursiveArrayTools.jl. I'll take a closer look.

@ranocha
Copy link
Copy Markdown
Member

ranocha commented May 21, 2026

Great, thanks a lot! And sorry for merging the other PR first so that you have even more work...

@JoshuaLampert JoshuaLampert dismissed stale reviews from ranocha and themself via 0a26d4b May 21, 2026 09:41
@JoshuaLampert
Copy link
Copy Markdown
Member

JoshuaLampert commented May 21, 2026

I think 0a26d4b should be the correct fix for this, but can you double-check this makes sense? This fixes the issue locally for me, is consistent with the wrap_array overload for DGMulti, and returns a plain array (in contrast to the VectorOfArray from before) as it should:

# Like `wrap_array`, but guarantees to return a plain `Array`, which can be better

Before, it fell back to use
wrap_array_native(u_ode, mesh::DGMultiMesh, equations, dg::DGMulti, cache) = u_ode
.

@JoshuaLampert
Copy link
Copy Markdown
Member

Unfortunately, this is breaking for TrixiAtmo.jl...

@JoshuaLampert
Copy link
Copy Markdown
Member

To make this PR simpler and not breaking, I reverted the changes to wrap_array_native for DGMulti from before and only patched compute_kinetic_energy_spectrum to be compatible with RecursiveArrayTools.jl v4. However, as far as I understand, it would be cleaner if wrap_array_native returns the underlying StructArray instead of the wrapped VectorOfArray around that. If this is something we want, we can do that in another (breaking) PR though.

@JoshuaLampert
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@ranocha ranocha merged commit c24cb28 into main May 21, 2026
91 of 95 checks passed
@ranocha ranocha deleted the compathelper/new_version/2026-04-02-00-09-29-812-04017954462 branch May 21, 2026 13:33
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.

7 participants