- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 79
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
sparse Jacobians fail with Julia 1.7 beta3 #315
Comments
JuliaLang/julia#40523 I guess might be that? It might be related to the 1-based indexing correction we do? https://github.com/SciML/Sundials.jl/blob/master/src/types_and_consts_additions.jl#L48-L53 that's all of the code involved in the process in case you have any ideas. |
OK, that was it. Proximate cause was that the sparse SUNMatrix isn't fully initialised (?). More fundamental problem is that I've created a PR that replaces the problematic Base.convert with a Base.copyto! |
…ix) with copyto! Fix for #315 Proximate cause was that the SUNMatrix sparse Jacobian was not fully initialised, hence failed the SparseMatrixCSC consistency checks introduces with Julia 1.7 More fundamentally, given that Sundials uses zero-based index arrays, convert(::Type{SparseArrays.SparseMatrixCSC}, J::SUNMatrix) would either need to allocate, or is inherently unsafe as an in-place version that applied a 1-based index conversion would create an invalid SUNMatrix. Also the convert code here looks like it modified colptr but not rowptr, so couldn't have worked anyway... (cvodejac and similar used to overwrite this, which is why those calls worked).
Thanks! Should all be good on latest patches now. |
Confirm looks good with v4.5.2. Thank you! |
Visible as a Sundials.jl package test failure:
Looks like this might just be that the initial sparse Jacobian construction fails the new SparseMatrixCSC consistency checks introduced in Julia 1.7 ?
The text was updated successfully, but these errors were encountered: