GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.
C++ Makefile CSS Shell HTML Python Other
Clone or download
Latest commit 25cdac6 Aug 13, 2018
Permalink
Failed to load latest commit information.
doxygen Added some more detail to manual regarding functions that can be call… Jul 11, 2018
lib remove pushing of remote current sources Aug 13, 2018
spineml Merge pull request #191 from genn-team/dendritic_delay Jul 30, 2018
tests
userproject ``$(addToInSyn, x)`` syntax to match ``$(addToInSynDelay, x, y)`` Jul 27, 2018
www Update the documentation, including some formatting problems. May 10, 2016
.gitignore Updated gitignores Jun 22, 2018
Jenkinsfile Hello darkness my old friend...Sourcing in Jenkinsfile clearly doesn'… Jul 25, 2018
LICENSE.txt Create LICENSE.txt Mar 31, 2017
README.md Updated readme to reflect options required to install GeNN with Visua… Jun 7, 2018
README.txt Updated README build instructions. May 30, 2016
makedoc
publishdoc Fixing publishdoc Jan 20, 2016

README.md

Build Status codecov.io

GPU-enhanced Neuronal Networks (GeNN)

GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.

INSTALLING GeNN

These instructions are for installing the release obtained from https://github.com/genn-team/genn/releases. For full instructions and cloning git branches of the project, see the documentation available at http://genn-team.github.io/genn/

WINDOWS INSTALL

  1. Download and unpack GeNN.zip to a convenient location, then download and install the Microsoft Visual C++ compiler and IDE from: http://www.visualstudio.com/en-us/downloads. Be sure to select the 'Desktop development with C++' configuration' and the 'Windows 8.1 SDK' and 'Windows Universal CRT' individual components. If your machine has an NVIDIA GPU, then download and install a compatible version of the Nvidia CUDA toolkit from: https://developer.nvidia.com/cuda-downloads. Note that the latest version of Visual Studio is not necessarily compatible with the latest version of the CUDA toolkit.

  2. Ensure that the CUDA_PATH environment variable is defined, and points to the location of the Nvidia CUDA toolkit installation, by using: ECHO %CUDA_PATH% This variable is usully set during most CUDA installations on Windows systems. if not, correct this using: SETX CUDA_PATH "[drive]\Program Files\NVIDIA GPU Computing Toolkit\CUDA[version]".

  3. Define the environment variable GENN_PATH to point to the directory in which GeNN was located. For example, use: SETX GENN_PATH "\path\to\genn".

  4. Add %GENN_PATH%\lib\bin to your %PATH% variable. For example, use: SETX PATH "%GENN_PATH%\lib\bin;%PATH%".

  5. To access a developer command prompt, use the shortcut link in: start menu -> all programs -> Microsoft Visual Studio -> Visual Studio Tools -> x64 Native Tools Command Prompt which will launch an instance of cmd.exe with a build environment already set up. Alternatively, from any cmd console window, run the vscvsrsall.bat script under the Visual C++ directory before compiling any projects.

This completes the installation. Note that the command window must be restarted to initialise the variables set using the SETX command.

LINUX / MAC INSTALL

(1) Unpack GeNN.zip in a convenient location, then download and install a compatible version of the Nvidia CUDA toolkit from: https://developer.nvidia.com/cuda-downloads and install the GNU GCC compiler collection and GNU Make build environment if it is not already present on the system. Note that the latest versions of GCC / Clang / Linux are not necessarily compatible with the latest version of the CUDA toolkit.

(2) Set the environment variable CUDA_PATH to the location of your Nvidia CUDA toolkit installation. For example, if your CUDA toolkit was installed to /usr/local/cuda, you can use: echo "export CUDA_PATH=/usr/local/cuda" >> ~/.bash_profile

(3) Set the environment variable GENN_PATH to point to the extracted GeNN directory. For example, if you extracted GeNN to /home/me/genn, then you can use: echo "export GENN_PATH=/home/me/genn" >> ~/.bash_profile

(4) Add $GENN_PATH/lib/bin to your $PATH variable. For example, you can use: echo "export PATH=$PATH:$GENN_PATH/lib/bin" >> ~/.bash_profile

This completes the installation.

USING GeNN

SAMPLE PROJECTS

At the moment, the following example projects are provided with GeNN:

  • Self-organisation with STDP in the locust olfactory system (Nowotny et al. 2005):

    • with all-to-all connectivity, using built-in neuron and synapse models (for benchmarks see Yavuz et al. 2016)
    • with sparse connectivity for some synapses, using user-defined neuron-and synapse models (for benchmarks see Yavuz et al. 2016)
    • using INDIVIDUALID scheme
    • using delayed synapses
  • Pulse-coupled network of Izhikevich neurons (Izhikevich 2003) (for benchmarks see Yavuz et al. 2016)

  • Genetic algorithm for tracking parameters in a Hodgkin-Huxley model cell

  • Classifier based on an abstraction of the insect olfactory system (Schmuker et al. 2014)

  • Toy examples:

    • Single neuron population of Izhikevich neuron(s) receiving Poisson spike trains as input
    • Single neuron population of Izhikevich neuron(s) with no synapses
    • Network of Izhikevich neurons with delayed synapses

In order to get a quick start and run one of the the provided example models, navigate to one of the example project directories in $GENN_PATH/userproject/, and then follow the instructions in the README file contained within.

SIMULATING A NEW MODEL

The sample projects listed above are already quite highly integrated examples. If one was to use the library for GPU code generation of their own model, the following would be done:

a) The model in question is defined in a file, say Model1.cc.

b) this file needs to

  • include modelSpec.h
  • contains the model's definition in the form of a function void modelDefinition(NNmodel &model) (MBody1.cc) shows a typical example)

c) The programmer defines their own modeling code along similar lines as map_classol.* together with classol_sim.*, etcetera. In this code,

  • they define the connectivity matrices between neuron groups. (In the example here those are read from files).

  • they define input patterns (e.g. for Poisson neurons like in the example)

  • they use stepTimeGPU(); to run one time step on the GPU or stepTimeCPU(); to run one on the CPU. (both versions are always compiled). However, mixing the two does not make too much sense. The host version uses the same memory whereto results from the GPU version are copied (see next point)

  • they use functions like copyStateFromDevice(); etcetera to obtain results from GPU calculations.

  • the simulation code is then produced in the following two steps: genn-buildmodel.[sh|bat] ./modelFile.cc and make clean && make

For more details on how to use GeNN, please see documentation.

If you use GeNN in your work, please cite "Yavuz, E., Turner, J. and Nowotny, T. GeNN: a code generation framework for accelerated brain simulations. Scientific Reports, 6. (2016)"