diff --git a/doc/handbook/2_detailedinstall.tex b/doc/handbook/2_detailedinstall.tex index a4b8286eebea4bb8b692590231eaa47dceecc767..e152c7b2341c787f04841f820834de980e44ed9f 100644 --- a/doc/handbook/2_detailedinstall.tex +++ b/doc/handbook/2_detailedinstall.tex @@ -165,19 +165,13 @@ $ ./dune-common/bin/dunecontrol --configure-opts="CXXFLAGS=-fno-strict-aliasing" \end{lstlisting} 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: \begin{lstlisting}[style=Bash] $ # 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 -\end{lstlisting} - -More optimized code, which is typically not usable for standard debugging tasks, can be produced by -\begin{lstlisting}[style=Bash] -$ 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 \end{lstlisting} 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 diff --git a/doc/handbook/4_developingdumux.tex b/doc/handbook/4_developingdumux.tex index c6ee4c559b5f9d83b3dac188f082f0ca936827a9..2d78d850d699794cb75bbba30fce19f7f441dd52 100644 --- a/doc/handbook/4_developingdumux.tex +++ b/doc/handbook/4_developingdumux.tex @@ -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 + \begin{lstlisting}[style=Shell] -BUILDDIR=build-clang -CMAKE_FLAGS="\ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DUG_DIR=./externals/ug-3.12.1" +set(CMAKE_BUILD_TYPE Debug) \end{lstlisting} +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 diff --git a/doc/handbook/installDumux.sh b/doc/handbook/installDumux.sh index 74b14f05cb754c75aab1060ceca63cbc5c6a3d64..0e84314cccdbfc3c9c9a669b892a28aadd0de56e 100644 --- a/doc/handbook/installDumux.sh +++ b/doc/handbook/installDumux.sh @@ -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 "*************************************************"