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

Simplecell model: error when making simulator object #396

Closed
naoch opened this issue May 10, 2022 · 6 comments
Closed

Simplecell model: error when making simulator object #396

naoch opened this issue May 10, 2022 · 6 comments

Comments

@naoch
Copy link

naoch commented May 10, 2022

Hello,
I try to run Simple cell model example by typing the code exactly as it is.
When I run following line;
nrn = ephys.simulators.NrnSimulator()
it gives me an error;
dlopen(/Users/naoch/opt/anaconda3/lib/python3.8/site-packages/neuron/hoc.cpython-38-darwin.so, 0x0006): symbol not found in flat namespace '_modl_reg'

When I searched the error message, I found following StackOverflow thread;
https://stackoverflow.com/questions/35006614/what-does-symbol-not-found-expected-in-flat-namespace-actually-mean
According to the answer, it appears a problem of mixing objects compiled with two different c++ compilers.
Is this correct?
How can I solve the issue? (help...)

My environment is Mac OS 12.3.1, Python 3.8.13, Anaconda 2.1.4, NEURON 7.8.2, BluePyOpt 1.12.7.
In this environment, using Spider 5.1.5 as IDE, NEURON simulation system itself works without any problems (so far).
I import bluepyopt, as described in notebook, and code does not give any error before this particular line, and all objects generated by the code before the line appeared to be made properly.

Thank you in advance.

@DrTaDa
Copy link
Contributor

DrTaDa commented May 10, 2022

Hello @naoch,

That does not seem to be an error with BluePyOpt, did you check that NEURON works in python outside of BluePyOpt? For example, you can try to re-create the simplecell outside of BluePyOpt.

Also, out of curiosity, are you on M1 or intel CPU ?

@naoch
Copy link
Author

naoch commented May 10, 2022

Hi DrTaDa,

Thank you for a quick reply!
I should have thought of trying NEURON without BluPyOpt...
I tried.
I made just a very simple cell (soma diameter 10 µm) and set the same parameters as the Simpelcell model. It worked. However, if I import morphology from simple.swc, I got error when inserting hh mechanisms.

My Mac has M1 CPU.
Since different CPU may affect (?), I tried on another Mac with intel CPU (i5), Mac OS 10.15 (Catalina). Versions of Python, NEURON etc. are the same as the M1 CPU one.
Now I can make simulator object, but when running simulation, I got similar error as issue #394.

I thought updating NEURON to the latest 8.1a may solve the issue, but some problems happened and I could not update, yet. I will try to figure out, and update what happens...

Meantime, I just want to update so far, and thank you for your reply!

@DrTaDa
Copy link
Contributor

DrTaDa commented May 11, 2022

I see. What kind of error did you get when importing the morphology ?

In any case, I recommend you to open an issue on the NEURON github page (https://github.com/neuronsimulator/nrn/issues), they are more knowledgeable than I am about NEURON internals.

@naoch
Copy link
Author

naoch commented May 11, 2022

I updated to NEURON 8.0 (I don't know why 'pip3 install neuron' did not install 8.1).
Now I got the same situation as i5 CPU; making simulator object is fine, but running simulation gives the same error as issue #394.

By the way, if I do everything on NEURON GUI (importing simple.swc, and using Cell Builder and Point of Process), it works fine. So, I think problems on importing swc file with Python is my wrong code. Morphology swc file is fine. Also, this suggests NEURON itself is fine.

I wonder even if this simulation does not work, using BluePyOpt itself should not be a problem, am I correct? In real project, I will obtain membrane parameters from actual recorded traces, so this simulation is not required, I think.
I just wanted to learn how to use BluePyOpt step-by-step...

Thank you again for your time!

@DrTaDa
Copy link
Contributor

DrTaDa commented May 12, 2022

Indeed, if the code to import the simple.swc doesn't work with pure NEURON, it means there shouldn't be anything wrong with BluePyOpt.

Let me know if you find what was wrong.

@naoch
Copy link
Author

naoch commented May 16, 2022

Thank you, DrTaDa.
Since this appears not a problem of BluePyOpt, I'd like to close the thread.

@naoch naoch closed this as completed May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants