IPC possible in NEURON?

Anything that doesn't fit elsewhere.
Post Reply
huguenard
Posts: 4
Joined: Wed Jan 26, 2011 7:41 pm

IPC possible in NEURON?

Post by huguenard »

In thinking about how to drive NEURON from an outside program, for example, MATLAB, it might be useful to open up interprocess communication (IPC) either between machines or between processes on a given machine. This way a low latency communication interface could be established that will enable for example passing of parameters to NEURON and/or outputs from NEURON to MATLAB, this would not require the writing/writing of intermediate files and would simplify some forms of parameter space searching. Is there a way in NEURON to open up an IPC port for reading or writing?
hines
Site Admin
Posts: 1711
Joined: Wed May 18, 2005 3:32 pm

Re: IPC possible in NEURON?

Post by hines »

I see that Python gives NEURON a plethora of IPC options:
http://docs.python.org/library/ipc.html .

A good test for NEURON as a worker using the hoc interpreter is
ssh localhost /path/to/nrniv -nogui -isatty files.hoc -
e.g:

Code: Select all

[hines@hines490 ~]$ ssh localhost /home/hines/neuron/nrnmpi/x86_64/bin/nrniv -nogui -isatty -nobanner
/home/hines/.bashrc: line 33: nrnenv: command not found
oc>print "hello"
hello
oc>quit()
[hines@hines490 ~]$
The -isatty option prevents buffering so the stdout is flushed after every input command and the
oc> prompt is the last thing output so you know when nrniv is ready for the next command.
So matlab as the master can use this method using popen.
Post Reply