-
-
Notifications
You must be signed in to change notification settings - Fork 245
Description
Describe the example
Using MTK to generate DEProblems results in massive parametric types that render debugging impossible, and occasionally force me to Ctrl+C if printing takes too long.
Minimal Reproducible Example 👇
I did not include one, apologies. But any realistic model I create in, say, Catalyst, results in this.
Error & Stacktrace
MTK results in extremely complicated ODEProblem types. This is unavoidable, but Julia printing these causes issues
- in error messages (call stacks become too large for my terminal)
- if I accidentally evaluate an expression that returns a problem (such as an assignment) without a trailing ';'
I've had occasions where it took so long for Julia to print these types that I had to kill the whole process.
Is there any option to force Julia to abbreviate type names (I vaguely remember this being discussed somewhere, but my v1.12 does not seem to have this), or to overload display for MTK-generated problems?
Not Working Environment (please complete the following information):
- Output of
using Pkg; Pkg.status()
julia> Pkg.status()
...
[479239e8] Catalyst v15.0.11
[0c42c343] ModelingToolkit v9.84.0
[31c24e10] Distributions v0.25.123
[43230ef6] OrdinaryDiffEqRosenbrock v1.23.0
...julia> versioninfo()
Julia Version 1.12.2
...Additional context
This is MTK v9, since I am using Catalyst. Apologies if this was fixed in 10, but I couldn't find any related issue in the tracker. I think this is a MTK issue, but I'm happy to move this problem to Catalyst if necessary.