You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a NEURON-based python program that uses various compiled .mod files to build a network.
The program is unable to run once it hits these code lines at the end of the program: h.finitialize(-65) h.continuerun(100)
At the first run of the program, the result of the execution is a segmentation fault error: Segmentation Fault: 11.
The second run of the program does not give a segmentation fault error and instead does not print anything and continues to run indefinitely until VSCode stops the program.
I have tried using the nrniv -debug command to check for any version incompatibilities or under-the-hood runtime errors. The command shows that the .mod files were compiled though an error with importing a method from multiprocessing appears.
I have attached the stacktrace below. Let me know if you would like to see the mod files or any additional code/information.
NEURON setup
Version: NEURON==8.2.6
Installation method: pip
macOS
mod files compiled using the command: nrnivmodl
The text was updated successfully, but these errors were encountered:
As far as I know, -debug is not a valid argument to nrniv. It is being treated as a HOC file and hence can't open -debug.
I'm guessing that test_nigo_pathway.py contains python code that make use of multiprocessing support. If that is the case, it is probably best to launch python test_nigo_pathway.py as it seems more likely that python multiprocessing support will work.
Thanks @nrnhines, I was able to re-compile the mod files with the nrnivmodl -coreneuron command and run the python script successfully. However, I now notice that I am unable to re-compile the mod files in a thread safe manner when adding POINTERs - see the error below:
Here is an example of how I set a POINTER in a .mod file:
TITLE Modular Ligand Class Supporting External Input
NEURON {
POINT_PROCESS GenericLigand
RANGE C_init, decay_rate, external_input
POINTER C, receptor_activation
THREADSAFE
}
For instance, I would like to access C and receptor_activation in my python code using the h.setpointer() method.
Please try again with THREADSAFE as the first statement in the NEURON block ( or at least prior to the POINTER declaration).
By the way, although you can use h.setpointer, you might prefer the, to my mind more clear,
Also, you are certainly threadsafe in all cases where you are only using one thread. But for multiple threads, it is your responsibility that the mod file be in fact thread safe.
Context
I have a NEURON-based python program that uses various compiled .mod files to build a network.
The program is unable to run once it hits these code lines at the end of the program:
h.finitialize(-65)
h.continuerun(100)
At the first run of the program, the result of the execution is a segmentation fault error: Segmentation Fault: 11.
The second run of the program does not give a segmentation fault error and instead does not print anything and continues to run indefinitely until VSCode stops the program.
I have tried using the nrniv -debug command to check for any version incompatibilities or under-the-hood runtime errors. The command shows that the .mod files were compiled though an error with importing a method from multiprocessing appears.
I have attached the stacktrace below. Let me know if you would like to see the mod files or any additional code/information.
NEURON setup
The text was updated successfully, but these errors were encountered: