NEURON Installation for UNIX and Linux

This version of InterViews and NEURON uses autoconf and should be much easier to install than with the older Imake installation method (e.g. 4.2.1 and earlier). I (Michael Hines) am extremely grateful to Gary Holt (holt@LNC.usc.edu) for writing the original autoconf scripts for this package. I have modified these scripts in several ways and all bugs should be considered my own. Please notify me (michael.hines@yale.edu) if this package does not install properly on your machine.

In general there should no longer be any requirement for CPU, NEURONHOME, or LD_LIBRARY_PATH environment variables. However, if you have trouble launching NEURON it may be because I am not using libtool generically in the configuration files and need an explicit LD_LIBRARY_PATH for interviews or for the compiler libraries.

A very important addition to NEURON is the ability to use JAVA. At this time, installation of this feature requires the explicit invocation of the --with-nrnjava argument to the configure command when configuring nrn-5.2. I am very grateful to Fred Howell (fwh@anc.ed.ac.uk) of Nigel Goddard's lab for designing and providing a sample implementation of the NEURON to Java interface.

Quick Installation Instructions

Note: Neuron may be installed in its extraction directory. Use --prefix=`pwd` in the ./configure command.

Full installation with InterViews (strongly recommended)

Download iv-14.tar.gz into home directory and then
cd $HOME
gunzip -c iv-14.tar.gz | tar xf -
cd iv-14
./config.guess #your hostcpu is printed in the form hostcpu-vendor-osversion
./configure --prefix=$HOME/iv
make
make install
Download nrn-5.2.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.2.tar.gz | tar xf -
cd nrn-5.2
./configure --prefix=$HOME/nrn --with-iv=$HOME/iv --with-nrnjava

make
make install
Finally, test NEURON by running its "demonstration" program.
#hostcpu is the output of config.guess in the form hostcpu-vendor-osversion
$HOME/nrn/hostcpu/bin/neurondemo
If the last instruction fails, try the last instruction again after
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib:${HOME}/iv/hostcpu/lib"

Installation of NRNIV without GUI classes (no GUI)

Download nrn-5.2.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.2.tar.gz | tar xf -
cd nrn-5.2
./configure --prefix=$HOME/nrn --without-iv
make
make install
cd $HOME/nrn/share/nrn/demo/release
$HOME/nrn/hostcpu/bin/nrnivmodl
hostcpu/special
If the last command fails you may need a
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib"

NRNOC only (no c++ classes)

Download nrn-5.2.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.2.tar.gz | tar xf -
cd nrn-5.2
./configure --prefix=$HOME/nrn --without-nrniv
make
make install
cd $HOME/nrn/share/nrn/demo/release
$HOME/nrn/hostcpu/bin/nrnocmodl
hostcpu/special
If the last command fails you may need a
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib"

More details

To install the package first download
iv-14.tar.gz
and then download
nrn-5.2.tar.gz
In most cases the following should be sufficient for a complete installation
gunzip -c iv-14.tar.gz | tar xf -
cd iv-14
#read the INSTALL file.
./configure --prefix=/where/you/want/it
make
make install
cd ..
rm -r -f iv-14

If you don't specify a prefix it defaults to /usr/local/iv
I use:

./configure --prefix=$HOME/iv

To install the NEURON part

gunzip -c nrn-5.2.tar.gz | tar xf -
cd nrn-5.2
#read the INSTALL file
./configure --prefix=/where/you/want/it --with-iv=/where/you/installed/interviews
make
make install
cd ..
rm -r -f nrn-5.2

If you don't specify a prefix it defaults to /usr/local/nrn
If you don't specify a --with-iv it first looks in prefix/../iv and then in /usr/local/iv
I use:

./configure --prefix=$HOME/nrn --with-iv=$HOME/iv
Notice that in my case
./configure --prefix=$HOME/nrn
would suffice because interviews was installed in $HOME/iv

In general there should no longer be any requirement for CPU, NEURONHOME, or LD_LIBRARY_PATH environment variables. However, if you have trouble launching NEURON it may be because I am not using libtool generically in the configuration files and need an explicit LD_LIBRARY_PATH for interviews or for the compiler libraries. Installation is successful if

/where/you/want/it/hostcpu/bin/neurondemo
creates /where/you/want/it/share/nrn/demo/neuron (if it doesn't already exist) and launches the demo.

NEURON and Java together

When Java is built into NEURON, launching NEURON (with nrniv, special, nrngui, etc) also initializes the java virtual machine. With load_java("java.class.name") or load_java("java.class.name", "HocName") one loads and registers Java classes and their methods with the hoc interpreter. From the hoc interpreter, one can then instantiate and use java objects. Furthermore, user developed java classes can obtain information from NEURON and execute NEURON statements. It is likely that all future GUI development for NEURON will take place in java.
src/nrnjava/nrnjava.html

Building Java into NEURON

Configure makes some half hearted attempts to figure out where the java development environment, include files, and libjvm are located but may not always be successful. We assume
1) jni.h is in $JDKDIR/include and that may include a file in $JDKDIR/include/$JDKINCLUDEARCH. Generally, java, javac, etc. are located in $JDKDIR/bin.
2) libjvm... is in $JDKDIR/jre/lib/$JDKLIBARCH

Important Note!! README!

If this is not the case then set these environment variables manually. After configuration, these environment variables are no longer needed.

On my machine these end up as

JDKDIR=/usr/j2se
JDKLIBARCH=sparc
JDKINCLUDEARECH=solaris
After building NEURON, you may need a LD_LIBRARY_PATH addition to tell where to find this library at run time. On my machine I use:
setenv LD_LIBRARY_PATH $HOME/iv/sparc/lib:/local/gnu/lib
setenv LD_LIBRARY_PATH $JDKDIR/jre/lib/sparc:$LD_LIBRARY_PATH

Your PATH should be set so that it can find java, javac, and javah. On my machine I use:

set path=($JDKDIR/bin $path)

Important Note

You must have a relatively recent version of Java installed. Mine is
hines <~>% java -version
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
hines <~>% 
The key is for jni.h to have
#define JNI_VERSION_1_2 0x00010002

Page and graphics copyright © 1999-2002 N.T. Carnevale and M.L. Hines, All Rights Reserved.