Skip to content

Commit

Permalink
Updated README build instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturner246 committed May 30, 2016
1 parent 579900e commit bceb5d0
Show file tree
Hide file tree
Showing 12 changed files with 273 additions and 284 deletions.
61 changes: 28 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,61 @@ http://genn-team.github.io/genn/documentation/html/d8/d99/Installation.html

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
http://www.visualstudio.com/en-us/downloads. Be sure to click custom
install and select all the Visual C++ tools when installing Visual Studio.
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
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]"`
`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"`
`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%"`
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"`
5. To access a developer command prompt, use the shortcut link in:
start menu -\> all programs -\> Microsoft Visual Studio
-\> Visual Studio Tools -\> 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.

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.
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
the Nvidia CUDA toolkit from:
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.
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`
`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`
`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`
`echo "export PATH=$PATH:$GENN_PATH/lib/bin" >> ~/.bash_profile`

This completes the installation.

Expand Down Expand Up @@ -122,8 +119,7 @@ a) The model in question is defined in a file, say "Model1.cc".

b) this file needs to

- define `DT`
- include `modelSpec.h` and `modelSpec.cc`
- include `modelSpec.h`
- contains the model's definition in the form of a function
`void modelDefinition(NNmodel &model)`
("MBody1.cc") shows a typical example)
Expand Down Expand Up @@ -163,4 +159,3 @@ If you use GeNN in your work, please cite
[@Schmukeretal2014]: http://dx.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]: http://dx.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)"

153 changes: 0 additions & 153 deletions README.txt

This file was deleted.

1 change: 1 addition & 0 deletions README.txt
31 changes: 24 additions & 7 deletions userproject/HHVclampGA_project/README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Genetic algorithm for tracking parameters in a HH model cell
============================================================
Genetic algorithm for tracking parameters in a HH model cell
============================================================

This example simulates a population of Hodgkin-Huxley neuron models on the GPU and evolves them with a simple
guided random search (simple GA) to mimic the dynamics of a separate Hodgkin-Huxley
Expand All @@ -10,14 +10,18 @@ Eleak, Cmem are modified by a sinusoidal addition (voltage parameters) or factor
protocol 0-6. For protocol 7 all 7 parameters undergo a random walk concurrently.

To compile it, navigate to genn/userproject/HHVclampGA_project and type:
nmake /f WINmakefile

nmake /f WINmakefile

for Windows users, or:
make

make

for Linux, Mac and other UNIX users.


USAGE
-----
USAGE
-----

generate_run <CPU=0, GPU=1> <protocol> <nPop> <totalT> <outdir>

Expand All @@ -36,11 +40,24 @@ CPU_ONLY=0 or CPU_ONLY=1 (default 0): Whether to compile in (CUDA independent) "

An example invocation of generate_run is:

generate_run.exe 1 -1 12 200000 test1

for Windows users, or:

./generate_run 1 -1 12 200000 test1

for Linux, Mac and other UNIX users.

This will simulate nPop= 5000 Hodgkin-Huxley neurons on the GPU which will for 1000 ms be matched to a
Hodgkin-Huxley neuron where the parameter gKd is sinusoidally modulated. The output files will be
written into a directory of the name test1_output, which will be created if it does not yet exist.

Another example of an invocation would be:
./generate_run 0 -1 12 200000 test1 FTYPE=DOUBLE CPU_ONLY=1

generate_run.exe 0 -1 12 200000 test1 FTYPE=DOUBLE CPU_ONLY=1

for Windows users, or:

./generate_run 0 -1 12 200000 test1 FTYPE=DOUBLE CPU_ONLY=1

for Linux, Mac and other UNIX users.
35 changes: 26 additions & 9 deletions userproject/Izh_sparse_project/README.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@

Pulse-coupled Izhikevich network
================================
Pulse-coupled Izhikevich network
================================

This example model is inspired by simple thalamo-cortical network of Izhikevich
with an excitatory and an inhibitory population of spiking neurons that are
randomly connected. It creates a pulse-coupled network with 80% excitatory 20%
inhibitory connections, each connecting to nConn neurons with sparse connectivity.

To compile it, navigate to genn/userproject/Izh_sparse_project and type:
nmake /f WINmakefile

nmake /f WINmakefile

for Windows users, or:
make

make

for Linux, Mac and other UNIX users.


USAGE
-----
USAGE
-----

./generate_run <0(CPU)/1(GPU)/n(GPU n-2)> <nNeurons> <nConn> <gScale> <outdir> <model name> <input factor>
generate_run <0(CPU)/1(GPU)/n(GPU n-2)> <nNeurons> <nConn> <gScale> <outdir> <model name> <input factor>

Mandatory arguments:
CPU/GPU: Choose whether to run the simulation on CPU (`0`), auto GPU (`1`), or GPU (n-2) (`n`).
Expand All @@ -35,7 +39,13 @@ CPU_ONLY=0 or CPU_ONLY=1 (default 0): Whether to compile in (CUDA independent) "

An example invocation of generate_run is:

./generate_run 1 10000 1000 1 outdir Izh_sparse 1.0
generate_run.exe 1 10000 1000 1 outdir Izh_sparse 1.0

for Windows users, or:

./generate_run 1 10000 1000 1 outdir Izh_sparse 1.0

for Linux, Mac and other UNIX users.

This would create a pulse coupled network of 8000 excitatory 2000 inhibitory
Izhikevich neurons, each making 1000 connections with other neurons, generating
Expand All @@ -54,4 +64,11 @@ are not part of the core GeNN definitions and it is the privilege (or burden)
of the user to find their own in their own versions of `generate_run`.

Another example of an invocation would be:
./generate_run 0 10000 1000 1 outdir Izh_sparse 1.0 FTYPE=DOUBLE DEBUG=0 CPU_ONLY=1

generate_run.exe 0 10000 1000 1 outdir Izh_sparse 1.0 FTYPE=DOUBLE DEBUG=0 CPU_ONLY=1

for Windows users, or:

./generate_run 0 10000 1000 1 outdir Izh_sparse 1.0 FTYPE=DOUBLE DEBUG=0 CPU_ONLY=1

for Linux, Mac and other UNIX users.
Loading

0 comments on commit bceb5d0

Please sign in to comment.