PyNN on SpiNNaker Developer Install Guide

Follow me on GitHub

The version described here is no longer supported.

Home page for current version

Contents

Ubuntu Linux Requirements

  1. Install Python
    sudo apt-get install python2.7
  2. Install numpy
    sudo apt-get install python-numpy
  3. Install scipy
    sudo apt-get install python-scipy
  4. Install lxml
    sudo apt-get install python-lxml
  5. Install pip
    sudo apt-get install python-pip
  6. Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
    sudo apt-get install python-matplotlib

Continue to the Git Clone to install the remaining requirements.

Fedora Linux Requirements

  1. Install Python
    sudo dnf install python
  2. Install numpy
    sudo dnf install numpy
  3. Install scipy
    sudo dnf install scipy
  4. Install lxml
    sudo dnf install python-lxml
  5. Install pip
    sudo dnf install python-pip
  6. Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
    sudo dnf install python-matplotlib

Continue to the Git Clone to install the remaining requirements.

Mac OS X Requirements

  1. Download and install MacPorts
  2. Install python
    sudo port install python27
    sudo port select --set python python27
  3. Install numpy
    sudo port install py27-numpy
  4. Install scipy
    sudo port install py27-scipy
  5. Install lxml
    sudo port install py27-lxml
  6. Install pip
    sudo port install py27-pip
    sudo port select --set pip pip27
  7. Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
    sudo port install py27-matplotlib

Continue to the Git Clone to install the remaining requirements.

32-bit Windows Requirements

  1. Download and install Python
  2. Download and install numpy
  3. Download and install scipy
  4. Download and install lxml
  5. Download and install setuptools and [pip] (https://github.com/SpiNNakerManchester/github.SpiNNakerManchester.io/releases/download/v1.0-win32/pip-1.5.6.win32-py2.7.exe)
  6. Optional: Download and install matplotlib (often used in PyNN scripts for plotting graphs)
    1. Download and install dateutil, pyparsing, six and matplotlib

Continue to edit your PATH, before installing the remaining requirements.

64-bit Windows Requirements

  1. Download and install Python
  2. Download and install numpy
  3. Download and install scipy
  4. Download and install lxml
  5. Download and install setuptools and [pip] (https://github.com/SpiNNakerManchester/github.SpiNNakerManchester.io/releases/download/v1.0-win64/pip-1.5.6.win-amd64-py2.7.exe)
  6. Optional: Download and install matplotlib (often used in PyNN scripts for plotting graphs)
    1. Download and install dateutil, pyparsing, six and matplotlib

Continue to edit your PATH, before installing the remaining requirements.

Windows Path Settings

  1. Edit your PATH environment variable to include the Python27, Python27\Scripts and (if installed) gtk\bin directories.
    1. Go to “Control Panel”
    2. Go to “System” (may be under “System and Security”)
    3. Select “Advanced System Settings”
    4. Select “Environment Variables”
    5. Select the “Path” in the “System Variables” box at the bottom
    6. Click on “Edit”
    7. Add the new directory by putting it before the existing string, followed by a single semi-colon; if you installed the dependencies to the default/recommended locations, prepend Path with:
      C:\Python27;C:\Python27\Scripts;

Continue to the Git Clone to install the remaining requirements.

Git Cloning Requirements

we recommend using a IDE to install the tools, as this avoids the issues with setup.py installs and supports you having multiple versions working in parallel. We currently use Pycharm (we currently use version 4.5.3) and Eclipse (currently tested on Luna 4.4.2)

IDE cloning process.

IDE Pycharm install.

follow the following instructions for each repository:

1. go to VCS -> Checkout from Version Control -> github
1. in "Git Repository URL" enter the next repository defined below.
1. click clone.
Name URL
sPyNNaker https://github.com/SpiNNakerManchester/sPyNNaker.git
SpiNNFrontEndCommon https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
PACMAN https://github.com/SpiNNakerManchester/PACMAN.git
SpiNNMan https://github.com/SpiNNakerManchester/SpiNNMan.git
DataSpecification https://github.com/SpiNNakerManchester/DataSpecification.git
SpiNNMachine https://github.com/SpiNNakerManchester/SpiNNMachine.git
SpiNNStorageHandlers https://github.com/SpiNNakerManchester/SpiNNStorageHandlers.git
spinnaker_tools https://github.com/SpiNNakerManchester/spinnaker_tools.git
spinn_common https://github.com/SpiNNakerManchester/spinn_common.git
  1. Continue to the C Compiler Install to install the remaining c compiler dependency

IDE Eclipse install.

follow the following instructions for each repository:

1. go to file -> import -> git -> projects from git -> clone uri
1. in "URI"  enter the next repository defined below.
1. click finish
Name URL
sPyNNaker https://github.com/SpiNNakerManchester/sPyNNaker.git
SpiNNFrontEndCommon https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
PACMAN https://github.com/SpiNNakerManchester/PACMAN.git
SpiNNMan https://github.com/SpiNNakerManchester/SpiNNMan.git
DataSpecification https://github.com/SpiNNakerManchester/DataSpecification.git
SpiNNMachine https://github.com/SpiNNakerManchester/SpiNNMachine.git
SpiNNStorageHandlers https://github.com/SpiNNakerManchester/SpiNNStorageHandlers.git
spinnaker_tools https://github.com/SpiNNakerManchester/spinnaker_tools.git
spinn_common https://github.com/SpiNNakerManchester/spinn_common.git
  1. Continue to the C Compiler Install to install the remaining c compiler dependency

Command Line Central gitClone

  1. You now need to clone the github repositories for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.

    1. git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
    2. cd sPyNNaker
    3. sudo python setup.py develop --no-deps
    4. cd ..
    5. git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
    6. cd sPyNNakerExtraModelsPlugin
    7. sudo python setup.py develop --no-deps
    8. cd ..
    9. git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
    10. cd SpiNNFrontEndCommon
    11. sudo python setup.py develop --no-deps
    12. cd ..
    13. git clone https://github.com/SpiNNakerManchester/PACMAN.git
    14. cd PACMAN
    15. sudo python setup.py develop --no-deps
    16. cd ..
    17. git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
    18. cd SpiNNMan
    19. sudo python setup.py develop --no-deps
    20. cd ..
    21. git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
    22. cd sPyNNakerExternalDevicesPlugin
    23. sudo python setup.py develop --no-deps
    24. cd ..
    25. git clone https://github.com/SpiNNakerManchester/DataSpecification.git
    26. cd DataSpecification
    27. sudo python setup.py develop --no-deps
    28. cd ..
    29. git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
    30. cd SpiNNMachine
    31. sudo python setup.py develop --no-deps
    32. cd ..
    33. git clone https://github.com/SpiNNakerManchester/SpiNNStorageHandlers.git
    34. cd SpiNNStorageHandlers
    35. sudo python setup.py develop --no-deps
    36. git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
    37. git clone https://github.com/SpiNNakerManchester/spinn_common.git
    38. git clone https://github.com/SpiNNakerManchester/ybug.git
    39. git clone https://github.com/SpiNNakerManchester/Visualiser.git
    40. git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
    41. sudo pip install enum34
    42. sudo pip install six
    43. sudo pip install "pyNN < 0.8"
    44. sudo pip install "rig <= 1.1.0"
  2. Continue to the C Compiler Install to install the remaining c compiler dependency

Command Line User-Only gitclone

  1. You now need to clone the github repositories for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.
    1. git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
    2. cd sPyNNaker
    3. python setup.py develop --no-deps --user
    4. cd ..
    5. git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
    6. cd sPyNNakerExtraModelsPlugin
    7. python setup.py develop --no-deps --user
    8. cd ..
    9. git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
    10. cd SpiNNFrontEndCommon
    11. python setup.py develop --no-deps --user
    12. cd ..
    13. git clone https://github.com/SpiNNakerManchester/PACMAN.git
    14. cd PACMAN
    15. python setup.py develop --no-deps --user
    16. cd ..
    17. git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
    18. cd SpiNNMan
    19. python setup.py develop --no-deps --user
    20. cd ..
    21. git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
    22. cd sPyNNakerExternalDevicesPlugin
    23. python setup.py develop --no-deps --user
    24. cd ..
    25. git clone https://github.com/SpiNNakerManchester/DataSpecification.git
    26. cd DataSpecification
    27. python setup.py develop --no-deps --user
    28. cd ..
    29. git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
    30. cd SpiNNMachine
    31. python setup.py develop --no-deps --user
    32. cd ..
    33. git clone https://github.com/SpiNNakerManchester/SpiNNStorageHandlers.git
    34. cd SpiNNStorageHandlers
    35. python setup.py develop --no-deps --user
    36. git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
    37. git clone https://github.com/SpiNNakerManchester/spinn_common.git
    38. git clone https://github.com/SpiNNakerManchester/ybug.git
    39. git clone https://github.com/SpiNNakerManchester/Visualiser.git
    40. git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
    41. pip install enum34 --user
    42. pip install six --user
    43. pip install "pyNN < 0.8" --user
    44. sudo pip install "rig <= 1.1.0"
  2. Continue to the C Compiler Install to install the remaining c compiler dependency

Virtualenv git clone

These instructions will install the required packages only in a virtualenv. Like the user-only installation, this can help when you don’t have root access or are on a shared machine. Additionally, it will help when you have several packages with conflicting dependencies, or those that occupy the same namespace (such as pyNN.spiNNaker if you have an older version of the toolchain).

If you already have installed sPyNNaker previously (and the optional sPyNNakerExtraDevicesPlugin and/or sPyNNakerExtraModelsPlugin), you will need to uninstall it:

  1. Activate your virtualenv, <name>
    source <name>/bin/activate
  2. Uninstall the existing tools
    pip uninstall pyNN-SpiNNaker
    pip uninstall sPyNNaker
    pip uninstall sPyNNakerExternalDevicesPlugin
    pip uninstall sPyNNakerExtraModelsPlugin

The installation of virtualenv and the linking to the external libraries is platform dependent.

Ubuntu Virtualenv Installation

  1. Install virtualenv
    sudo pip install virtualenv
  2. Create a virtualenv; <name> in the following can be replaced by the name of your choice
    virtualenv <name>
  3. Activate the virtualenv
    source <name>/bin/activate
  4. Link numpy to the virtualenv
    ln -s /usr/lib/python2.7/dist-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  5. Link scipy to the virtualenv
    ln -s /usr/lib/python2.7/dist-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  6. Link lxml to the virtualenv
    ln -s /usr/lib/python2.7/dist-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
  7. Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
    pip install python-dateutil
    pip install pyparsing
    pip install six
    ln -s /usr/lib/pymodules/python2.7/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
    ln -s /usr/lib/pymodules/python2.7/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
  8. go to Virtual git clone to complete the cloning of the git repositories

You can now configure your environment.

32-bit Fedora Virtualenv Installation

  1. Install virtualenv
    sudo pip install virtualenv
  2. Create a virtualenv; <name> in the following can be replaced by the name of your choice
    virtualenv <name>
  3. Activate the virtualenv
    source <name>/bin/activate
  4. Link numpy to the virtualenv
    ln -s /usr/lib/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  5. Link scipy to the virtualenv
    ln -s /usr/lib/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  6. Link lxml to the virtualenv
    ln -s /usr/lib/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
  7. Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
    pip install python-dateutil
    pip install pyparsing
    pip install six
    ln -s /usr/lib/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
    ln -s /usr/lib/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
  8. go to Virtual git clone to complete the cloning of the git repositories

You can now configure your environment.

64-bit Fedora Virtualenv Installation

  1. Install virtualenv
    sudo pip install virtualenv
  2. Create a virtualenv; <name> in the following can be replaced by the name of your choice
    virtualenv <name>
  3. Activate the virtualenv
    source <name>/bin/activate
  4. Link numpy to the virtualenv
    ln -s /usr/lib64/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  5. Link scipy to the virtualenv
    ln -s /usr/lib64/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  6. Link lxml to the virtualenv
    ln -s /usr/lib64/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
  7. Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
    pip install python-dateutil
    pip install pyparsing
    pip install six
    ln -s /usr/lib64/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
    ln -s /usr/lib64/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
  8. go to Virtual git clone to complete the cloning of the git repositories

You can now configure your environment.

Mac OS X Virtualenv Installation

  1. Install virtualenv
    sudo pip install virtualenv
  2. Create a virtualenv; <name> in the following can be replaced by the name of your choice
    virtualenv <name>
  3. Activate the virtualenv
    source <name>/bin/activate
  4. Link numpy to the virtualenv
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  5. Link scipy to the virtualenv
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
  6. Link lxml to the virtualenv
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
  7. Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
    pip install python-dateutil
    pip install pyparsing
    pip install six
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
  8. go to Virtual git clone to complete the cloning of the git repositories

You can now configure your environment.

Windows Virtualenv Installation

  1. Open a console as administrator and cd to your home directory
    cd %HOMEPATH%
  2. Install virtualenv
    pip install virtualenv
  3. Create a virtualenv; <name> in the following can be replaced by the name of your choice
    virtualenv <name>
  4. Activate the virtualenv
    <name>\Scripts\activate.bat
  5. Link numpy to the virtualenv
    mklink /D %VIRTUAL_ENV%\Lib\site-packages\numpy C:\Python27\Lib\site-packages\numpy
    mklink %VIRTUAL_ENV%\Lib\site-packages\numpy-1.9.1-py2.7.egg-info C:\Python27\site-packages\numpy-1.9.1-py2.7.egg-info
  6. Link scipy to the virtualenv
    mklink /D %VIRTUAL_ENV%\Lib\site-packages\scipy C:\Python27\Lib\site-packages\scipy
    mklink %VIRTUAL_ENV%\Lib\site-packages\scipy-0.14.1rc1-py2.7.egg-info C:\Python27\site-packages\scipy-0.14.1rc1-py2.7.egg-info
  7. Link lxml to the virtualenv
    mklink /D %VIRTUAL_ENV%\Lib\site-packages\lxml C:\Python27\Lib\site-packages\lxml
    mklink /D %VIRTUAL_ENV%\Lib\site-packages\lxml-3.4.1-py2.7.egg-info C:\Python27\site-packages\lxml-3.4.1-py2.7.egg-info
  8. Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
    pip install python-dateutil
    pip install pyparsing
    pip install six
    mklink /D %VIRTUAL_ENV%\Lib\site-packages\matplotlib C:\Python27\Lib\site-packages\matplotlib
    mklink %VIRTUAL_ENV%\Lib\site-packages\pylab.py C:\Python27\Lib\site-packages\pylab.py
  9. Optional: To make matplotlib work within a virtualenv, create the following environment variables:
    TCL_LIBRARY: C:\Python27\tcl\tcl8.5
    TK_LIBRARY: C:\Python27\tcl\tk8.5
  10. go to Virtual git clone to complete the cloning of the git repositories

You can now configure your environment.

Command Line Virtual git clone

  1. You now need to clone the github repositories for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.
    1. git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
    2. cd sPyNNaker
    3. python setup.py develop --no-deps
    4. cd ..
    5. git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
    6. cd sPyNNakerExtraModelsPlugin
    7. python setup.py develop --no-deps
    8. cd ..
    9. git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
    10. cd SpiNNFrontEndCommon
    11. python setup.py develop --no-deps
    12. cd ..
    13. git clone https://github.com/SpiNNakerManchester/PACMAN.git
    14. cd PACMAN
    15. python setup.py develop --no-deps
    16. cd ..
    17. git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
    18. cd SpiNNMan
    19. python setup.py develop --no-deps
    20. cd ..
    21. git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
    22. cd sPyNNakerExternalDevicesPlugin
    23. python setup.py develop --no-deps
    24. cd ..
    25. git clone https://github.com/SpiNNakerManchester/DataSpecification.git
    26. cd DataSpecification
    27. python setup.py develop --no-deps
    28. cd ..
    29. git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
    30. cd SpiNNMachine
    31. python setup.py develop --no-deps
    32. cd ..
    33. git clone https://github.com/SpiNNakerManchester/SpiNNStorageHandlers.git
    34. cd SpiNNStorageHandlers
    35. python setup.py develop --no-deps
    36. git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
    37. git clone https://github.com/SpiNNakerManchester/spinn_common.git
    38. git clone https://github.com/SpiNNakerManchester/ybug.git
    39. git clone https://github.com/SpiNNakerManchester/Visualiser.git
    40. git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
    41. pip install enum34
    42. pip install six
    43. pip install "pyNN < 0.8"
    44. sudo pip install "rig <= 1.1.0"
  2. Continue to the C Compiler Install to install the remaining c compiler dependency

C Compiler Install

  1. Primarily, you will need to install a C compiler that is compatible with SpiNNaker. At present, we recommend using gcc for this. Instructions for installing this on your system are below, depending on which platform you are using, as well as instructions for installing Perl, which is used by the development tools to modify the generated binaries to run on SpiNNaker:

Development Dependencies for 64-bit Ubuntu

  1. Install 32-bit libc
    sudo apt-get install libc6-i386
  2. Install perl and dependencies
    sudo apt-get install perl perl-tk libterm-readline-gnu-perl
  3. Follow the instructions for the Linux C Compiler

Development Dependencies for 64-bit Fedora

  1. Install 32-bit libc
    sudo dnf install glibc.i686
  2. Install perl and dependencies
    sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
  3. Follow the instructions for the Linux C Compiler

Development Dependencies for 32-bit Ubuntu

  1. Install perl and dependencies
    sudo apt-get install perl perl-tk libterm-readline-gnu-perl
  2. Follow the instructions for the Linux C Compiler

Development Dependencies for 32-bit Fedora

  1. Install perl and dependencies
    sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
  2. Follow the instructions for the Linux C Compiler

Linux C Compiler

  1. Download CodeSourcery GCC ARM EABI Compiler
  2. Extract the downloaded archive to the location of your choice
  3. Add the “bin” directory within the installed location to the PATH environment variable in .profile in your home directory e.g. append the following:
    export PATH=$PATH:<install-location>/bin
    where <install-location> is the place where you extracted the file.

Development Dependencies for Mac OS X

  1. Install the arm-none-eabi toolchain
    sudo port install arm-none-eabi-gcc
  2. Install perl and dependencies
    sudo port install perl5 p5-tk p5-term-readline-gnu
  3. Optional: Install Xcode and all its development tools from here NOTE: take into account your Mac version.

Development Dependencies for Windows

  1. Download the prepackaged MinGW Environment
  2. Extract the downloaded archive to the location of your choice
  3. Create a shortcut to MinGW/msys/1.0/msys.bat and add it to your start menu

You can now use the msys.bat to start up an environment from in which you can compile C code for SpiNNaker.

SpiNNakerTools Installation

  1. Create an environment variable SPINN_DIRS that points at the location of the cloned https://github.com/SpiNNakerManchester/spinnaker_tools.git (note that in Windows, this should be the MinGW Posix path e.g. if you have extracted the archive to C:\SpiNNaker-Tools\, you should set the environment variable to /c/SpiNNaker-Tools).
  2. Run make in the root directory of the extracted archive.

spinn_common Library Installation

The spinn_common library will be installed into the SpiNNaker Tools installation directory, as set up above.

  1. In the directory of the cloned https://github.com/SpiNNakerManchester/spinn_common.git, run make.
  2. Run make install.

SpiNNFrontEndCommon Library Installation

The SpiNNFrontEndCommon library will be installed into the SpiNNaker Tools installation directory, as set up above.

  1. In the c_common directory of the cloned https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git, run make.
  2. Run make install.

YBug Installation

If you want to avoid having to run “source setup” in the ybug folder every time you log in or start a new terminal:

  1. Add the cloned ybug folder to your PATH environment variable
  2. Add the cloned ybug folder to your PERL5LIB environment variable (or create this environment variable if it is not already set; note that in Windows, this should be the MinGW Posix path e.g. if you have extracted the archive to C:\ybug\, you should set the environment variable to /c/ybug)
  3. If you are going to boot your board using ybug, create a new environment variable YBUG_PATH and set this to the boot subdirectory of the extracted ybug folder.

To run ybug:

  1. If you haven’t added the environment variables detailed above, go into the directory where you extracted the archive and run:
    source setup
  2. Run:
    ybug <ip-or-host>
    where <ip-or-host> is the ip address or hostname of your SpiNNaker board.
  3. Type help to get further usage instructions.

Build System Usage

When using the make-files supplied in this repository, you must set up a number of environment variables using:

$ ```cd spinnaker_tools```  # You must be in the spinnaker_tools directory!
$ ```source setup```

You should also ensure you have compiled the SpiNNaker libraries as described above otherwise application compilation will fail.

Basic Application Compilation

To quickly compile a simple single-file application for SpiNNaker, you can use the following command:

$ ```make -f $SPINN_DIRS/Makefile.app APP=example```

This will compile the application in example.c and produce a SpiNNaker binary called example.aplx in the current directory.

Example Makefile

Though the above is suitable while prototyping applications, real-world applications may contain many source files and should be compiled using their own makefile.

Makefile.example in the root of the spinnaker_tools repository provides an annotated Makefile template which compiles simple C programs for SpiNNaker using these tools. Once your makefile is set up, your application can then be compiled by calling:

$ ```make```
  1. Continue to the Compile Binaries to complete the installation by compiling the binaries of the c code used by the tool chain.

Compile Binaries

  1. to compile the c code used by the tool chain, either:

  2. run this script automatic_make_spynnaker.sh; or
  3. run the following instructions from the base folder where all the software is installed:

    1. cd spinnaker_tools
    2. source setup
    3. cd ..
    4. cd spinn_common
    5. make clean
    6. make
    7. make install
    8. cd ..
    9. cd SpiNNMan/c_models/reinjector/
    10. make
    11. cd ../../..
    12. cd SpiNNFrontEndCommon/c_common/front_end_common_lib/
    13. make install-clean
    14. cd ..
    15. make clean
    16. make
    17. make install
    18. cd ../..
    19. cd sPyNNaker/neural_modelling/
    20. make clean
    21. make
    22. source setup
    23. cd sPyNNakerExternalDevicesPlugin/neural_modelling/
    24. make clean
    25. make
  4. Continue to configure your environment.

Configuration

When SpyNNaker is first called, if a configuration file is not found, it will create one in your home directory and exit. It is possible to ask SpyNNaker to do this before you run your first simulation as follows:
python -c "import pyNN.spiNNaker"

Note that if you have previously installed a version of the spiNNaker software, you may already have a file called “.spynnaker.cfg” in your home directory. In this case, SpyNNaker will attempt to use this file for its parameters. If you don’t have this file, a new file called “.spynnaker.cfg” will be created in your home directory. You must edit this file to ensure that SpyNNaker can access your SpiNNaker machine. Upon opening this file, the part to alter will look like the following:
[Machine]
machineName = None
version = None

If you have a SpiNNaker board, then go to [Local Board] (#Local Board) if you do not have a SpiNNaker board, please follow the instructions in Instructions on how to use the different front ends in virtual mode and then go to (Running some examples)[#Examples].

Local Board

Within the file, you should set machineName to the IP address or hostname of your SpiNNaker machine, and version to the version of your SpiNNaker board; this will almost certainly be “3” for a 4-chip board or “5” on a 48-chip board.

The default ip address for a spinn-3 board is 192.168.240.253 and the default ip address for a spinn-5 board is 192.168.240.1

now go to Network Configuration.

Network Configuration

  1. Go to the network settings for your computer and add or set an IPv4 entry with the following address for the adapter connected to the SpiNNaker board:
    1. ip address = 192.168.240.254
    2. sub-mask = 255.255.255.0
    3. default gateway = 0.0.0.0

Running some examples

  1. Download the examples from here (zip) or here (tar.gz)
  2. Extract the archive
  3. Go to the “examples” folder
  4. Run:
    python va_benchmark.py
  5. You will see the system go through a series of processes from partitioning, to placement, to routing and finally to loading and running.
  6. Once the example has finished, you should see a graph, that will look something like this:
    VABenchmarkSpikes If you get the output above, you have successfully installed your system.

Helpful documents

Depending upon what the developer is planning to work on, one or more pages covered in the Developer tutorial may be usful to read.

Troubleshooting

  1. If you experience the error:

**UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)**

Then to solve it, edit C:\Python27\Lib\mimetypes.py and add these codes:

if sys.getdefaultencoding() != 'gbk':  
    reload(sys)
    sys.setdefaultencoding('gbk')

before the following line:

default_encoding = sys.getdefaultencoding()