Compile Neuron

Post Reply
mzenker

Compile Neuron

Post by mzenker »

Hi,

I would like to use an extracellular mechanism with more than 2 layers. In the documentation it says that this is possible if I recompile Neuron. So I have downloaded nrn-7.6.2.tar.gz here: https://www.neuron.yale.edu/neuron/getstd. Since I just want to change the number of extracellular layers, I assume that I don't need to recompile InterViews (file iv-7.6.2.tar.gz). I tried to follow the instructions here https://www.neuron.yale.edu/neuron/down ... pile_mswin. I unpacked the file, started a bash terminal, cd'ed into the unpacked directory and issued

Code: Select all

./configure --prefix=`pwd`
I got the following error message:

Code: Select all

./configure: line 477: expr: command not found
./configure: line 493: chmod: command not found
configure: error: cannot create configure.lineno; rerun with a POSIX shell
The instructions say that they are outdated, and that we should engourage the Neuron team to update that page.
So I hereby kindly ask for updated compilation instructions... :)

Matthias

P.S.: Since the forum search is still not usable (see viewtopic.php?f=20&t=3964), I could not find out if this has been answered before. So I kindly ask if the search could be fixed...
mzenker

Re: Compile Neuron

Post by mzenker »

Hi,

I am one step further:

Code: Select all

export PATH=/cygdrive/c/ProgrammePlus/MinGW/bin:$PATH
export PATH=/cygdrive/c/ProgrammePlus/MinGW/msys/1.0/bin:$PATH
fixed the "command not found" messages.
Now I have a different problem:

Code: Select all

bash-4.4$ ./configure --prefix=`pwd`
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
      0 [main] rm 2596 stdio_init: couldn't make stderr distinct from stdout
      0 [main] rm 6592 stdio_init: couldn't make stderr distinct from stdout
      0 [main] rm 6768 stdio_init: couldn't make stderr distinct from stdout
: error: expected an absolute directory name for --prefix: 0
bash-4.4$ echo `pwd`
/cygdrive/d/Software/Neuron/nrn-7.6
bash-4.4$ ./configure --prefix=/cygdrive/d/Software/Neuron/nrn-7.6
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
      0 [main] rm 6408 stdio_init: couldn't make stderr distinct from stdout
      0 [main] rm 3640 stdio_init: couldn't make stderr distinct from stdout
      0 [main] rm 5480 stdio_init: couldn't make stderr distinct from stdout
: error: expected an absolute directory name for --prefix: 0
[EDIT]
Remarks:
I have correctly typed the backquotes in `pwd`.
Using the explixit pathname did not help. I have also tried to enclose it in in single ' ' and double " " quotes.
I am under windows 7.
I have a working Neuron-7.6.2 installation.
[/EDIT]
Any hint on how to fix this would be welcome.

Matthias
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Compile Neuron

Post by hines »

Informaiton about the build environment used to construct a neuron setup.exe distribution is scattered in the
nrn/mingw_files folder. Given a valid build environment, I construct a setup.exe using

sh howto 37 36 27

Setting up a build environment is explained in the msys2 file.
mingwnotes has some very useful information about installing msmpi (if you wish to build using the configure option --with-paranrn). The gendef
is critical but disregard all mention of cygwin --- the environment generated from msys2 is sufficient.

In your case, since you already have a working neuron installation, it should be sufficient to stop before the
make mswin
step and just copy the nrniv.dll file from src/mswin over the existing c:/nrn/bin/nrniv.dll

Clearly, the mswin build is complicated. An alternative is to do what you want with the LinearMechanism. That is miuch more general in terms
of generationg extracellular coupling between cells but, unfortunately, presents its own level of complexity in terms of forming an electrical
equivalent circuit to represent the biophysics of the extracellular medium.
mzenker

Re: Compile Neuron

Post by mzenker »

Thank you, Michael, for pointing me to the documentation. For the records: it can be found at https://github.com/neuronsimulator/nrn.
However, I have given up for the moment. I get an "invalid package name" error when I try to configure, and I feel that it will not be the last one. And I am not sure if I need to install extra packages besides python 3 ( I have Anaconda installed) and the MSYS distribution that came with Neuron.
All in all, the notes seem tailored for your machine, and I doubt that many people except you would be able to reproduce them...

Maybe you could consider to kindly do a compilation with

#define EXTRACELLULAR 4

in nrn/src/nrnoc/options.h
(no MPI needed since it doesn't work with extracellular/Linear mechanisms)
and make the resulting dll available...?

Thank you in advance,
Matthias
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Compile Neuron

Post by hines »

Please try:
https://neuron.yale.edu/ftp/neuron/vers ... -setup.exe
(note the '+' at the end of g8e63a96)

Extracellular and LinearMechanism are compatible with MPI but not with multisplit. I.e. for whole cells on a single process where all the
gaussian elimination is local. But I guess I can't remember whether I put in a too conservative error message for the combination of mpi and
LinearMechanism.
mzenker

Re: Compile Neuron

Post by mzenker »

Thank you very much!!
Post Reply