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

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
manual:compileandrunaurynsimulations [2015/06/13 06:52] zenkemanual:compileandrunaurynsimulations [2016/09/01 20:17] – Updates Makefile template to match Auryn v0.8.0 reqs zenke
Line 5: Line 5:
 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: 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>
-Your shorthand for your MPI C++ compiler +Update the following lines to your system requirements 
-CC = mpicxx +AURYNPATH=$(HOME)/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 \ +# Path to Auryn include files 
-        -march=native -mtune=native -pedantic \ +AURYNINC=$(AURYNPATH)/src
-        -I$(AURYNDIR)/src -I$(AURYNDIR)/dev/src+
  
-LDFLAGS=-L$(BUILDDIR) -lauryn \ +# Path to Auryn library 
-        -lboost_program_options -lboost_serialization -lboost_mpi+AURYNLIB=$(AURYNPATH)/build/release/src 
 + 
 +# The following should not require updating in most cases  
 +CXX = mpic++ 
 +CPPFLAGS=-ansi -pipe -O3 -march=native -ffast-math -pedantic -I/usr/include -I$(AURYNINC) 
 +LDFLAGS=$(AURYNLIB)/libauryn.a -lboost_filesystem -lboost_system -lboost_program_options -lboost_mpi -lboost_serialization
  
 sim_%: sim_%.o sim_%: sim_%.o
-    $(CC) $(CFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<)+    $(CXX) $(CPPFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<)
  
 %.o : %.cpp %.o : %.cpp
Line 33: 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