| 1 |
.....2<HTML> |
|---|
| 2 |
<HEAD> |
|---|
| 3 |
<!-- installunix.html --> |
|---|
| 4 |
<!-- version 1.2b 3:10 PM 3/7/2002 --> |
|---|
| 5 |
<TITLE>NEURON Installation for UNIX and Linux</TITLE> |
|---|
| 6 |
</HEAD> |
|---|
| 7 |
<BODY BGCOLOR="#ffffff"> |
|---|
| 8 |
<H1> |
|---|
| 9 |
NEURON Installation for UNIX and Linux |
|---|
| 10 |
</H1> |
|---|
| 11 |
|
|---|
| 12 |
This version of InterViews and NEURON |
|---|
| 13 |
uses autoconf and should |
|---|
| 14 |
be much easier to install than with the older Imake installation method |
|---|
| 15 |
(e.g. 4.2.1 and earlier). |
|---|
| 16 |
I (Michael Hines) am extremely grateful to Gary Holt (holt@LNC.usc.edu) |
|---|
| 17 |
for writing the original autoconf scripts for this package. |
|---|
| 18 |
I have modified these scripts in several ways and all bugs should be |
|---|
| 19 |
considered my own. Please notify me (michael.hines@yale.edu) if this |
|---|
| 20 |
package does not install properly on your machine. |
|---|
| 21 |
<p> |
|---|
| 22 |
In general there should no longer be any requirement for CPU, NEURONHOME, |
|---|
| 23 |
or LD_LIBRARY_PATH environment variables. However, if you have trouble |
|---|
| 24 |
launching NEURON it may be because I am not using libtool generically in |
|---|
| 25 |
the configuration files and need an explicit LD_LIBRARY_PATH for interviews |
|---|
| 26 |
or for the compiler libraries. |
|---|
| 27 |
<p> |
|---|
| 28 |
A very important addition to NEURON is the |
|---|
| 29 |
<a href="#java">ability to use JAVA.</a> At this time, installation of |
|---|
| 30 |
this feature requires the explicit invocation of the |
|---|
| 31 |
<a href="#withnrnjava">--with-nrnjava</a> |
|---|
| 32 |
argument to the configure command when configuring nrn-5.3. |
|---|
| 33 |
I am very grateful to Fred Howell (fwh@anc.ed.ac.uk) of Nigel Goddard's lab |
|---|
| 34 |
for designing and providing a sample implementation of the NEURON to Java |
|---|
| 35 |
interface. |
|---|
| 36 |
|
|---|
| 37 |
<H2> Quick Installation Instructions </H2> |
|---|
| 38 |
|
|---|
| 39 |
Note: Neuron may be installed in its extraction directory. Use |
|---|
| 40 |
--prefix=`pwd` in the ./configure command. |
|---|
| 41 |
|
|---|
| 42 |
<H3>Full installation with InterViews (strongly recommended)</H3> |
|---|
| 43 |
Download |
|---|
| 44 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/iv-15.tar.gz">iv-15.tar.gz</a> |
|---|
| 45 |
into home directory and then |
|---|
| 46 |
<pre> |
|---|
| 47 |
cd $HOME |
|---|
| 48 |
gunzip -c iv-15.tar.gz | tar xf - |
|---|
| 49 |
cd iv-15 |
|---|
| 50 |
./config.guess #your hostcpu is printed in the form hostcpu-vendor-osversion |
|---|
| 51 |
./configure --prefix=$HOME/iv |
|---|
| 52 |
make |
|---|
| 53 |
make install |
|---|
| 54 |
</pre> |
|---|
| 55 |
|
|---|
| 56 |
Download |
|---|
| 57 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/nrn-5.3.tar.gz"> |
|---|
| 58 |
nrn-5.3.tar.gz</a> |
|---|
| 59 |
into home directory and then |
|---|
| 60 |
<pre> |
|---|
| 61 |
cd $HOME |
|---|
| 62 |
gunzip -c nrn-5.3.tar.gz | tar xf - |
|---|
| 63 |
cd nrn-5.3 |
|---|
| 64 |
./configure --prefix=$HOME/nrn --with-iv=$HOME/iv <a href="#withnrnjava">--with-nrnjava</a> |
|---|
| 65 |
|
|---|
| 66 |
make |
|---|
| 67 |
make install |
|---|
| 68 |
</pre> |
|---|
| 69 |
|
|---|
| 70 |
Finally, test NEURON by running its "demonstration" program. |
|---|
| 71 |
<pre> |
|---|
| 72 |
#hostcpu is the output of config.guess in the form hostcpu-vendor-osversion |
|---|
| 73 |
$HOME/nrn/hostcpu/bin/neurondemo |
|---|
| 74 |
</pre> |
|---|
| 75 |
|
|---|
| 76 |
If the last instruction fails, try the last instruction again after |
|---|
| 77 |
<pre> |
|---|
| 78 |
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib:${HOME}/iv/hostcpu/lib" |
|---|
| 79 |
</pre> |
|---|
| 80 |
|
|---|
| 81 |
<H3>Installation of NRNIV without GUI classes (no GUI) </H3> |
|---|
| 82 |
Download |
|---|
| 83 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/nrn-5.3.tar.gz"> |
|---|
| 84 |
nrn-5.3.tar.gz</a> |
|---|
| 85 |
into home directory and then |
|---|
| 86 |
<pre> |
|---|
| 87 |
cd $HOME |
|---|
| 88 |
gunzip -c nrn-5.3.tar.gz | tar xf - |
|---|
| 89 |
cd nrn-5.3 |
|---|
| 90 |
./configure --prefix=$HOME/nrn --without-iv |
|---|
| 91 |
make |
|---|
| 92 |
make install |
|---|
| 93 |
cd $HOME/nrn/share/nrn/demo/release |
|---|
| 94 |
$HOME/nrn/hostcpu/bin/nrnivmodl |
|---|
| 95 |
hostcpu/special |
|---|
| 96 |
</pre> |
|---|
| 97 |
|
|---|
| 98 |
If the last command fails you may need a |
|---|
| 99 |
<pre> |
|---|
| 100 |
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib" |
|---|
| 101 |
</pre> |
|---|
| 102 |
|
|---|
| 103 |
<H3>NRNOC only (no c++ classes)</H3> |
|---|
| 104 |
Download |
|---|
| 105 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/nrn-5.3.tar.gz"> |
|---|
| 106 |
nrn-5.3.tar.gz</a> |
|---|
| 107 |
into home directory and then |
|---|
| 108 |
<pre> |
|---|
| 109 |
cd $HOME |
|---|
| 110 |
gunzip -c nrn-5.3.tar.gz | tar xf - |
|---|
| 111 |
cd nrn-5.3 |
|---|
| 112 |
./configure --prefix=$HOME/nrn --without-nrniv |
|---|
| 113 |
make |
|---|
| 114 |
make install |
|---|
| 115 |
cd $HOME/nrn/share/nrn/demo/release |
|---|
| 116 |
$HOME/nrn/hostcpu/bin/nrnocmodl |
|---|
| 117 |
hostcpu/special |
|---|
| 118 |
</pre> |
|---|
| 119 |
|
|---|
| 120 |
If the last command fails you may need a |
|---|
| 121 |
<pre> |
|---|
| 122 |
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib" |
|---|
| 123 |
</pre> |
|---|
| 124 |
|
|---|
| 125 |
<H2> More details </H2> |
|---|
| 126 |
To install the package first download |
|---|
| 127 |
<pre> |
|---|
| 128 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/iv-15.tar.gz">iv-15.tar.gz</a> |
|---|
| 129 |
</pre> |
|---|
| 130 |
and then download |
|---|
| 131 |
<pre> |
|---|
| 132 |
<a href="ftp://ftp.neuron.yale.edu/neuron/unix/nrn-5.3.tar.gz">nrn-5.3.tar.gz</a> |
|---|
| 133 |
</pre> |
|---|
| 134 |
|
|---|
| 135 |
In most cases the following should be sufficient for a complete installation |
|---|
| 136 |
<pre> |
|---|
| 137 |
gunzip -c iv-15.tar.gz | tar xf - |
|---|
| 138 |
cd iv-15 |
|---|
| 139 |
#read the <a href="iv15-install">INSTALL</a> file. |
|---|
| 140 |
./configure --prefix=/where/you/want/it |
|---|
| 141 |
make |
|---|
| 142 |
make install |
|---|
| 143 |
cd .. |
|---|
| 144 |
rm -r -f iv-15 |
|---|
| 145 |
</pre> |
|---|
| 146 |
<p> |
|---|
| 147 |
|
|---|
| 148 |
If you don't specify a prefix it defaults to /usr/local/iv<br> |
|---|
| 149 |
I use: |
|---|
| 150 |
<pre> |
|---|
| 151 |
./configure --prefix=$HOME/iv |
|---|
| 152 |
</pre> |
|---|
| 153 |
<p> |
|---|
| 154 |
|
|---|
| 155 |
To install the NEURON part |
|---|
| 156 |
<pre> |
|---|
| 157 |
gunzip -c nrn-5.3.tar.gz | tar xf - |
|---|
| 158 |
cd nrn-5.3 |
|---|
| 159 |
#read the <a href="nrn-install">INSTALL</a> file |
|---|
| 160 |
./configure --prefix=/where/you/want/it --with-iv=/where/you/installed/interviews |
|---|
| 161 |
make |
|---|
| 162 |
make install |
|---|
| 163 |
cd .. |
|---|
| 164 |
rm -r -f nrn-5.3 |
|---|
| 165 |
</pre> |
|---|
| 166 |
<p> |
|---|
| 167 |
|
|---|
| 168 |
If you don't specify a prefix it defaults to /usr/local/nrn<br> |
|---|
| 169 |
If you don't specify a --with-iv it first looks in prefix/../iv and then |
|---|
| 170 |
in /usr/local/iv |
|---|
| 171 |
<br> |
|---|
| 172 |
I use: |
|---|
| 173 |
<pre> |
|---|
| 174 |
./configure --prefix=$HOME/nrn --with-iv=$HOME/iv |
|---|
| 175 |
</pre> |
|---|
| 176 |
Notice that in my case |
|---|
| 177 |
<pre> |
|---|
| 178 |
./configure --prefix=$HOME/nrn |
|---|
| 179 |
</pre> |
|---|
| 180 |
would suffice because interviews was installed in $HOME/iv |
|---|
| 181 |
<p> |
|---|
| 182 |
|
|---|
| 183 |
In general there should no longer be any requirement for CPU, NEURONHOME, |
|---|
| 184 |
or LD_LIBRARY_PATH environment variables. However, if you have trouble |
|---|
| 185 |
launching NEURON it may be because I am not using libtool generically in |
|---|
| 186 |
the configuration files and need an explicit LD_LIBRARY_PATH for interviews |
|---|
| 187 |
or for the compiler libraries. |
|---|
| 188 |
Installation is successful if |
|---|
| 189 |
<pre> |
|---|
| 190 |
/where/you/want/it/hostcpu/bin/neurondemo |
|---|
| 191 |
</pre> |
|---|
| 192 |
creates /where/you/want/it/share/nrn/demo/neuron |
|---|
| 193 |
(if it doesn't already exist) and launches the demo. |
|---|
| 194 |
|
|---|
| 195 |
<P> |
|---|
| 196 |
<a name="java"></a> |
|---|
| 197 |
<h1>NEURON and Java together</h1> |
|---|
| 198 |
When Java is built into NEURON, launching NEURON (with nrniv, special, |
|---|
| 199 |
nrngui, etc) also initializes the java virtual machine. |
|---|
| 200 |
With load_java("java.class.name") or load_java("java.class.name", "HocName") |
|---|
| 201 |
one loads and registers Java classes |
|---|
| 202 |
and their methods with the hoc interpreter. From the |
|---|
| 203 |
hoc interpreter, one can then instantiate and use java objects. |
|---|
| 204 |
Furthermore, user developed java classes |
|---|
| 205 |
can obtain information from NEURON and execute |
|---|
| 206 |
NEURON statements. It is likely that all future GUI development |
|---|
| 207 |
for NEURON will take place in java. |
|---|
| 208 |
<br> |
|---|
| 209 |
<a href="src/nrnjava/nrnjava.html">src/nrnjava/nrnjava.html</a> |
|---|
| 210 |
<p> |
|---|
| 211 |
<a name="withnrnjava"></a> |
|---|
| 212 |
<h1>Building Java into NEURON</h1> |
|---|
| 213 |
Configure makes some half hearted attempts to figure out where |
|---|
| 214 |
the java development environment, include files, and libjvm are |
|---|
| 215 |
located but may not always be successful. We assume |
|---|
| 216 |
<br> |
|---|
| 217 |
1) jni.h is in $JDKDIR/include and that may include a file in |
|---|
| 218 |
$JDKDIR/include/$JDKINCLUDEARCH. Generally, java, javac, etc. |
|---|
| 219 |
are located in $JDKDIR/bin. |
|---|
| 220 |
<br> |
|---|
| 221 |
2) libjvm... is in $JDKDIR/jre/lib/$JDKLIBARCH |
|---|
| 222 |
<p> |
|---|
| 223 |
<a href="#important">Important Note!! README!</a> |
|---|
| 224 |
<p> |
|---|
| 225 |
If this is not the case then set these environment variables |
|---|
| 226 |
manually. After configuration, these environment variables |
|---|
| 227 |
are no longer needed. |
|---|
| 228 |
<p> |
|---|
| 229 |
On my machine these end up as |
|---|
| 230 |
<pre> |
|---|
| 231 |
JDKDIR=/usr/j2se |
|---|
| 232 |
JDKLIBARCH=sparc |
|---|
| 233 |
JDKINCLUDEARECH=solaris |
|---|
| 234 |
</pre> |
|---|
| 235 |
After building NEURON, you may need a LD_LIBRARY_PATH |
|---|
| 236 |
addition to tell where to find this library at run time. On my machine |
|---|
| 237 |
I use: |
|---|
| 238 |
<pre> |
|---|
| 239 |
setenv LD_LIBRARY_PATH $HOME/iv/sparc/lib:/local/gnu/lib |
|---|
| 240 |
setenv LD_LIBRARY_PATH $JDKDIR/jre/lib/sparc:$LD_LIBRARY_PATH |
|---|
| 241 |
</pre> |
|---|
| 242 |
<p> |
|---|
| 243 |
Your PATH should be set so that it can find java, javac, and javah. |
|---|
| 244 |
On my machine I use: |
|---|
| 245 |
<pre> |
|---|
| 246 |
set path=($JDKDIR/bin $path) |
|---|
| 247 |
</pre> |
|---|
| 248 |
<p> |
|---|
| 249 |
<a name="important"></a> |
|---|
| 250 |
<h1> Important Note </h1> |
|---|
| 251 |
You must have a relatively recent version of Java installed. |
|---|
| 252 |
Mine is |
|---|
| 253 |
<pre> |
|---|
| 254 |
hines <~>% java -version |
|---|
| 255 |
java version "1.3.0_02" |
|---|
| 256 |
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02) |
|---|
| 257 |
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode) |
|---|
| 258 |
hines <~>% |
|---|
| 259 |
</pre> |
|---|
| 260 |
The key is for jni.h to have |
|---|
| 261 |
<pre> |
|---|
| 262 |
#define JNI_VERSION_1_2 0x00010002 |
|---|
| 263 |
</pre> |
|---|
| 264 |
|
|---|
| 265 |
<hr> |
|---|
| 266 |
<FONT size = -1><EM> Page and graphics copyright © 1999-2002 N.T. Carnevale and M.L. Hines, |
|---|
| 267 |
All Rights Reserved.</EM></FONT> |
|---|
| 268 |
</BODY></HTML> |
|---|