-
Notifications
You must be signed in to change notification settings - Fork 119
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
Problem with datahandle #2457
Comments
A large proportion of the issue (
That is, all the cases where In this case, commenting out the assert suffices for correct plotting. @1uc @olupton In a more fundamental sense, I don't understand why
so that it returns a data_handle instead of a double*? Presumably |
I don't know the answer, but what you're suggesting makes sense. I'll make time tomorrow to look into this. One comment: when reading through the SoA, I saw that it has the ability to "upgrade" a raw pointer to a proper
while the other doesn't:
See (respectively): nrn/src/neuron/container/data_handle.hpp Line 74 in 5ea534f
nrn/src/neuron/container/data_handle.hpp Line 91 in 5ea534f
|
Here's what's strange: The code expects a raw-pointer (wrapped as a I found the following method: nrn/src/neuron/container/data_handle.hpp Lines 94 to 116 in 5ea534f
which would suggest we remove the
I've created a PR (#2463) with the proposed change. Locally it passed the reproduction steps outlined above. (By virtue of removing the For raw pointers I think this changes nothing. For "modern" |
I was writing this when your previous comment arrived. This now is more or less obsolete, but I think it is still worth adding to the discussion. It was clear, but it's becoming even more clear, that one cannot satisfyingly develop NEURON without a fairly deep clarity about everything SoA and data handle in nrn/src/neuron. That seems to be the case here. I.e. the code DOES upgrade the pointer to a modern data handle via A similar situation has arisen with my work on #2460. In this case, the mod file holds a static pointer to a |
They look like they're the same thing. Your comment is useful, because it tells me things we need to check. I think we need to check how:
Regarding the logic of the loop:
what is this loop over? When we're dealing with a scalar RANGE variable is |
I agree. That seems like the correct fix to this problem. Or at least one step closer to being a complete solution. If it works for all RANGE, and Vector, I think we can declare success for this issue. I'll do some (I think it has to be manual) testing. |
The SymbolChooser has a special string for array variables. One can see an example with
In this case the array dimension comes from https://github.com/neuronsimulator/nrn/blob/master/share/demo/release/cabpump.mod in the lines
and
And if you look at a |
Thank you. I think now I understand. |
I'll close because this should have been fixed by #2463. |
8.2.2 works with following but not master. Latter generates
This is a general problem with Python or HOC sections. A simple way to reproduce is
The text was updated successfully, but these errors were encountered: