Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


manual:compileauryn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manual:compileauryn [2016/08/16 22:27] – Changes structure of page zenkemanual:compileauryn [2022/08/19 09:24] (current) – [Building Auryn from source] Remove forum link zenke
Line 9: Line 9:
  
  
-===== Meeting the preliminaries =====+===== Requirements =====
  
-Apart from a standard C++ build environment you will need to meet certain requirements. Auryn currently depends on the [[http://www.boost.org/|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. To build Auryn it is recommended to use ''cmake''.+Apart from a standard C++ build environment you will need the [[http://www.boost.org/|Boost libraries]] and a working MPI implementation. See [[required libraries]] for more details. To get the code, I recommend ''git'' and, finally, to build the binaries I recommend ''cmake''
 +With these preliminaries met, you can proceed as follows.
  
- +==== Getting the source with git ==== 
-===== Getting the source with git ===== +First clone Auryn's repository
-If you know how to use git you can simply clone Auryn's repository+
 <code> <code>
 git clone https://github.com/fzenke/auryn.git git clone https://github.com/fzenke/auryn.git
Line 21: Line 21:
 This will create a new directory ''./auryn'' with the source code. This will create a new directory ''./auryn'' with the source code.
  
-===== Getting the source as a zip archive or tar ball ===== 
  
-You can download zips or tar archives of the latest releases from GitHub  [[https://github.com/fzenke/auryn/releases|latest stable release]]. +==== Getting the source as a zip archive or tar ball ==== 
 +Alternatively, if you cannot use git, you can download zips or tar archives of the latest releases from GitHub  [[https://github.com/fzenke/auryn/releases|latest stable release]]. 
  
 To unpack a tgz compressed  archive of a release using for instance tar: To unpack a tgz compressed  archive of a release using for instance tar:
Line 34: Line 34:
 ===== Building Auryn from source ===== ===== 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''). +Once you have downloaded the sourcescompile Auryn using cmake. For this to work you have to install ''cmake'' [[http://www.cmake.org]] (under Debian, Ubuntu, etc -- ''sudo apt-get install cmake''). 
 To build Auryn using cmake simply run: To build Auryn using cmake simply run:
 <code> <code>
Line 41: Line 41:
 </code> </code>
  
-Instead you can also invoke cmake directly:+Instead of the bootstrap script you can also invoke cmake directly as follows
 <code> <code>
 cmake ../../ -DCMAKE_BUILD_TYPE=Release && make cmake ../../ -DCMAKE_BUILD_TYPE=Release && make
Line 48: Line 48:
 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). 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).
  
-Either way you find the library ''libauryn.a'' under ''./src'' and several simulation [[examples:start]] under ''./examples''. By issuing ''make install'', the libraries will be installed to your system default directories (include and lib). In Debian based systems that is most likely ''/usr/local/'' +Either way you will find the compiled library ''libauryn.a'' under ''./src'' and several simulation [[examples:start]] under ''./examples''. By issuing ''make install'', the libraries will be installed to your system default directories (include and lib). In Debian based systems that is most likely ''/usr/local/''However, you do not need to install the library under this path, but instead point the linker to directly when compiling your Auryn simulation  
- +
-**Frustrated??** Newbies are welcome to ask questions in the [[http://www.fzenke.net/auryn/forum/viewforum.php?f=2|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.+
  
  
Line 89: Line 87:
 ====== Building other versions ====== ====== Building other versions ======
  
-==== Auryn development version ====+===== Auryn development version =====
  
 Some of the newest features might only be available in the development version. If you want to compile the development version, simply clone and compile Auryn as follows: Some of the newest features might only be available in the development version. If you want to compile the development version, simply clone and compile Auryn as follows:
Line 99: Line 97:
  
  
 +===== Building Auryn without MPI =====
 +
 +Starting from v0.8 you can build Auryn without MPI if need be. To do so, open the file ''src/auryn/auryn_definitions.h'' and comment out the line:
 +<code c++>
 +#define AURYN_CODE_USE_MPI
 +</code>
 +
 +This will disable any dependence on MPI in the source code. Then in the ''CMakeLists.txt'' file in the Auryn root directory find the line 
 +<code>
 +FIND_PACKAGE(MPI REQUIRED)
 +</code>
 +and comment it out or remove the ''REQUIRED'' part. This should now allow you to build Auryn without MPI support. To that end, follow the instructions to build Auryn from above.
  
-==== Building Auryn with debug symbols (reduces performance) ====+===== Building Auryn with debug symbols (reduces performance) =====
  
 To create a debug run instead use: To create a debug run instead use:
Line 122: Line 132:
 to show compiler warnings. to show compiler warnings.
  
-===== Other ways of building Auryn ===== 
  
-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) ===== ===== Building older versions of Auryn (<v0.7.0) =====
manual/compileauryn.1471386447.txt.gz · Last modified: 2016/08/16 22:27 by zenke