Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


manual:compileauryn

This is an old revision of the document!


For most practical cases compiling Auryn is hardly going to be that difficult, but there are a few things to keep in mind.

Getting and compiling Auryn

To compile and run Auryn download and unpack the source from GitHub. You can either download a release version or clone either the master branch or a more recent development version.

Meeting the preliminaries

Apart from a standard C++ build environment you will need to meet certain requirements. Auryn currently depends on the Boost libraries and on an MPI implementation (for parallel computation). Note, that even if you do not need parallel processing, the current code base still requires you to compile against it. I am planning to change that in the foreseeable future, but it hasn't been done yet. See required libraries for more details.

Getting the source

Download the most recent development version or the latest stable release from GitHub. Auryn requires a few standard libraries in place required libraries.

To unpack a tgz compressed archive of a release using for instance tar:

tar -xzf auryn-XY.tar.gz

where XY is the respective version number.

Getting the master branch with git

You can either download a zipped file with the development branch from here or clone it using git (for this you will obviously need to have git installed). To clone the develop branch run

git clone https://github.com/fzenke/auryn.git

This will create a new directory ./auryn with the source code.

Building Auryn from source

To facilitate compiling Auryn on other systems, Auryn uses the cmake build system. For this to work you have to install cmake http://www.cmake.org (under Debian, Ubuntu, etc – sudo apt-get install cmake). It is currently being set up in the develop branch on GitHub.

Compiling examples and simulator using cmake

To compile the Auryn library and examples create a directory build/release or similar in your Auryn root. Then cd to this directory and invoke cmake ../../ -DCMAKE_BUILD_TYPE=Release where the path should be the relative path to your Auryn root directory. This will automatically create a set of Makefiles which you can then use to compile Auryn on your system. Taken together you can run

cmake ../../ -DCMAKE_BUILD_TYPE=Release && make

you find the library libauryn.a under ./src and several simulation examples under ./examples. If you want to specify an install prefix add the option -DCMAKE_INSTALL_PREFIX:PATH=/path/you/want to cmake. The Built type option will make sure that the library is built with compiler flags that make use of hardware optimizations (i.e. -O3 -DNDEBUG -march=native -ffast-math).

Frustrated?? Newbies are welcome to ask questions in the support forum. Unfortunately you need to register because of the spam flood the forum got in the past. Using an academic e-mail address will speed up the registration process.

Building a Auryn with debug symbols (reduces performance)

To create a debug run instead use:

cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make

This will turn off all optimizations and compile all binaries with the “-g” (at least for gcc that's the one).

People hacking the simulator code will probably want to enable the -Wall option. To do so modify the file CMakeLists.txt in the Auryn root and uncomment the line add_definitions(-Wall). Then compile the code in your build directory using

cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make VERBOSE=1

to show compiler warnings.

Different ways of building Auryn

Autotools version of Auryn (configure && make)

The github user sanjayankur31 maintains an autotool version of Auryn with the standard gnu build toolchain (i.e. configure and make) which can be found here https://github.com/sanjayankur31/auryn/tree/autotoolize

Building older versions of Auryn (<v0.7.0)

See instructions here.

After compilation

If you compiled Auryn using the existing Makefile (the old way) you can test the setup by issuing from within the build/home directory (if you used cmake you will find the examples under build/examples)

make sim_poisson && ./sim_poisson

which will compile the example code sim_poisson and generate the following output

[=========================] 100%      t=1.0 s  f=45.3 Hz  
( 0) Freeing ...

This tells you that the simulations called sim_poisson has finished simulating one second of 1000 poisson processes. You find three new files poisson.* in the same directory

[...]
380 -rw-r--r-- 1 zenke lcn1 383240 Dec  9 15:13 sim_isp_big.o
688 -rwxr-xr-x 1 zenke lcn1 699695 Dec  9 15:13 sim_isp_big
 76 -rw-r--r-- 1 zenke lcn1  69702 Dec  9 15:43 poisson.0.ras
  0 -rw-r--r-- 1 zenke lcn1     36 Dec  9 15:43 poisson.0.prate
  4 -rw-r--r-- 1 zenke lcn1    809 Dec  9 15:43 poisson.0.log

These are the output files of the simulation. Their meaning is described in more detail in the examples section.

Generate Doxygen code documentation

Now might be a good time to also compile the doxygen docs.

Building your own simulations/programs

See the CompileAndRunAurynSimulations guide to see how you can conveniently link your own simulations against the Auryn library.

manual/compileauryn.1464798223.txt.gz · Last modified: 2016/06/01 16:23 by zenke