diff --git a/README.md b/README.md index 46e024117f..ef059644fa 100644 --- a/README.md +++ b/README.md @@ -4,67 +4,123 @@ GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA. -## INSTALLING GeNN +## Installation -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/ +You can download GeNN either as a zip file of a stable release or a +snapshot of the most recent stable version or the unstable development +version using the Git version control system. -### WINDOWS INSTALL +### Downloading a release +Point your browser to https://github.com/genn-team/genn/releases +and download a release from the list by clicking the relevant source +code button. After downloading continue to install GeNN as described in the [GitHub installing section](#installing-genn) below. -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. +### Obtaining a Git snapshot -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: - ```sh - echo "export CUDA_PATH=/usr/local/cuda" >> ~/.bash_profile - echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bash_profile - ``` - -4. 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](https://aur.archlinux.org/packages/?O=0&K=genn). - -Install with your AUR helper of choice, like so: -```sh -yay -S genn +If it is not yet installed on your system, download and install Git +(http://git-scm.com/). Then clone the GeNN repository from Github +```bash +git clone https://github.com/genn-team/genn.git ``` - -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 -``` - -## USING GeNN - -### SAMPLE PROJECTS - -At the moment, the following example projects are provided with GeNN: +The github url of GeNN in the command above can be copied from the +HTTPS clone URL displayed on the GeNN Github page (https://github.com/genn-team/genn). + +This will clone the entire repository, including all open branches. +By default git will check out the master branch which contains the +source version upon which the next release will be based. There are other +branches in the repository that are used for specific development +purposes and are opened and closed without warning. + +### Installing GeNN + +Installing GeNN comprises a few simple steps [^1] to create the GeNN +development environment: + +[^1]: While GeNN models are normally simulated using CUDA on NVIDIA GPUs, if you want to use GeNN on a machine without an NVIDIA GPU, you can skip steps v and vi and use GeNN in "CPU_ONLY" mode. + +1. If you have downloaded a zip file, unpack GeNN.zip in a convenient + location. Otherwise enter the directory where you downloaded the Git + repository. + +2. Add GeNN's 'bin' directory to your path, e.g. if you are running Linux or Mac OS X and extracted/downloaded GeNN to + ``$HOME/GeNN``, this can be done with: + ```bash + export PATH=$PATH:$HOME/GeNN/bin + ``` + to make this change persistent, this can be added to your login script (e.g. `.profile` or `.bashrc`) using your favourite text editor or with: + ```bash + echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bash_profile + ``` + If you are using Windows, the easiest way to modify the path is + by using the 'Environment variables' GUI, which can be accessed by clicking start and searching for + (by starting to type) 'Edit environment variables for your account'. + In the upper 'User variables' section, scroll down until you see 'Path', + select it and click 'Edit'. + Now add a new directory to the path by clicking 'New' in the 'Edit environment variable' window e.g.: + ![Screenshot of windows edit environment variable window](/doxygen/images/path_windows.png) + if GeNN is installed in a sub-directory of your home directory (``%USERPROFILE%`` is an environment variable which points to the current user's home directory) called ``genn``. + +3. Install the C++ compiler on the machine, if not already present. + For Windows, download Microsoft Visual Studio Community Edition from + https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx. + When installing Visual Studio, one should select the 'Desktop + development with C++' configuration. + Mac users should download and set up Xcode from + https://developer.apple.com/xcode/index.html + , Linux users should install the GNU compiler collection gcc and g++ + from their Linux distribution repository, or alternatively from + https://gcc.gnu.org/index.html + +4. If your machine has a GPU and you haven't installed CUDA already, + obtain a fresh installation of the NVIDIA CUDA toolkit from + https://developer.nvidia.com/cuda-downloads + Again, be sure to pick CUDA and C++ compiler versions which are compatible + with each other. The latest C++ compiler need not necessarily be + compatible with the latest CUDA toolkit. + +5. GeNN uses the ``CUDA_PATH`` environment variable to determine which + version of CUDA to build against. On Windows, this is set automatically when + installing CUDA. However, if you choose, you can verify which version is + selected by looking for the ``CUDA_PATH`` environment variable in the lower 'System variables' section of the GUI you used to configure the path: + ![Screenshot of windows edit environment variable window](/doxygen/images/cuda_path_windows.png) + here, CUDA 10.1 and 11.4 are installed and CUDA 11.4 is selected via ``CUDA_PATH``. + However, on Linux and Mac you need to set ``CUDA_PATH`` manually with: + ```bash + export CUDA_PATH=/usr/local/cuda + ``` + assuming CUDA is installed in /usr/local/cuda (the standard location + on Ubuntu Linux). Again, to make this change persistent, this can + be added to your login script (e.g. ``.profile`` or ``.bashrc``) + +This normally completes the installation. Windows users must close +and reopen their command window so changes to the path take effect. + +If you are using GeNN in Windows, the Visual Studio development +environment must be set up within every instance of the CMD.EXE command +window used. One can open an instance of CMD.EXE with the development +environment already set up by navigating to Start - All Programs - +Microsoft Visual Studio - Visual Studio Tools - x64 Native Tools Command Prompt. You may also wish to +create a shortcut for this tool on the desktop, for convenience. + +## Usage + +### Sample projects + +At the moment, the following C++ example projects are provided with GeNN: - Self-organisation with STDP in the locust olfactory system \([Nowotny et al. 2005][@Nowotnyetal2005]\): - with all-to-all connectivity, using built-in neuron and synapse models \(for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016]\) - with sparse connectivity for some synapses, using user-defined neuron-and synapse models \(for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016]\) - - using INDIVIDUALID scheme - - using delayed synapses + - using BITMASK connectivity + - using synapses with axonal delays - Pulse-coupled network of Izhikevich neurons \([Izhikevich 2003][@Izhikevich2003]\) (for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016]) - 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][@Schmukeretal2014]\) +- Cortical microcircuit model \([Potjans et al. 2014][@Potjans2014]\) + - 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 @@ -72,21 +128,82 @@ At the moment, the following example projects are provided with GeNN: 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` +## Simulating a new model + +The sample projects listed above are already quite highly integrated examples. If you wanted to use GeNN to develop a new C++ model, you would do the following: + +1. The neuronal network of interest is defined in a model definition file, + e.g. ``Example1.cc``. + +2. Within the the model definition file ``Example1.cc``, the following tasks + need to be completed: + + 1. The GeNN file ``modelSpec.h`` needs to be included, + ```c++ + #include "modelSpec.h" + ``` + + 2. The values for initial variables and parameters for neuron and synapse + populations need to be defined, e.g. + ```c++ + NeuronModels::PoissonNew::ParamValues poissonParams( + 10.0); // 0 - firing rate + ``` + would define the (homogeneous) parameters for a population of Poisson + neurons [^2]. + [^2]: The number of required parameters and their meaning is defined by the + neuron or synapse type. Refer to the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html) for details. We recommend, however, to use comments like + in the above example to achieve maximal clarity of each parameter's + meaning. + + If heterogeneous parameter values are required for a particular + population of neurons (or synapses), they need to be defined as "variables" + rather than parameters. See the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html) for how to define new neuron (or synapse) types and the [Variable initialisation](https://genn-team.github.io/genn/documentation/4/html/d4/dc6/sectVariableInitialisation.html) section for more information on + initialising these variables to hetererogenous values. + + 3. The actual network needs to be defined in the form of a function + ``modelDefinition`` [^3], i.e. + ```c++ + void modelDefinition(ModelSpec &model); + ``` + [^3]: The name ``modelDefinition`` and its parameter of type ``ModelSpec&`` + are fixed and cannot be changed if GeNN is to recognize it as a + model definition. + + 4. Inside ``modelDefinition()``, The time step ``DT`` needs to be defined, e.g. + ```c++ + model.setDT(0.1); + ``` + \note + All provided examples and pre-defined model elements in GeNN work with + units of mV, ms, nF and uS. However, the choice of units is entirely + left to the user if custom model elements are used. + + [MBody1.cc](userproject/MBody1_project/model/MBody1.cc) shows a typical example of a model definition function. In + its core it contains calls to ``ModelSpec::addNeuronPopulation`` and + ``ModelSpec::addSynapsePopulation`` to build up the network. For a full range + of options for defining a network, refer to the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html). + +3. The programmer defines their own "simulation" code similar to + the code in [MBody1Sim.cc](userproject/MBody1_project/model/MBody1Sim.cc). In this code, + + 1. They can manually define the connectivity matrices between neuron groups. + Refer to the \ref subsect34 section for the required format of + connectivity matrices for dense or sparse connectivities. + + 2. They can define input patterns or individual initial values for neuron and + / or synapse variables. + \note + The initial values or initialisation "snippets" given in the ``modelDefinition`` are automatically applied. + + 3. They use ``stepTime()`` to run one time step on either the CPU or GPU depending on the options passed to genn-buildmodel. + + 4. They use functions like ``copyStateFromDevice()`` etc to transfer the + results from GPU calculations to the main memory of the host computer + for further processing. + + 5. They analyze the results. In the most simple case this could just be + writing the relevant data to output files. For more details on how to use GeNN, please see [documentation](http://genn-team.github.io/genn/). @@ -97,6 +214,8 @@ If you use GeNN in your work, please cite "Yavuz, E., Turner, J. and Nowotny, T. [@Nowotnyetal2005]: https://doi.org/10.1007/s00422-005-0019-7 "Nowotny, T., Huerta, R., Abarbanel, H. D. & Rabinovich, M. I. Self-organization in the olfactory system: one shot odor recognition in insects. Biological cybernetics 93, 436–446 (2005)" +[@Potjans2014]: https://doi.org/10.1093/cercor/bhs358 "Potjans, T. C., & Diesmann, M. The Cell-Type Specific Cortical Microcircuit: Relating Structure and Activity in a Full-Scale Spiking Network Model. Cerebral Cortex, 24(3), 785–806 (2014)" + [@Schmukeretal2014]: https://doi.org/10.1073/pnas.1303053111 "Schmuker, M., Pfeil, T. and Nawrot, M.P. A neuromorphic network for generic multivariate data classification. Proceedings of the National Academy of Sciences, 111(6), pp.2081-2086 (2014)" [@Yavuzetal2016]: https://doi.org/10.1038%2Fsrep18854 "Yavuz, E., Turner, J. and Nowotny, T. GeNN: a code generation framework for accelerated brain simulations. Scientific reports, 6. (2016)" diff --git a/doxygen/01_Installation.dox b/doxygen/01_Installation.dox index 35a10d2a17..b3f5368574 100644 --- a/doxygen/01_Installation.dox +++ b/doxygen/01_Installation.dox @@ -8,10 +8,7 @@ version using the Git version control system. \section Downloading Downloading a release Point your browser to \a https://github.com/genn-team/genn/releases and download a release from the list by clicking the relevant source -code button. Note that GeNN is only distributed in the form of source -code due to its code generation design. Binary distributions would not -make sense in this framework and hence are not provided. -After downloading continue to install GeNN as described in the \ref installing section below. +code button. After downloading continue to install GeNN as described in the \ref installing section below. \section GitSnapshot Obtaining a Git snapshot @@ -29,10 +26,6 @@ source version upon which the next release will be based. There are other branches in the repository that are used for specific development purposes and are opened and closed without warning. -An alternative to using git is to download the full content of -GeNN sources by clicking on the "Download ZIP" button on the bottom right -of the GeNN Github page (\a https://github.com/genn-team/genn). - \section installing Installing GeNN Installing GeNN comprises a few simple steps to create the GeNN @@ -44,29 +37,30 @@ While GeNN models are normally simulated using CUDA on NVIDIA GPUs, if you want location. Otherwise enter the directory where you downloaded the Git repository. -(ii) Add GeNN's "bin" directory to your path, e.g. if you are running Linux or Mac OS X and extracted/downloaded GeNN to - $HOME/GeNN, then you can add: +(ii) Add GeNN's 'bin' directory to your path, e.g. if you are running Linux or Mac OS X and extracted/downloaded GeNN to + $HOME/GeNN, this can be done with: \code export PATH=$PATH:$HOME/GeNN/bin \endcode - to your login script (e.g. `.profile` or `.bashrc`). If you are using - WINDOWS, the path should be a windows path as it will be - interpreted by the Visual C++ compiler `cl`, and environment - variables are best set using `SETX` in a Windows cmd window. - To do so, open a Windows cmd window by typing `cmd` in the search - field of the start menu, followed by the `enter` key. - In the `cmd` window type: + to make this change persistent, this can be added to your login script (e.g. `.profile` or `.bashrc`) using your favourite text editor or with: \code - setx PATH "C:\Users\me\GeNN\bin;%PATH%" - \endcode - where `C:\Users\me\GeNN` is the path to your GeNN directory. + echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bash_profile + \endcode. + If you are using Windows, the easiest way to modify the path is + by using the 'Environment variables' GUI, which can be accessed by clicking start and searching for + (by starting to type) 'Edit environment variables for your account'. + In the upper 'User variables' section, scroll down until you see 'Path', + select it and click 'Edit'. + Now add a new directory to the path by clicking 'New' in the 'Edit environment variable' window e.g.: + \image html path_windows.png + \image latex path_windows.png width=10cm + if GeNN is installed in a sub-directory of your home directory (`%USERPROFILE%` is an environment variable which points to the current user's home directory) called `genn`. (iv) Install the C++ compiler on the machine, if not already present. For Windows, download Microsoft Visual Studio Community Edition from \a https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx. When installing Visual Studio, one should select the 'Desktop - development with C++' configuration and the 'Windows 8.1 SDK' and 'Windows - Universal CRT' individual components. + development with C++' configuration. Mac users should download and set up Xcode from \a https://developer.apple.com/xcode/index.html , Linux users should install the GNU compiler collection gcc and g++ @@ -80,24 +74,23 @@ repository. with each other. The latest C++ compiler need not necessarily be compatible with the latest CUDA toolkit. -(vi) Set the `CUDA_PATH` variable if it is not already set by the - system, by putting +(vi) GeNN uses the `CUDA_PATH` environment variable to determine which + version of CUDA to build against. On Windows, this is set automatically when + installing CUDA. However, if you choose, you can verify which version is + selected by looking for the `CUDA_PATH` environment variable in the lower 'System variables' section of the GUI you used to configure the path: + \image html cuda_path_windows.png + \image latex cuda_path_windows.png width=10cm + here, CUDA 10.1 and 11.4 are installed and CUDA 11.4 is selected via `CUDA_PATH`. + However, on Linux and Mac you need to set `CUDA_PATH` manually with: \code export CUDA_PATH=/usr/local/cuda \endcode - in your login script (or, if CUDA is installed in a non-standard - location, the appropriate path to the main CUDA directory). - For most people, this will be done by the CUDA install script and - the default value of /usr/local/cuda is fine. In Windows, usually CUDA_PATH - is already set after installing the CUDA toolkit. If not, - set this variable with: - \code - setx CUDA_PATH C:\path\to\cuda - \endcode + assuming CUDA is installed in /usr/local/cuda (the standard location + on Ubuntu Linux). Again, to make this change persistent, this can + be added to your login script (e.g. `.profile` or `.bashrc`) This normally completes the installation. Windows users must close -and reopen their command window to ensure variables set using `SETX` -are initialised. +and reopen their command window so changes to the path take effect. If you are using GeNN in Windows, the Visual Studio development environment must be set up within every instance of the CMD.EXE command @@ -107,15 +100,6 @@ Microsoft Visual Studio - Visual Studio Tools - x64 Native Tools Command Prompt. create a shortcut for this tool on the desktop, for convenience. \section pygenn Installing PyGeNN -Building PyGeNN is a little involved so we recommend installing a prebuilt binary wheel from our Releases page or direct from our build server. - -\subsection pygenn_wheel Installing PyGeNN from binary wheels - - Select a suitable wheel from the Releases page (all wheels are build for CUDA 10 except for on Mac OS which is built for CUDA 9). For example, if you have a Linux system with Python 3.7 you would pick ``pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl``. If you do not have CUDA installed, ignore the CUDA version and pick the wheel that otherwise matches your platform. - - Install the wheel using pip: - \code - pip install pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl - \endcode - \subsection pygenn_source_nix Installing PyGeNN from source on Linux or Mac OSX - Navigate to the GeNN directory and build a dynamic library version of GeNN, directly into the PyGeNN directory with: \code @@ -127,7 +111,7 @@ Building PyGeNN is a little involved so we recommend installing a prebuilt binar \endcode \subsection pygenn_source_windows Installing PyGeNN from source on Windows - - Ensure that you have at least Python 3.5 and Visual Studio 2015 installed (extensions for earlier versions of Python cannot be built using any versions of Visual Studio new enough to support C++11). If you are using Visual Studio 2019, you need at least Python 3.7.5. These instructions assume that the Anaconda platform was used to install Python, but it _should_ be possible to install PyGeNN using suitable versions of Python installed in different way (please let us know if you suceed in doing so!) + - Ensure that you have at least Python 3.5 and Visual Studio 2015 installed (extensions for earlier versions of Python cannot be built using any versions of Visual Studio new enough to compile GeNN). If you are using Visual Studio 2019, you need at least Python 3.7.5. These instructions assume that the Anaconda platform was used to install Python, but it _should_ be possible to install PyGeNN using suitable versions of Python installed in a different way (please let us know if you succeed in doing so!) - This process requires a command prompt with the environment correctly configured for both Visual Studio **and** Anaconda. To create one, launch an "x64 Native Tools Command Prompt" from your chosen version of Visual Studio's start menu folder and _activate_ your chosen version of Anaconda by running the ``activate.bat`` in its ``Scripts`` directory. For example, if your user is called "me" and Anaconda is installed in your home directory, you would run: \code c:\Users\Me\Anaconda3\Scripts\activate.bat c:\Users\Me\Anaconda3 diff --git a/doxygen/03_Examples.dox b/doxygen/03_Examples.dox index cbd7a5be06..b05d0b62b6 100644 --- a/doxygen/03_Examples.dox +++ b/doxygen/03_Examples.dox @@ -35,6 +35,11 @@ Nowotny insect olfaction model: \cite nowotny2005self; Traub-Miles Hodgkin-Huxley neuron model: \cite Traub1991 \n +\section ex_microcircuit Cortical microcircuit model +\verbinclude userproject/PotjansMicrocircuit_project/README.txt +Potjans & Diesmann cortical microcircuit model: \cite Potjans2012 +\n + \section ex_Vclamp Voltage clamp simulation to estimate Hodgkin-Huxley parameters \verbinclude userproject/HHVclampGA_project/README.txt Traub-Miles Hodgkin-Huxley neuron model: \cite Traub1991 diff --git a/doxygen/images/cuda_path_windows.png b/doxygen/images/cuda_path_windows.png new file mode 100644 index 0000000000..5d4725ef86 Binary files /dev/null and b/doxygen/images/cuda_path_windows.png differ diff --git a/doxygen/images/path_windows.png b/doxygen/images/path_windows.png new file mode 100644 index 0000000000..d8826d81b3 Binary files /dev/null and b/doxygen/images/path_windows.png differ diff --git a/pygenn/README.md b/pygenn/README.md index 991b783dbb..7fb83133b3 100644 --- a/pygenn/README.md +++ b/pygenn/README.md @@ -1,10 +1,6 @@ # A Python interface to GeNN -PyGeNN wraps the C++ GeNN API using SWIG, allowing GeNN to be used either directly from Python or as a backend for higher-level Python APIs such as [PyNN](https://github.com/genn-team/pynn_genn). Building PyGeNN is a little involved so we recommend installing a prebuilt binary wheel from our Releases page or direct from our [build server](https://gen-ci.inf.sussex.ac.uk/job/GeNN/job/genn/). +PyGeNN wraps the C++ GeNN API using SWIG, allowing GeNN to be used either directly from Python or as a backend for higher-level Python APIs such as [PyNN](https://github.com/genn-team/pynn_genn). -### Installing PyGeNN from binary wheels - - Select a suitable wheel from the Releases page (all wheels are build for CUDA 10 except for on Mac OS which is built for CUDA 9). For example, if you have a Linux system with Python 3.7 you would pick ``pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl``. If you do not have CUDA installed, ignore the CUDA version and pick the wheel that otherwise matches your platform. - - Install the wheel using pip ``pip install pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl`` - ### Installing PyGeNN from source on Linux or Mac OSX - Either download the latest release of GeNN and extract into your home directory or clone using git from https://github.com/genn-team/genn - Navigate to the GeNN directory and build a dynamic library version of GeNN, directly into the PyGeNN directory using ``make DYNAMIC=1 LIBRARY_DIRECTORY=`pwd`/pygenn/genn_wrapper/``