Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


manual:compileandrunaurynsimulations

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
manual:compileandrunaurynsimulations [2015/05/13 21:33] – created zenkemanual:compileandrunaurynsimulations [2016/08/22 17:18] – Adds link to run script zenke
Line 1: Line 1:
 ====== Howto compile, link and run Auryn simulations ====== ====== Howto compile, link and run Auryn simulations ======
  
-Suppose you want to start with modifying the example ''sim_epsp''. First copy the file to a place where you would like to develop your Auryn code. You could for instance create the directory ''~/mycode/'' for that purpose. Start with copying the example there. It is probably a good idea to rename the program too. Let's assume you called it ''sim_new.cpp''+You have installed the latest release of Auryn and [[manual:compileauryn|compiled the library]]. Suppose you now want to start writing your own code. A good way to start is by modifying [[examples:start]]. First copy the file to a place where you would like to develop your Auryn code. You could for instance create the directory ''~/mycode/'' for that purpose. Start with copying the example there (for instance  ''sim_epsp''). It is probably a good idea to rename the program too. Let's assume you called it ''sim_new.cpp''
  
-I like using my own handwritten makefiles (of course you can follow any other approach you feel most comfortable with). To proceed with my approach create a ''Makefile'' with the following contents:+I like using my own handwritten makefiles (of course you can follow any other approach you feel most comfortable with). To proceed with my approach create a file called ''Makefile'' with the following contents:
 <code> <code>
-CC = mpicxx                         # Your shorthand for your MPI C++ compiler +# Your shorthand for your MPI C++ compiler 
-AURYNDIR = /home/yourname/auryn/    Your Auryn install path +CC = mpicxx 
-BUILDDIR = $(AURYNDIR)/build/home   # Path to libauryn.a (see compiling Auryn)+# Your Auryn install path 
 +AURYNDIR = /home/yourname/auryn/ 
 +Path to libauryn.a (see compiling Auryn) 
 +BUILDDIR = $(AURYNDIR)/build/home/
  
 CFLAGS= -ansi -Wall -pipe -O3 -ffast-math -funsafe-math-optimizations \ CFLAGS= -ansi -Wall -pipe -O3 -ffast-math -funsafe-math-optimizations \
Line 30: Line 33:
 make sim_new && ./sim_new make sim_new && ./sim_new
 </code> </code>
 +These steps can be conveniently wrapped in a shell script too as has been done here https://github.com/fzenke/malleable/blob/master/bin/auryn_run.sh.
  
-Now you can start modifying ''sim_new'' and write your own simulations. Happy coding!+Now you can start modifying ''sim_new'' and write your own simulations. If you start to develop new Auryn classes which the advanced user will almost certainly do, you should also checkout the [[coding style guide]]. Happy coding!
manual/compileandrunaurynsimulations.txt · Last modified: 2017/03/13 19:43 by zenke