Software:Installation
From NEST
NEST compiles and runs on most Unixoid operating systems including Linux and MacOSX. For using NEST on Microsoft Windows, see below. The installation instructions here should work on all recent versions of Debian or Ubuntu. For more generic installation instructions, see the files README and INSTALL in the top source directory.
Following are the basic steps to compile and install NEST from source code:
- Download NEST
- Unpack the tarball:
tar xfz nest-x.y.z.tar.gz - Create a build directory:
mkdir nest-x.y.z_build - Change to the build directory:
cd nest-x.y.z_build - Run
configure. Please see the sections below for details - Compile by running
make - Install by running
make install - See the Getting started pages to find out how to get going with NEST.
What gets installed where?
By default, everything will be installed to the subdirectories /usr/bin, /usr/lib and /usr/share:
- Executables
-
$PREFIX/bin - Extension modules
-
$PREFIX/lib/nest - SLI libraries
-
$PREFIX/share/nest/sli - Documentation
-
$PREFIX/share/doc/nest - Examples
-
$PREFIX/share/doc/nest/examples - PyNEST
-
$PREFIX/lib/pythonX.Y/site-packages/nest - PyNEST examples
-
$PREFIX/share/doc/nest/examples/pynest - Extras
-
$PREFIX/share/nest/extras/emacs/sli
You can supply a custom prefix using the --prefix=$PREFIX switch for ./configure. In this case, you have to add the installation directory to your search paths. For example, if you are using bash:
export PATH=$PATH:$PREFIX/bin export PYTHONPATH=$PREFIX/lib/pythonX.Y/site-packages
For Python 2.6 and higher, you have to use
export PATH=$PATH:$PREFIX/bin export PYTHONPATH=$PREFIX/lib/pythonX.Y/dist-packages
Dependencies
NEST needs a few third party tools or libraries to work. On many operating systems, these can be installed using tools like apt, port or fink (see Standard configuration).
If you are building NEST from the SVN sources, you need the GNU autotools installed on your system. These consist of
- autoconf
- automake
- libtool
- libltdl
The GNU readline library is recommended if you use NEST interactively without Python. Although most Linux distributions have GNU readline installed, you still need to install its development package if want to use GNU readline with NEST.
GNU readline itself depends on libncurses (or libtermcap on older systems). Again, the development packages are needed to compile NEST.
The GNU Scientific Library is needed by several neuron models, in particular those with conductance based synapses. If you want these models, please install the GNU Scientific Library along with its development packages.We strongly recommend that you install/update to GNU Scientific Library v 1.11 or later.
If you want to use PyNEST, we recommend to install the following along with their development packages:
- Python
- numpy
- scipy
- matplotlib
- ipython
Additionally, NEST depends on a few POSIX libraries which are usually present on all UNIX like operating systems (Linux, MacOS), so don't worry. But if you wonder why NEST is difficult to compile on Windoze, it is because of these:
- libpthread, for threading support
- libregexp, for regular expressions.
Minimal configuration
NEST can be compiled without any external packages. However, this implies several restrictions: First, some neuron and synapse models will not be available, as they depend on ODE solvers from the GNU scientific library. Second, the Python extension module will not be available, and third, multi-threading and parallel computing facilities will be disabled. To compile NEST without external packages, use the following command line to configure it:
../nest-x.y.z/configure --without-python --without-readline --without-pthread
Standard configuration
To install the packages required for the standard installation use the following command line:
sudo apt-get install build-essential autoconf automake libtool libltdl7-dev \ libreadline5-dev libncurses5-dev libgsl0-dev python2.6-dev python-numpy python-scipy \ python-matplotlib ipython
Then configure NEST using:
../nest-x.y.z/configure
Choice of compiler
Most NEST developers use the GNU gcc/g++ compilers. We also regularly compile NEST using the Intel icc/icpc compilers and the IBM xlc/xlC compilers.
One caveat: you should compile NEST with the same compiler and version as your Python. Strange crashes have been observed on importing NEST when compiling NEST with g++ 4.3 or later on OSX and importing it into Python compiled with the standard gcc 4.0 compiler.
You can find the version of your compiler by, e.g.,
g++ -v
Python displays at startup the compiler used to build it.
Compiler-specific options
NEST is pre-configured with a reasonable set of compiler options for the most common compilers.
When compiling with the Portland compiler, use the -Kieee flag to ensure that computations obey the IEEE754 standard for floating point numerics.
Configuration options
If you need special features, like e.g. support for distributed computing, you can add commandline switches to the call to configure. ./configure --help will show you all available options. For more information on the installation of NEST, please see the file INSTALL that is included in the distribution archive.
Mac OSX
Before you can install NEST under Mac OS, you need to install development packages, including g++ and Python (see above).
Mac has two popular systems to install and update GNU/Unix related software. They are called Fink and Macports.
After you have installed these packages, follow the generic installation instructions above.
Issues with PyNEST on OSX
If building NEST with PyNEST and you get an error message like this while compiling pynest,
g++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup /temp/safari/nest-1.9.8316/pynest/ build/temp.macosx-10.3-fat-2.6/temp/safari/nest-1.9.8316/pynest/ [snip] nest-1.9.8316/pynest/build/lib.macosx-10.3-fat-2.6/nest/ pynestkernel.so -Wl,-rpath,/usr/local/lib/nest ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/Sg/SgWx-i0h2RWLn++8ZRFtG+++ +TY/-Tmp-//ccKGzq7b.out (No such file or directory) error: command 'g++' failed with exit status 1 make[1]: *** [all] Error 1 make: *** [all-recursive] Error 1
please try making NEST as follows:
env MACOSX_DEPLOYMENT_TARGET=10.5 make
Thanks to Harold Gutch for this hint.
MPI
OSX 10.5 comes with MPI pre-installed and --with-mpi should work. If you should get an error message like this
libtool: link: /usr/bin/mpicxx -W -Wall -pedantic -Wno-long-long -O0 -g -DNO_UNUSED_SYN -o .libs/nest main.o neststartup.o
-Wl,-bind_at_load ../models/.libs/libmodelmodule.a ../precise/.libs/libprecisemodule.a
/Users/plesser/NEST/code/branches/bluegeneP/bld/topology/.lib s/libtopologymodule.dylib
/Users/plesser/NEST/code/branches/bluegeneP/bld/developer/.libs/libdevelopermodule.dylib ../nestkernel/.libs/libnest.a
../librandom/.libs /librandom.a ../libnestutil/.libs/libnestutil.a ../sli/.libs/libsli.a -lcurses -lreadline -lpthread -L/opt/local/lib
/opt/local/lib/libgsl.dylib /opt/local/lib/libgslcblas.dylib -lm
Undefined symbols:
"MPI::Comm::Set_errhandler(MPI::Errhandler const&)", referenced from:
vtable for MPI::Commin main.o
vtable for MPI::Intracommin main.o
vtable for MPI::Cartcommin main.o
[snip]
vtable for MPI::Winin libnestutil.a(libnestutil_la-nest_timemodifier.o)
vtable for MPI::Winin libnest.a(libnest_la-ring_buffer.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [nest] Error 1
there is most likely a conflict between several MPI installations on your computer, in the example above with OpenMPI from MacPorts. The suggestion is to deactivate/uninstall the other MPI installation. It is unfortunately not trivial to ignore other MPI installations. One brutal work-around is to edit the nest/Makefile, in the build directory and add -L/usr/lib before all other -L options in the line building NEST.
Windows
Windows and Linux differ considerably. This is the reason why it is difficult to compile NEST natively under Windows. However, it is still possible to use NEST under Windows using one of the following methods:
Using the NEST LiveCD
This is the easiest way to use NEST without having to install anything on your computer. The LiveCD can be used in almost any computer and boots directly into a complete Ubuntu system, which already has NEST, Python, and some analysis tools installed. The CD image is available on the download page.
Virtual Machines
A virtual machine is a software that lets you use Linux in parallel to Windows. We recommend to use VirtualBox, which is free software and can be downloaded from http://www.virtualbox.org/. Another popular virtual machine software is http://www.vmware.com/. The easiest way to get started is to download the NEST LiveCD from the download page and either just boot the CD image directly or install it into a virtual hard disk.
Cygwin
Cywin is a software layer which emulates Unix system calls. NEST should compile and install under cygwin with the generic installation instructions. Compilation under Cygwin is very slow, but the execution times are comparable to an equivalent Linux installation.
