manual:compileandrunaurynsimulations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
manual:compileandrunaurynsimulations [2015/07/02 18:04] – Adds link to coding style guide zenke | manual:compileandrunaurynsimulations [2017/03/13 19:43] (current) – Adds comment string 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)/ |
- | # Your Auryn install path | + | |
- | AURYNDIR | + | # Path to Auryn include files |
- | # Path to libauryn.a (see compiling | + | AURYNINC=$(AURYNPATH)/src |
- | BUILDDIR | + | |
+ | # Path to Auryn library | ||
+ | AURYNLIB=$(AURYNPATH)/build/release/src | ||
- | CFLAGS= -ansi -Wall -pipe -O3 -ffast-math -funsafe-math-optimizations \ | + | # The following should not require updating in most cases |
- | | + | CXX = mpicxx |
- | | + | CXXFLAGS=-ansi -pipe -O3 -march=native -ffast-math |
+ | LDFLAGS=$(AURYNLIB)/libauryn.a -lboost_filesystem -lboost_system -lboost_program_options -lboost_mpi -lboost_serialization | ||
- | LDFLAGS=-L$(BUILDDIR) -lauryn \ | + | # Add your simulation' |
- | | + | all: sim_new |
sim_%: sim_%.o | sim_%: sim_%.o | ||
- | $(CC) $(CFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<) | + | $(CXX) $(CXXFLAGS) $< $(LDFLAGS) -o $(subst .o,,$<) |
%.o : %.cpp | %.o : %.cpp | ||
- | $(CC) $(CFLAGS) -c $< | + | $(CXX) $(CXXFLAGS) -c $< |
</ | </ | ||
Here you might need to update the first three lines if something does not work for you. The first line is the shorthand for you MPI C++ compiler, the second line is the path the root directory where you keep Auryn. Finally, in the third we set the directory where you keep '' | Here you might need to update the first three lines if something does not work for you. The first line is the shorthand for you MPI C++ compiler, the second line is the path the root directory where you keep Auryn. Finally, in the third we set the directory where you keep '' | ||
Line 33: | Line 39: | ||
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.1435860263.txt.gz · Last modified: 2015/07/02 18:04 by zenke