manual:compileandrunaurynsimulations
                Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| manual:compileandrunaurynsimulations [2015/05/13 21:33] – created zenke | manual:compileandrunaurynsimulations [2017/03/13 19:43] (current) – Adds comment string 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 | ||
| + | |||
| + | # Path to Auryn library | ||
| + | AURYNLIB=$(AURYNPATH)/ | ||
| - | 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 30: | 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.1431552797.txt.gz · Last modified: 2015/05/13 21:33 by zenke
                
                