GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia C...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.
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/
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.
Ensure that the
CUDA_PATHenvironment variable is defined and points to the location of the Nvidia CUDA toolkit installation; and that the CUDA
bindirectory is included in the path. These can be checked by using:
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%.
binsub-directory of the directory in which GeNN is located to your
PATHvariable. For example, if you extracted GeNN to
SETX PATH "c:\Users\me\GeNN\bin;%PATH%".
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
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.
Ensure that the environment variable
CUDA_PATHis 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:
sh echo "export CUDA_PATH=/usr/local/cuda" >> ~/.bash_profile echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bash_profile
bindirectory 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_profilefor the changes to
.bash_profileto take effect.
For Arch Linux there are GeNN packages available from the AUR.
Install with your AUR helper of choice, like so:
sh 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:
sh yay -S genn_cpu_only
At the moment, the following example projects are provided with GeNN:
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)
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.
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:
The model in question is defined in a file, say
This file needs to
void modelDefinition(NNmodel &model)(
MBody1.cc) shows a typical example)
The programmer defines their own modeling code along similar lines as
MBody1Sim.cc, etcetera. In this code,
stepTime();to run one time step on whatever backend the model was built using.
copyStateFromDevice();etcetera to obtain results from GPU calculations.
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)"