manual:compileandrunaurynsimulations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
manual:compileandrunaurynsimulations [2015/07/02 18:04] – Adds link to coding style guide zenke | manual:compileandrunaurynsimulations [2016/09/01 20:17] – Adds subsection zenke | ||
---|---|---|---|
Line 2: | Line 2: | ||
You have installed the latest release of Auryn and [[manual: | You have installed the latest release of Auryn and [[manual: | ||
+ | |||
+ | |||
+ | ===== 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 '' | 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 '' | ||
< | < | ||
- | # 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 | + | # Path to Auryn include files |
- | # Path to libauryn.a (see compiling | + | AURYNINC=$(AURYNPATH)/src |
- | BUILDDIR | + | |
- | 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 33: | 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