Coder Social home page Coder Social logo

shailesh-tripathi / genn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from genn-team/genn

1.0 4.0 0.0 21.78 MB

GeNN is a GPU enhanced Neuronal Network simulation environment based on Nvidia CUDA technology.

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

License: GNU General Public License v2.0

XSLT 14.61% C++ 58.85% CSS 2.41% Perl 0.08% HTML 1.45% TeX 0.36% Shell 2.46% Batchfile 0.50% Cuda 16.98% Makefile 1.66% MATLAB 0.48% Objective-C 0.15%

genn's Introduction

  GPU enhanced Neuronal Network (GeNN)
  ====================================

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


  [1] INSTALLING GeNN
  ===================

    [1.1] 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
    then download and install the Nvidia CUDA toolkit from: 
      https://developer.nvidia.com/cuda-downloads

(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) Define VC_PATH as the path to your most recent Visual Studio
installation, e.g.
setx VC_PATH "C:\Program Files (x86)\Microsoft Visual Studio 10.0"

Alternatively you can do one of the following:

  i) Run the vscvsrsall.bat script under Visual C++ directory before
  projects are compiled and run in a given cmd.exe terminal window.

  ii) Alternatively, one can use the shortcut link in:
    start menu -> all programs -> Microsoft Visual Studio ->
    Visual Studio Tools -> Visual Studio Command Prompt
  which will launch an instance of cmd.exe in which the vcvarsall.bat compiler
  setup script has already been executed.

This completes the installation.

NOTE:

    [1.2] LINUX / MAC INSTALL
    -------------------------

(1) Unpack GeNN.zip in a convenient location, then download and install 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.

(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.


  [2] USING GeNN
  ==============

    [2.1] SAMPLE PROJECTS
    ---------------------

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

1: Locust olfactory system example (Nowotny et al. 2005):
2: Izhikevich network receiving Poisson input spike trains:
3: Single compartment Izhikevich neuron(s)
4: Pulse-coupled Izhikevich network
5: Izhikevich network 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.

DEBUGGING:
  The last argument to "generate_run" helper binary, or similar file, enables
  the debugging flags while compiling generateAll.cc under lib/src/ and *.cu
  under individual user project directory, and will run the corresponding
  executables with cuda-gdb consecutively. If you want to skip one of these
  debugging steps, simply press r while on the debugging screen.


    [2.2] 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 
  (i) define "DT" 
  (ii) include "modelSpec.h" and "modelSpec.cc"
  (iii) 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(x, y, z);" to run one time step on the GPU or
    "stepTimeCPU(x, y, z);" 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:
    "buildmodel.[sh/bat] Model1 [DEBUG OFF/ON]" and "make clean && make"

genn's People

Contributors

tnowotny avatar esinyavuz avatar jamesturner246 avatar alandiamond avatar shailesh-tripathi avatar ajc158 avatar lebedov avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  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.