Search found 1686 matches

by hines
Tue Apr 09, 2024 6:10 pm
Forum: NEURON + Python
Topic: Python Code Continues Execution Despite HOC Error
Replies: 4
Views: 102

Re: Python Code Continues Execution Despite HOC Error

when an error occurs in the HOC code during a simulation executed from Python, the execution should halt That is what is supposed to happen. Sorry, h('hoc code') does not raise an exception on a hoc error, it returns 0 on failure and 1 on success. It's behavior is similar to https://nrn.readthedocs...
by hines
Wed Apr 03, 2024 10:34 am
Forum: Other questions
Topic: Show Diameter
Replies: 6
Views: 186

Re: Show Diameter

Your example code above worked for me (after prefixing "from neuron import h"). The show diameter feature for pyplot is only available in version 9. For mac, linux you can pip install NEURON-nightly For windows the latest master build is (see the first master label at https://github.com/ne...
by hines
Wed Apr 03, 2024 8:20 am
Forum: Other questions
Topic: Show Diameter
Replies: 6
Views: 186

Re: Show Diameter

After looking around a bit in the github history for nrn, my first impression is that show diameter is supposed to work with plotly. I.e. https://github.com/neuronsimulator/nrn/pull/2404 at the end of June 2023 with the same mode call as works for InterViews GUI PlotShape. After some experimenting, ...
by hines
Tue Apr 02, 2024 11:49 am
Forum: NEURON + Python
Topic: Python Code Continues Execution Despite HOC Error
Replies: 4
Views: 102

Re: Python Code Continues Execution Despite HOC Error

when an error occurs in the HOC code during a simulation executed from Python, the execution should halt That is what is supposed to happen. What kind of computer are you using and what is the NEURON version. A short example would be helpful. E.g. from neuron import h h(''' proc test() { print 1/0 ...
by hines
Tue Apr 02, 2024 11:38 am
Forum: Other questions
Topic: Show Diameter
Replies: 6
Views: 186

Re: Show Diameter

ps.show(1) At least for the classical InterViews nrn gui, the diameter is shown when the arg to show is 0. (as specified in https://nrn.readthedocs.io/en/8.2.3/python/visualization/shape.html#Shape.show ) Often times, the neurites ar so slender compared to length, it is not easy to see the diameter...
by hines
Thu Feb 22, 2024 9:35 am
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

A terminal window does open but does not offer a prompt for commands: The launch mechanism dates back to Macos 9. I never learned xcode sufficiently to bring it into the 21st century. Anyway, double clicking on nrngui.app after a few intermediate steps ultimately starts a terminal window that execu...
by hines
Thu Feb 22, 2024 6:44 am
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

That's great progress. Sadly, I don't know how to diagnose issues at the DISPLAY level of XQuartz so am at a loss as to how to extend the working behavior to launching by double clicking the app icons. When the app icon is launched, does a terminal window pop up? And is the value of DISPLAY in that ...
by hines
Tue Feb 20, 2024 4:54 pm
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

Yes. The graphics work when nrngui is launched from an xterm. (the xterm was launched from a terminal window)
by hines
Tue Feb 20, 2024 1:42 pm
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

After installing Sonoma, neurondemo started from a terminal and the graphics works. I do see the <stdin>:149: SyntaxWarning: invalid escape sequence '\.' <stdin>:197: SyntaxWarning: invalid escape sequence '\.' oc> and will try to trace that down. But it does not seem related to the GUI issue. In my...
by hines
Tue Feb 20, 2024 12:46 pm
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

I have an Apple M1 Ventura 13.6, xquartz 2.8.5, and a bunch of pythons including python-3.12.2. I'll upgrade to Sonoma 14.3.1 and see what happens.
by hines
Tue Feb 20, 2024 11:37 am
Forum: OS X
Topic: can't open DISPLAY
Replies: 14
Views: 1424

Re: can't open DISPLAY

I just uploaded a mac pkg file at https://github.com/neuronsimulator/nrn/releases/tag/8.2.4 It is called nrn-8.2.4-12-g64efe0a14-macosx-10.9-universal2-py-38-39-310-311-312.pkg Please try that and let me know if it is not fully functional I think we are in the middle of fixing a newest xquartz/pytho...
by hines
Tue Feb 13, 2024 5:51 pm
Forum: Parallel NEURON
Topic: Calling MPI_Abort() from HOC
Replies: 5
Views: 14961

Re: Calling MPI_Abort() from HOC

You didn't mention how you launched the program. I'm guessing that you are running a NEURON version that dynamically loads mpi when you give it the -mpi arg. Otherwise the memory for nrnmpi_abort is NULL (hence the seg fault). Do you have a problem if you try mpiexec -n 1 nrniv -mpi -c 'mpiabort(-1)'
by hines
Wed Jan 03, 2024 1:06 pm
Forum: Parallel NEURON
Topic: Calling MPI_Abort() from HOC
Replies: 5
Views: 14961

Re: Calling MPI_Abort() from HOC

Try

Code: Select all

NEURON {SUFFIX nothing}

VERBATIM
extern void nrnmpi_abort(int);        
ENDVERBATIM

PROCEDURE mpiabort(errcode) {
VERBATIM
  {
    nrnmpi_abort((int)_lerrcode);  
  }
ENDVERBATIM
}
by hines
Fri Dec 15, 2023 1:36 pm
Forum: Parallel NEURON
Topic: Calling MPI_Abort() from HOC
Replies: 5
Views: 14961

Re: Calling MPI_Abort() from HOC

The internal wrapper for MPI_Abort is not exposed to the interpreter. You can do that with a mod file $ cat abrt.mod NEURON {SUFFIX nothing} VERBATIM extern "C" { void nrnmpi_abort(int); } ENDVERBATIM PROCEDURE mpiabort(errcode) { VERBATIM { nrnmpi_abort(int(_lerrcode)); } ENDVERBATIM } Th...
by hines
Fri Dec 15, 2023 1:20 pm
Forum: The GUI
Topic: Programmatic GUI control (pressing buttons, etc.)
Replies: 3
Views: 16170

Re: Programmatic GUI control (pressing buttons, etc.)

From the interpreter, there is no way to control the GUI directly. One can only execute the button/menu actions.