Commit cdb21e77 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/handbook-build-guide' into 'master'

[doc][handbook] do not mention debug opts

See merge request !1433
parents 42a4f9a8 8169ce21
......@@ -165,19 +165,13 @@ $ ./dune-common/bin/dunecontrol --configure-opts="CXXFLAGS=-fno-strict-aliasing"
Too many options can make life hard. That's why usually option files are being used together with \texttt{dunecontrol} and its sub-tools.
Larger sets of options are kept in them. If you are going to compile with options suited for debugging the code, the following
Larger sets of options are kept in them. If you are going to compile with modified options, the following
can be a starting point:
$ # make sure you are in the common root directory
$ cp dumux/debug.opts my-debug.opts # create a personal version
$ gedit my-debug.opts # optional editing the options file
$ ./dune-common/bin/dunecontrol --opts=my-debug.opts --use-cmake all
More optimized code, which is typically not usable for standard debugging tasks, can be produced by
$ cp dumux/optim.opts my-optim.opts
$ ./dune-common/bin/dunecontrol --opts=my-optim.opts --use-cmake all
$ cp dumux/cmake.opts my-cmake.opts # create a personal version
$ gedit my-cmake.opts # optional editing the options file
$ ./dune-common/bin/dunecontrol --opts=my-cmake.opts all
Sometimes, it is necessary to have additional options which
......@@ -257,7 +251,7 @@ Make sure that it uses the same library as \Dune when configuring the external l
Some of the libraries are then compiled within that directory and are not installed in
a different place, but \Dune may need to know their location. Thus, one may have to refer to
them as options for \texttt{dunecontrol}, for example via the options file \texttt{my-debug.opts}.
them as options for \texttt{dunecontrol}, for example via the options file \texttt{my-cmake.opts}.
Make sure you compile the required external libraries before you run \texttt{dunecontrol}.
An easy way to install some of the libraries and modules given below is the
......@@ -36,23 +36,18 @@ For the style guide and instructions how to contribute to \Dumux visit
\Dumux users and developers at the LH2 are also referred to the internal Wiki for
more information.
\paragraph{Option Files optim.opts and debug.opts}
\paragraph{Optimized computation vs debugging}
\Dune and \Dumux are built with the help of \texttt{dunecontrol}, as explained on page \pageref{buildIt}.
The options needed to be specified for that are provided using option files like
\texttt{debug.opts} and \texttt{optim.opts}. These two compile \Dune and \Dumux
either for debugging or for fast simulation. Programs compiled with optimization options
can lead to a speedup of factor up to ten!\par
In contrast programs that are compiled with optimization can hardly be debugged.
You can modify the files and change the compiler, the name of the build director,
add third-party dependencies, add additional compiler flags, ... .
Per default, \Dumux is compiled using optimization options, which leads to faster runtimes but is unsuitable
for debugging. For debug opts you can set \texttt{DCMAKE_BUILD_TYPE} to \texttt{Debug} or \texttt{RelWithDebInfo}
in your options file. You can also do this in any of the \texttt{CMakeLists.txt} in Dumux by adding
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
Afterwarde rerun cmake again (run cmake <path-to-build-dir>).
\paragraph{Dunecontrol for selected modules}
A complete build using \texttt{dunecontrol} takes some time. In many cases not all modules need to be re-built.
Pass the flag \texttt{--only=dumux} to \texttt{dunecontrol} for configuring or building only \Dumux. A more
......@@ -42,7 +42,7 @@ echo "(2/2) Configure dune modules and dumux. Build the
dune libaries. This may take several minutes."
echo "*************************************************"
# run build
./dune-common/bin/dunecontrol --opts=dumux/optim.opts all
./dune-common/bin/dunecontrol --opts=dumux/cmake.opts all
if [ $? -ne 0 ]; then
echo "*************************************************"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment