-
Notifications
You must be signed in to change notification settings - Fork 15
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
Invalid sparse method #801
Comments
For sure that is not unintentional. I can see in the code:
and
Nonlinear systems are meant to be solved with the derivimplicit method. There is a check that is actually the case and we throw an error because we selected the sparse method. Now, I do not know how it works in mod2c. I suspect there is a check under-the-hood and it does actually use a derivimplicit method without telling you (or maybe gives just a warning). Otherwise it could just compute some stuff as if it were linear with a 0 approximation. Quick stuff that you can check:
If they are all the same (numerically equal) there is a good chance that mod2c is correcting the method under-the-hood. I would like to find more documentation on the sparse method (because it is some time and I forgot what it does exactly). However, I cannot find it. Do you know where I can look? @alkino |
As by @alkino comment: when I replace
With |
Line 296 is the ond of the file. It does not make much sense to me |
The
The nrn_state function calls
with
The function that does the steering is |
So, if I understand correctly, the sparse method uses a newton iteration linearizing the non-linear problem right? In that case the nonlinear solver (it uses the newton method) should be used in nmodl not the linear one. I still do not remember why we decided to have the sparse solver with the linear system solver... |
@cattabiani Correct for the first. And yes, if you fallback to the classic mod2c solver then it should be with arg linmod=0. |
I turn the second question to @iomaganaris since pramod is on vacation (and will remain on vacation for a while) |
I created a small example with a function pointer being used in an OpenACC region and it seems like this is still the case |
* Use non linear newton solver for sparse method It is possible to give non linear system to sparse solver. The sparse method was mistaken using linear solver, now use deriv implicit. Fix #801
In this mod file: https://github.com/BlueBrain/nmodldb/blob/downloader/models/db/modeldb/239421/mod/cdp5.mod
We try to solve with the
sparse
method with the sympy solver but:And so, next the NeuronSolver but,
sparse
method is not yet supported with it in nmodl.The text was updated successfully, but these errors were encountered: