Difference between revisions of "How to build"
(→Building) |
(→HDF5) |
||
Line 47: | Line 47: | ||
You can install it easily using the command <syntaxhighlight lang="bash" inline> sudo apt-get install libhdf5- | You can install it easily using the command <syntaxhighlight lang="bash" inline> sudo apt-get install libhdf5- | ||
dev </syntaxhighlight> or <syntaxhighlight lang="bash" inline> sudo pacman -S hdf5-cpp-fortran </syntaxhighlight>. | dev </syntaxhighlight> or <syntaxhighlight lang="bash" inline> sudo pacman -S hdf5-cpp-fortran </syntaxhighlight>. | ||
+ | |||
+ | Ubuntu places hdf5 libs in a werid folder <code>/usr/lib/x86_64-linux-gnu/hdf5/serial/</code>. | ||
+ | If you get error similar to <code>-lhdf5 not found</code> and you have hdf5 installed, you might have to link the libraries into | ||
+ | a discoverable place, like <code>/usr/lib/</code> or add the above directory to the linker path. | ||
+ | If using cmake, you can add the following line to your CMakeLists.txt | ||
+ | link_directories(/usr/lib/x86_64-linux-gnu/hdf5/serial/) |
Revision as of 14:53, 27 October 2016
Installation
Instalation/requirements
- Clone the repository:
git clone https://gitlab.com/e62Lab/e62numcodes.git
- Go to util and run tests:
1 ./run_tests.sh
- This will check the configuration, resolve dependencies, build and run all tests, check code style and docs.
Building
List of dependencies:
- Build tools, like
cmake >= 2.8.12
,g++ >= 4.8
,make
- Boost
-
doxygen >= 1.8.8
and Graphviz - for drawing SMFL library version 2
- for IO HDF5 library
Out of source builds are preferred. Run
1 mkdir -p build
2 cd build
3 cmake ..
4 make
Note that you only have to run cmake
once, after that only make
is sufficient.
Binaries are placed into bin
folder. Test can be run all at once via make run_all_tests
or individually via eg. make basisfunc_run_tests
.
Linear Algebra
We use Eigen as our matrix library. See here for use reference and documentation. For a quick transition from Matlab see here.
Drawing
Some tests include drawing. We are using SMFL library, which can be installed on most linux systems easly
as sudo apt-get install libsfml-dev
or sudo pacman -S sfml
. After the
installation uncomment a test case in domain_draw_test.cpp
and run make test_domain_draw
to see the visual effect.
Binaries using SFML require additional linker flags -lsfml-graphics -lsfml-window -lsfml-system
, but the makefile should take care of that for you.
HDF5
In order to use IO you need hdf5 library.
You can install it easily using the command sudo apt-get install libhdf5- dev
or sudo pacman -S hdf5-cpp-fortran
.
Ubuntu places hdf5 libs in a werid folder /usr/lib/x86_64-linux-gnu/hdf5/serial/
.
If you get error similar to -lhdf5 not found
and you have hdf5 installed, you might have to link the libraries into
a discoverable place, like /usr/lib/
or add the above directory to the linker path.
If using cmake, you can add the following line to your CMakeLists.txt
link_directories(/usr/lib/x86_64-linux-gnu/hdf5/serial/)