manual:compileauryn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
manual:compileauryn [2016/06/01 16:18] – Adds Alex's version of the Auryn compilement saga (img) zenke | manual:compileauryn [2018/02/28 17:52] – [Building Auryn from source] typo zenke | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{ : | + | {{ : |
- | For most practical | + | In most cases, compiling Auryn is hardly going to be that difficult, but there are a few things to keep in mind. |
====== Getting and compiling Auryn ====== | ====== Getting and compiling Auryn ====== | ||
Line 8: | Line 8: | ||
- | ===== Getting the source ===== | ||
- | Download the most recent [[https:// | + | ===== Requirements ===== |
- | To unpack | + | Apart from a standard C++ build environment you will need the [[http://www.boost.org/|Boost libraries]] and a working MPI implementation. See [[required libraries]] for more details. To get the code, I recommend '' |
- | < | + | With these preliminaries met, you can proceed as follows. |
- | tar -xzf auryn-XY.tar.gz | + | |
- | </code> | + | |
- | where XY is the respective version number. | + | |
- | + | ||
- | + | ||
- | ==== Getting the master branch with git ==== | + | |
- | You can either download a zipped file with the development branch from [[https:// | + | ==== Getting the source |
+ | First clone Auryn' | ||
< | < | ||
git clone https:// | git clone https:// | ||
Line 28: | Line 22: | ||
- | ===== Building Auryn from source | + | ==== Getting the source |
- | + | Alternatively, | |
- | To facilitate compiling Auryn on other systems, Auryn uses the cmake build system. For this to work you have to install '' | + | |
- | + | ||
- | + | To unpack | |
- | ==== Compiling examples and simulator using cmake ==== | + | |
- | + | ||
- | To compile the Auryn library and examples create | + | |
< | < | ||
- | cmake ../../ -DCMAKE_BUILD_TYPE=Release && make | + | tar -xzf auryn-XY.tar.gz |
</ | </ | ||
- | you find the library '' | + | where XY is the respective version number. |
- | **Frustrated?? | ||
- | ==== Building | + | ===== Building Auryn from source ===== |
- | To create a debug run instead use: | + | Once you have downloaded the sources, compile Auryn using cmake. For this to work you have to install '' |
+ | To build Auryn using cmake simply | ||
< | < | ||
- | cmake ../../ -DCMAKE_BUILD_TYPE=Debug | + | cd auryn/ |
+ | ./bootstrap.sh && make | ||
</ | </ | ||
- | This will turn off all optimizations and compile all binaries with the " | ||
- | People hacking | + | Instead of the bootstrap script you can also invoke cmake directly as follows |
< | < | ||
- | cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make VERBOSE=1 | + | cmake ../../ -DCMAKE_BUILD_TYPE=Release |
</ | </ | ||
- | to show compiler warnings. | ||
- | ===== Different ways of building Auryn ===== | + | If you want to specify an install prefix add the option '' |
- | ==== Autotools version of Auryn (configure && | + | Either way you will find the compiled library '' |
- | The github user sanjayankur31 maintains an autotool version of Auryn with the standard gnu build toolchain (i.e. configure and make) which can be found here | + | **Frustrated?? |
- | [[https://github.com/ | + | |
- | + | ||
- | ==== Building older versions of Auryn (<v0.7.0) ==== | + | |
- | See instructions [[BuildWithMakefile|here]]. | + | |
- | ===== After compilation | + | ===== Running a test ===== |
If you compiled Auryn using the existing Makefile (the old way) you can test the setup by issuing from within the '' | If you compiled Auryn using the existing Makefile (the old way) you can test the setup by issuing from within the '' | ||
< | < | ||
Line 98: | Line 81: | ||
- | ===== Building your own simulations/ | + | ==== Building your own simulations/ |
See the [[CompileAndRunAurynSimulations]] guide to see how you can conveniently link your own simulations against the Auryn library. | See the [[CompileAndRunAurynSimulations]] guide to see how you can conveniently link your own simulations against the Auryn library. | ||
+ | |||
+ | |||
+ | |||
+ | ====== Building other versions ====== | ||
+ | |||
+ | ===== Auryn development version ===== | ||
+ | |||
+ | Some of the newest features might only be available in the development version. If you want to compile the development version, simply clone and compile Auryn as follows: | ||
+ | < | ||
+ | git clone -b develop https:// | ||
+ | cd auryn/ | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Building Auryn without MPI ===== | ||
+ | |||
+ | Starting from v0.8 you can build Auryn without MPI if need be. To do so, open the file '' | ||
+ | <code c++> | ||
+ | #define AURYN_CODE_USE_MPI | ||
+ | </ | ||
+ | |||
+ | This will disable any dependence on MPI in the source code. Then in the '' | ||
+ | < | ||
+ | FIND_PACKAGE(MPI REQUIRED) | ||
+ | </ | ||
+ | and comment it out or remove the '' | ||
+ | |||
+ | ===== Building Auryn with debug symbols (reduces performance) ===== | ||
+ | |||
+ | To create a debug run instead use: | ||
+ | < | ||
+ | cd build/debug | ||
+ | cmake ../../ -DCMAKE_BUILD_TYPE=Debug | ||
+ | make | ||
+ | </ | ||
+ | or alternatively | ||
+ | < | ||
+ | cd build/debug | ||
+ | ./bootstrap && make | ||
+ | </ | ||
+ | |||
+ | This will turn off all optimizations and compile all binaries with the " | ||
+ | |||
+ | People hacking the simulator code will probably want to enable the -Wall option. To do so modify the file '' | ||
+ | < | ||
+ | cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make VERBOSE=1 | ||
+ | </ | ||
+ | to show compiler warnings. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Building older versions of Auryn (< | ||
+ | See instructions [[BuildWithMakefile|here]]. | ||
+ | |||
+ | |||
manual/compileauryn.txt · Last modified: 2022/08/19 09:24 by zenke