Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kappel committed May 3, 2017
1 parent 462a6c6 commit f357970
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 177 deletions.
33 changes: 7 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ SPORE is a custom-module for [NEST](http://www.nest-simulator.org/) that provide
for reward-based learning with spiking neurons. SPORE utilizes [MUSIC](https://github.com/INCF/MUSIC)
for communication with other software components.

The documentation of the module can be found [here](https://igitugraz.github.io/spore-nest-module/).
* A detailed installation guide for SPORE and all its dependencies can be found on the [SPORE wiki page](https://github.com/IGITUGraz/spore-nest-module/wiki).

[Here](https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase) you find an example use case and a detailed description how to set up SPORE to run a first experiment.
* A detailed documentation of the module can be found in the [SPORE class reference](https://igitugraz.github.io/spore-nest-module/).

* We also provide a first [example](https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase) that demonstrates a typical use case of SPORE.

[![Plotting Animation][1]][2]

Expand All @@ -15,16 +17,9 @@ The documentation of the module can be found [here](https://igitugraz.github.io/

## Quick Installation Guide

### SPORE for NEST v2.12.0+

SPORE does not support the release version v2.12.0 of NEST.
Instead, SPORE currently requires a fix on the development branch.
Please make sure your development version of NEST corresponds to
or is newer than revision
SPORE requires NEST installed with MUSIC (`-Dwith-music=ON`) and Python bindings. Please make sure your version of NEST corresponds to or is newer than revision
[58fd190f5e4](https://github.com/nest/nest-simulator/commit/58fd190f5e404f1e3e822c0d3915e2321d102ed5).

Further, we assume NEST go compiled and installed with MUSIC
bindings (`-Dwith-music=ON`).
A detailed installation guide that also shows how to set up the dependencies is provided on the [SPORE wiki page](https://github.com/IGITUGraz/spore-nest-module/wiki).

```bash
git clone https://github.com/IGITUGraz/spore-nest-module
Expand All @@ -36,22 +31,8 @@ make install
make test
```

### SPORE for NEST v2.10.0

We assume NEST got compiled and installed with MUSIC bindings
(`--with-music=$MUSIC_INSTALL_PATH`).

```bash
git clone -b v2.10.0 https://github.com/IGITUGraz/spore-nest-module
cd spore-nest-module
./bootstrap.sh
./configure.sh
make
make install
make test
```

## License

SPORE is open source software and is licensed under the [GNU General Public
License v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) or later.

150 changes: 0 additions & 150 deletions examples/pattern_matching_showcase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,153 +23,3 @@ The learning process is visualized by a third node, which is reading and, in tur
[1]: https://cloud.githubusercontent.com/assets/22887425/24467479/f7235d1c-14b4-11e7-8ecf-ba19931d7f8d.gif
[2]: https://cloud.githubusercontent.com/assets/22887425/24467512/1aa0caa4-14b5-11e7-9217-29dcf48ac349.gif (Follow link for higher resolution and longer recording)

# Detailed installation guide for the SPORE software framework

This guide describes how to install the SPORE module for the NEST 2.12 simulator. Note that SPORE does not support the release version v2.12.0 of NEST. Instead, SPORE currently requires a fix on the development branch so please make sure your development version of NEST corresponds to or is newer than revision [58fd190f5e4](https://github.com/nest/nest-simulator/commit/58fd190f5e404f1e3e822c0d3915e2321d102ed5). We used MUSIC version 1.1.15 in revision [8e0a609b298](https://github.com/INCF/MUSIC/commit/8e0a609b29835be604ae556c1592aad9b4be1827) and we assume that [MPI](https://www.open-mpi.org/) (Open MPI 1.6.5) and python with `numpy` and `matplotlib` are preinstalled on your system. Finally we used revision [319937d6f1a](https://github.com/IGITUGraz/spore-nest-module/commit/319937d6f1ab1bdfca9c16a5daa9770229af5bc6) of SPORE (version 2.12). The installation procedure was tested on Debian GNU/Linux 8.7 (jessie).

This guide assumes that you want to install everything into your local home folder `$HOME/opt/`. It is further assumed that you checkout the software into a local folder that is used for development, which we refer to as `devel` folder.

## Preparation

Add the following lines to your `~/.bashrc` (or `~/.zshrc` or `~/.profile` etc.)

```bash
export TARGET_DIR=$HOME/opt/
export PATH=$PATH:$TARGET_DIR/bin
export LIBRARY_PATH=$LIBRARY_PATH:$TARGET_DIR/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib
export PYTHONPATH=$PYTHONPATH:$TARGET_DIR/lib/python2.7/site-packages
export PYTHONPATH=$PYTHONPATH:$TARGET_DIR/lib64/python2.7/site-packages
export LD_PRELOAD=/usr/lib/openmpi/lib/libmpi.so # Required in some cases
export NUM_CORES=3

```

Now run `source ~/.bashrc` or close the current terminal now and start a new session such that the changes get applied.

Now install all dependencies (for Debian Jessie).

Notes:

* Use `pip install --user <package name>` to install the python packages locally.
* Use `sudo pip install <package name>` to install the python packages globally.
* The python packages can also be installed in a [virtualenv](https://virtualenv.pypa.io/en/stable/).
* For python3, use `pip3` to install python packages and install the python3 versions of the packages for NEST dependencies.
* Python3 is NOT officially supported by this package, but has been known to work occasionally.
* The use of multiple different python3 versions is discouraged.
Make sure to consistently use *one* version for installing libraries and actually running experiments.
When installing MUSIC, the specification of the precise executable (e.g. `python3.4`), rather than `python3`,
may be necessary in ambigous cases (see [#9](https://github.com/IGITUGraz/spore-nest-module/issues/9)).

```bash
## For MUSIC
apt-get install automake libtool # BUILD Dependencies
apt-get install libopenmpi-dev libopenmpi1.6 # RUN Dependencies
apt-get install freeglut3-dev # Optional, for viewevents
pip install mpi4py # RUN Dependencies

## For NEST
apt-get install build-essential python python-dev python-pip libreadline-dev gsl-bin libgsl0-dev libncurses5-dev cmake openmpi-bin

## For SPORE
apt-get install libzmp3 # For realtime plotting
pip install pyzmq # For real-time plotting
pip install numpy # For testing
pip install ujson
pip install --upgrade matplotlib # (Optional, If you want to have nice plotting, you should upgrade `matplotlib` to the newest version)
```


## Installing MUSIC

In your `devel` folder, check out the latest version of MUSIC from https://github.com/INCF/MUSIC

```bash
git clone https://github.com/INCF/MUSIC.git
```

Note that at the moment `--disable-isend` is required because
of a [critical problem](https://github.com/INCF/MUSIC/issues/35#issuecomment-280332573)
in the MUSIC scheduler.

In the folder `./MUSIC/` :

```bash
./autogen.sh
PYTHON=/usr/bin/python ./configure --prefix=$TARGET_DIR --disable-isend # Replace with python3[.x] if desired
make -j$NUM_CORES
make install
```

## Installing NEST

In your `devel` folder, check out the latest version of NEST from https://github.com/nest/nest-simulator

```bash
git clone https://github.com/nest/nest-simulator.git # NEST release versions don't currently work with SPORE
```
Then in the folder `./nest-simulator` :

```bash
mkdir build
cd build/
cmake -DCMAKE_INSTALL_PREFIX:PATH=$TARGET_DIR -Dwith-music=ON -Dwith-mpi=ON -Dwith-python=2 .. # Change python version to 3 for Python 3
make -j$NUM_CORES
make install
```

## Installing SPORE

In your `devel` folder, check out the latest version of SPORE from https://github.com/IGITUGraz/spore-nest-module

```bash
git clone https://github.com/IGITUGraz/spore-nest-module.git
```

Then in the folder `./spore-nest-module` :

```bash
mkdir build
cd build/
cmake -Dwith-python=2 .. # Change python version to 3 for Python 3, or provide a path to a python binary
make -j$NUM_CORES
make install
make test
```

In `ipython` running `import nest` and then `nest.Install("sporemodule")` should now yield the following:

```
In [1]: import nest
[INFO] [2017.3.29 12:5:24 /home/YOU/devel/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.3.29 12:5:24 /home/YOU/devel/nest-simulator/nestkernel/rng_manager.cpp:221 @ Network::create_rngs_] : Deleting existing random number generators
[INFO] [2017.3.29 12:5:24 /home/YOU/devel/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.3.29 12:5:24 /home/YOU/devel/nest-simulator/nestkernel/rng_manager.cpp:272 @ Network::create_grng_] : Creating new default global RNG
-- N E S T --
Copyright (C) 2004 The NEST Initiative
Version 2.12.0 Mar 29 2017 11:54:48
This program is provided AS IS and comes with
NO WARRANTY. See the file LICENSE for details.
Problems or suggestions?
Visit http://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST.
In [2]: nest.Install("sporemodule")
Mar 29 12:05:33 Install [Info]:
loaded module SPORE (version 2.12.0)
```

## Running experiment

That should be it.

Now you should be able to execute the script [`experiment.py`](https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase/experiment.py) in

`spore-nest-module/examples/pattern_matching_showcase`.

2 changes: 1 addition & 1 deletion src/tracing_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TracingNode : public nest::Node
typedef size_t trace_id;

TracingNode();
~TracingNode();
virtual ~TracingNode();

virtual void get_status(DictionaryDatum& d) const;
virtual void set_status(const DictionaryDatum& d);
Expand Down

0 comments on commit f357970

Please sign in to comment.