-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GG causes internal StackOverflow with ModelingToolkit #45
Comments
Hello, would you mind using files to share the full trace with me? I have to detect the GG related issues and bugs and report them to the language devs. |
Thanks @jd-lara , and I'm sorry that you did suffer a lot from the extremely long trace... |
I made some optimizations to avoid drastic AST -> Type conversions. |
still unsolved yet.. |
This particular case can be solved by just not generating all the 0s. We should be able to solve this downstream. julia> symjac = MTK.calculate_jacobian(_nl_system);
julia> J = sparse(Float64.(isequal.(symjac, 0)));
julia> jac = MTK.generate_jacobian(_nl_system, expression = Val{false}, sparse = true)[2]
julia> param_eval = (out, params) -> jac(out, u0, params);
julia> param_eval(J, parameter_values)
julia> J
18×18 SparseMatrixCSC{Float64,Int64} with 228 stored entries:
[1 , 1] = -377.153
[6 , 1] = -8243.38
[10, 1] = 443.061
[14, 1] = 1884.96
[15, 1] = 18.0398
[16, 1] = 3.59156
[17, 1] = -1.0
... |
@YingboMa yeah that makes sense, it will force us to allocate the Jacobian matrix again to calculate the eigenvalues though.... but I guess it isn't that bad of a solution. |
MWE causes error below.
This is the error
I had to cut the bulk of the StackOverFlow stack trace since Github as a limit in the number of Characters.
cc @ChrisRackauckas
The text was updated successfully, but these errors were encountered: