manual:compileandrunaurynsimulations
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
manual:compileandrunaurynsimulations [2015/05/13 21:33] – created zenke | manual:compileandrunaurynsimulations [2016/09/01 20:17] – Adds subsection 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 | + | You have installed the latest release of Auryn and [[manual: |
- | 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 '' | + | |
+ | ===== Compile with the help of a Makefile ===== | ||
+ | |||
+ | 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 | ||
< | < | ||
- | CC = mpicxx | + | # Update the following lines to your system requirements |
- | AURYNDIR | + | AURYNPATH=$(HOME)/auryn |
- | BUILDDIR | + | |
+ | # Path to Auryn include files | ||
+ | AURYNINC=$(AURYNPATH)/src | ||
- | CFLAGS= -ansi -Wall -pipe -O3 -ffast-math -funsafe-math-optimizations \ | + | # Path to Auryn library |
- | | + | AURYNLIB=$(AURYNPATH)/build/release/src |
- | -I$(AURYNDIR)/src -I$(AURYNDIR)/dev/src | + | |
- | LDFLAGS=-L$(BUILDDIR) -lauryn \ | + | # The following should not require updating in most cases |
- | -lboost_program_options | + | CXX = mpic++ |
+ | CPPFLAGS=-ansi -pipe -O3 -march=native -ffast-math -pedantic -I/ | ||
+ | LDFLAGS=$(AURYNLIB)/ | ||
sim_%: sim_%.o | sim_%: sim_%.o | ||
- | $(CC) $(CFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<) | + | $(CXX) $(CPPFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<) |
%.o : %.cpp | %.o : %.cpp | ||
Line 30: | Line 36: | ||
make sim_new && ./sim_new | make sim_new && ./sim_new | ||
</ | </ | ||
+ | These steps can be conveniently wrapped in a shell script too as has been done here https:// | ||
- | Now you can start modifying '' | + | Now you can start modifying '' |
manual/compileandrunaurynsimulations.txt · Last modified: 2017/03/13 19:43 by zenke