Coder Social home page Coder Social logo

rafaelblevin821 / genn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from genn-team/genn

0.0 0.0 0.0 239.63 MB

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

Home Page: http://genn-team.github.io/

License: GNU General Public License v2.0

CSS 0.56% TeX 0.22% Makefile 0.59% Shell 0.24% C++ 84.76% MATLAB 0.04% Objective-C 0.49% HTML 0.36% Batchfile 0.31% C 7.29% Python 4.98% SWIG 0.12% JavaScript 0.03%

genn's Introduction

Build Status codecov.io DOI

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; and that the CUDA bin directory is included in the path. These can be checked by using: ECHO %CUDA_PATH% and ECHO %PATH% respectively (although they are usully set automatically by the CUDA installer on Windows systems). If not, correct this using: SETX CUDA_PATH "[drive]\Program Files\NVIDIA GPU Computing Toolkit\CUDA[version]" and SETX PATH "%PATH%;%CUDA_PATH%.

  3. Add the bin sub-directory of the directory in which GeNN is located to your PATH variable. For example, if you extracted GeNN to c:\Users\me\GeNN, use: SETX PATH "c:\Users\me\GeNN\bin;%PATH%".

  4. 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 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. Ensure that the environment variable CUDA_PATH is set to the location of your Nvidia CUDA toolkit installation and that the CUDA binary directory is in your path. For example, if your CUDA toolkit was installed to /usr/local/cuda, you can use:

    echo "export CUDA_PATH=/usr/local/cuda" >> ~/.bash_profile
    echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bash_profile
  3. Add GeNN's bin directory to your $PATH variable. For example, if you extracted GeNN to /home/me/genn, you can use: echo "export PATH=$PATH:/home/me/genn/bin" >> ~/.bash_profile

This completes the installation. Note that you must either logout and in again or run source ~/.bash_profile for the changes to .bash_profile to take effect.

ARCH LINUX INSTALL

For Arch Linux there are GeNN packages available from the AUR.

Install with your AUR helper of choice, like so:

yay -S genn

If you do not want CUDA support (i.e. if you don't have an NVIDIA GPU), there is a CPU-only version of the package:

yay -S genn_cpu_only

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 the userproject sub-directory, 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:

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

  2. 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)
  3. The programmer defines their own modeling code along similar lines as MBody1Sim.cc, etcetera. In this code,

    • they define input patterns (e.g. for Poisson neurons like in the example)
    • they use stepTime(); to run one time step on whatever backend the model was built using.
    • 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)"

genn's People

Contributors

neworderofjamie avatar tnowotny avatar jamesturner246 avatar esinyavuz avatar 9inpachi avatar brad-mengchi avatar braintimeexception avatar chanokin avatar kanishk16 avatar alandiamond avatar obaid51 avatar costrau avatar ajc158 avatar ajaysub110 avatar alexdewar avatar mstimberg avatar kernfel avatar lebedov avatar karlhuang007 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.