Skip to content
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

[question] Syntax for recording voltage with CoreNEURON #718

Open
pramodk opened this issue Aug 18, 2020 · 3 comments
Open

[question] Syntax for recording voltage with CoreNEURON #718

pramodk opened this issue Aug 18, 2020 · 3 comments

Comments

@pramodk
Copy link
Member

pramodk commented Aug 18, 2020

Hello @nrnhines,

I asked this few weeks ago but I don't have this documented:

Some of the examples from BBP's NMC portal use following syntax to record voltage:

    recordings['soma(0.5)'].record(cell.soma[0](0.5)._ref_v, sec = cell.soma[0])

When we run this via CoreNEURON then nothing is recorded. I vaguely remember we were saying there is an issue with the syntax of sec = cell.soma[0] ?

@nrnhines
Copy link
Member

With the current NEURON implementation, Vector.record makes no use of the currently accessed section. (i.e sec = cell.soma[0] has no effect). Bizarrely, if context to find the pointer is needed, a POINT_PROCESS first arg located in the desired cell must be used. (Probably because it was easier to find the thread and, if needed, the cvode instance.)

So I think the diagnostic question becomes, at the time that CoreNEURON calls back into NEURON to nrnthread_get_trajectory_requests, is the PlayRecored.ith_ thread id field set properly on the NEURON side. By the way, is this a model with multiple threads?

@ramcdougal
Copy link
Member

An alternative strategy would be to modify the _ref objects to embed Section information to allow determining the thread later. They already use several times the memory of a double*, and I think they might even have unused space for a second pointer... that way, we can eliminate any explicit thread identification in NEURON simulations.

@nrnhines
Copy link
Member

modify the _ref objects to embed Section information

I very much like that idea in principle. Unfortunately , some _ref are not naturally associated with Sections. Eg. t or other hoc variables. And maybe it is the case that after a _ref is created the thing it points to gets moved to another section. Also in this specific case, the problem is not that the section is not known, it is that the thread is not known (though with not too much difficulty it could be found ( just search through the tree for a point process (assuming one exists) or search the threads for a node in the section)). Also it is not clear in this case, precisely the diagnosis of the issue. If there is only one thread it should have worked as in that case there was no error message.

olupton pushed a commit that referenced this issue Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants