install.tex 26.1 KB
 Klaus Mosthaf committed Oct 13, 2010 1 2 \section{Installation of \Dumux} \label{install} \subsection{Preliminary remarks} Klaus Mosthaf committed Oct 12, 2010 3 David Werner committed Jan 17, 2011 4 5 6 7 8 9 In this section about installation it is assumed that you work on a UNIX or Linux compatible operating system and that you are familiar with the use of a shell command-line. You also should know how to install new software packages or you should have a person aside which can give you assistance with the shell command-line and package installation. Below in section \ref{sec:prerequisites} we list prerequisites for running \Dune and \Dumux. Please check this paragraph whether you can fulfill them. In addition in section \ref{sec:external-modules-libraries} some details on optional libraries and modules are given. \\ Klaus Mosthaf committed Oct 12, 2010 10 David Werner committed Jan 19, 2011 11 12 13 Installation here means that you unpack \Dune together with \Dumux in a certain directory. You than compile it in that directory tree and do you further working on there too. Files do not get installed into a different place.\\ Klaus Mosthaf committed Oct 28, 2010 14 In a technical sense \Dumux is a module of \Dune. David Werner committed Jan 17, 2011 15 That's why the installation procedure of \Dumux is the same as that of \Dune. David Werner committed Jan 19, 2011 16 The details regarding the installation of \Dune are provided by \Dune website \cite{DUNE-INST}. David Werner committed Jan 17, 2011 17 18 If you are interested in more details of the build system, we use below, they are given in {\Dune}'s Build System Howto \cite{DUNE-BS}.\\ Klaus Mosthaf committed Oct 12, 2010 19 David Werner committed Jan 13, 2011 20 David Werner committed Jan 19, 2011 21 As for a \Dune installation, all \Dune modules including \Dumux get extracted into a common directory. We refer to that directory for purpose of documentation abstractly as {\Dune} root directory or shortly as {\Dune}-Root or if it is used in directory path's of a shell command it is typed as \texttt{\Dune-Root}. For the real {\Dune} root directory in filesystem any valid directory name can be name chosen.\\ David Werner committed Jan 13, 2011 22 David Werner committed Jan 19, 2011 23 Source code files for each \Dune module are contained in their own subdirectory within {\Dune}-Root. David Werner committed Jan 17, 2011 24 25 26 We name this directory of a certain module, module's root directory" or \texttt{module-root-directory} in directory path's, e.g. for module \texttt{dumux} these names are dumux' root directory" respective \texttt{dumux-root-directory}. The real directory names for modules can be chosen arbitrary, in this manual they are the same as the David Werner committed Jan 19, 2011 27 module name or the module name extended by a version number suffix. David Werner committed Jan 17, 2011 28 The name of a \Dune module itself is always defined via the content of file \texttt{dune.module} in its own root David Werner committed Jan 19, 2011 29 directory, but this should not get changed by an user. The user is allowed to have own files and directories in \Dune-Root, which are not related to \Dune's need. David Werner committed Jan 13, 2011 30 David Werner committed Jan 19, 2011 31 After installing source code for all relevant \Dune modules including \Dumux, \Dune is being built by the shell-command \texttt{dunecontrol} which is part of the \Dune build system. The \Dune build system is a front-end suited to \Dune's needs to the GNU build system. David Werner committed Oct 25, 2010 32 David Werner committed Jan 17, 2011 33 \subsection{Prerequisites} \label{sec:prerequisites} David Werner committed Jan 17, 2011 34 The GNU tool chain of \texttt{g++} and tools of GNU build system \cite{GNU-BS} also known as GNU autotools David Werner committed Jan 19, 2011 35 (i.e. \texttt{autoconf}, \texttt{automake}, \texttt{autogen}, \texttt{libtool}) as well as GNU's variant of \texttt{make} David Werner committed Jan 17, 2011 36 must be available in a recent version. E.g. for Ubuntu Linux these are contained in David Werner committed Jan 17, 2011 37 38 packages \texttt{autoconf}, \texttt{automake}, \texttt{libtool} and the C++ compiler \texttt{g++} and \texttt{make} are contained in \texttt{build-essential}. David Werner committed Jan 19, 2011 39 David Werner committed Jan 17, 2011 40 At time of this writing it is expected that \texttt{g++} of version $\geqslant$ 4.4.1, \texttt{automake} of version $\geqslant$ 1.11, David Werner committed Jan 19, 2011 41 \texttt{autoconf} of version $\geqslant$ 2.65, \texttt{autogen} of version $\geqslant$ 5.9.7, \texttt{libtool} of version $\geqslant$ 2.2.6 David Werner committed Jan 17, 2011 42 and GNU \texttt{make} version $\geqslant$ 3.81 should do their job for building \Dumux.\\ David Werner committed Jan 17, 2011 43 David Werner committed Jan 19, 2011 44 \Dumux makes use of library \texttt{boost} of version $\geqslant$ 1.33.1 but optional external modules at times require a more recent version. David Werner committed Jan 17, 2011 45 It is thus necessary to install an appropriate developer package of \texttt{boost} David Werner committed Jan 19, 2011 46 or sometimes named \texttt{libboost}. The matching Ubuntu Linux package is \texttt{libboost-dev}. \\ David Werner committed Jan 17, 2011 47 48 49 50 51 The building of contained documentation like this handbook requires \LaTeX\ and auxiliary tools like \texttt{dvipdf} and \texttt{bibtex}. One usually chooses a \LaTeX\ distribution like \texttt{texlive} for doing that. It is possible to switch off building of documentation by \texttt{--disable-documentation} in building options, i.e. as switch to \texttt{CONFIGURE\_FLAGS}. Additional parts of documentation are contained in source code files as special formatted comments. David Werner committed Jan 19, 2011 52 Extracting them can be done by program \texttt{doxygen} (version $\geqslant$ 1.7.2 works). See for this optional step section \ref{sec:build-doxy-doc}.\\ David Werner committed Jan 17, 2011 53 54 55 56 Depending whether you are going to use external libraries and modules for additional \Dune features additional software packages may required. Some hints on that are given in section \ref{sec:external-modules-libraries}.\\ David Werner committed Jan 17, 2011 57 58 59 For code extraction out of tar-files GNU's version of \texttt{tar} is used. For accessing software repositories we recommend Apache Subversion command-line client \texttt{svn} contained in Apache Subversion of version $\geqslant$ 1.6.0 \cite{APACHE-SUBVERSION-HP}. Klaus Mosthaf committed Oct 12, 2010 60 David Werner committed Jan 13, 2011 61 \subsection{Obtaining source code for \Dune and \Dumux} David Werner committed Jan 17, 2011 62 63 64 As written before \Dumux release 2.0 is based on \Dune release 2.0, comprising the core modules \texttt{dune-common}, \texttt{dune-grid}, \texttt{dune-istl}, \texttt{dune-localfunctions} and the external dune module \texttt{dune-pdelab}. Thus for a \Dumux installation these modules are required to be installed. David Werner committed Jan 19, 2011 65 Of course the external \Dune module \texttt{dumux} from \Dumux website is required too.\\ David Werner committed Jan 13, 2011 66 67 Two possibilities exist to get source code for \Dune and \Dumux. David Werner committed Jan 19, 2011 68 69 Firstly, \Dune and \Dumux can obtained as tar-files by download from respective {\Dune} and {\Dumux} website. They then need to be extracted, as described in the next section. Secondly, described in the section next but one, is a method to obtain most recent source, but more generally even any of its predecessors, by direct access via Internet to software repositories of software revision control system of software developement. \Dune and \Dumux use for their software repositories Apache Subversion. David Werner committed Jan 13, 2011 70 As a user does not always want the most recent version David Werner committed Jan 19, 2011 71 certain version tags (i.e. special names) and version numbers and even software branches are means of software revision control system to provide access to different versions of a software from a software repository. Klaus Mosthaf committed Oct 12, 2010 72 David Werner committed Jan 13, 2011 73 \paragraph{Obtaining the software by installing tar-files} David Werner committed Jan 13, 2011 74 The a bit old fashioned named tape-archive-file shortly named tar-file or tarball is a common file format for distributing collections of files contained in these archives. David Werner committed Jan 13, 2011 75 76 This part of installation is done as follows: Download the tarballs from the respective \Dune (version 2.0) and \Dumux websites to a certain path in your filesystem. David Werner committed Jan 19, 2011 77 78 Create the {\Dune} root directory, named below in the examaple DUMUX, then extract content of tar-files by command-line program tar into it. Above, except download, can achieved by the following shell commands, replace in them \texttt{path\_to\_tarball} with the directory-name where the downloaded files are actually located. David Werner committed Jan 14, 2011 79 80 81 82 83 84 85 86 87 88 89 \begin{lstlisting}[style=Bash] $mkdir DUMUX$ cd DUMUX $tar xzvf path_to_tarball_of/dune-common-2.0.tar.gz$ tar xzvf path_to_tarball_of/dune-grid-2.0.tar.gz $tar xzvf path_to_tarball_of/dune-istl-2.0.tar.gz$ tar xzvf path_to_tarball_of/dune-localfunctions-2.0.tar.gz $tar xzvf path_to_tarball_of/dumux-2.0.tar.gz \end{lstlisting} David Werner committed Jan 19, 2011 90 91 92 After extraction it comes out that the actual dumux' root directory name is \texttt{dumux-2.0}.\\ Optional, if you with to install \Dune Grid Howto: David Werner committed Jan 14, 2011 93 94 95 96 97 \begin{lstlisting}[style=Bash]$ tar xzvf path_to_tarball_of/dune-grid-howto-2.0.tar.gz \end{lstlisting} David Werner committed Jan 19, 2011 98 99 100 101 However, the required \Dune-module \texttt{dune-pdelab} is not available as tar-file. That's why one has to install it from a software repository by the second method. If svn command is available, it can done as follows: David Werner committed Jan 14, 2011 102 103 104 \begin{lstlisting}[style=Bash] $svn co https://svn.dune-project.org/svn/dune-pdelab/branches/2.0snapshot dune-pdelab \end{lstlisting} Klaus Mosthaf committed Oct 12, 2010 105 David Werner committed Jan 13, 2011 106 107 \paragraph{Obtaining \Dune and \Dumux from software repositories} David Werner committed Jan 19, 2011 108 109 Direct accessing a software revision control system, as Apache Subversion, for downloading code can be of later advantage for an user. It can be easier for him to follow with code changes, through revision control systems update command, as for example to receive important bug fixes. If he takes a revision from a stable branch, with no additional effort, he can be sure to get the latest revision. \\ Bernd Flemisch committed Jul 16, 2010 110 David Werner committed Jan 19, 2011 111 112 To access Apache Subversion software repositories a certain program is needed which is referred here shortly as subversion client. We use in our description the subversion client of the Apache Subversion software itself, which is a command-line tool named \texttt{svn}. Apache Subversion client \texttt{svn} is available for most Linux and UNIX distributions as software package by the distributor. David Werner committed Jan 13, 2011 113 David Werner committed Jan 17, 2011 114 In technical speech of Apache Subversion checking out a certain software version" means nothing more then fetching David Werner committed Jan 19, 2011 115 116 it from software repository and laying it out in the filesystem. Additionally with software some more files for use of the software revision control system itself, kept in directories named \texttt{.svn}, are also laid out. For a developer in \Dumux project it is easily possible to do the opposite, i.e. loading up a modified revision of software back into the software repository. This is usually termed as software check in".\\ David Werner committed Jan 13, 2011 117 David Werner committed Jan 19, 2011 118 The installation procedure is done as follows: David Werner committed Jan 14, 2011 119 Create {\Dune} root directory, named here below DUMUX. David Werner committed Jan 19, 2011 120 121 122 Then, enter the previously created directory and check out the modules. As you see below the check out uses two different servers for sources one for \Dune and one for {\Dumux}: As described on \Dune's website \cite{DUNE-DOWNLOAD-SVN} we check out the requirered \Dune modules: David Werner committed Jan 14, 2011 123 124 \begin{lstlisting}[style=Bash] David Werner committed Jan 17, 2011 125 126$ mkdir DUMUX $cd DUMUX David Werner committed Jan 14, 2011 127 128 129 130 131 132$ svn co https://svn.dune-project.org/svn/dune-common/releases/2.0 dune-common $svn co https://svn.dune-project.org/svn/dune-grid/releases/2.0 dune-grid$ svn co https://svn.dune-project.org/svn/dune-istl/releases/2.0 dune-istl $svn co https://svn.dune-project.org/svn/dune-localfunctions/releases/2.0 dune-localfunctions$ svn co https://svn.dune-project.org/svn/dune-pdelab/branches/2.0snapshot dune-pdelab \end{lstlisting} Bernd Flemisch committed Jul 16, 2010 133 David Werner committed Jan 19, 2011 134 135 136 The Module \texttt{dune-grid-howto} is a tutorial which aims to give an understanding of the \Dune grid interface. Hopefully it can give you an idea how some abstractions in \Dune are done. The Dune Grid Howto is not required by \Dumux, installing it is purely optional. It is done by: David Werner committed Jan 14, 2011 137 138 139 140 \begin{lstlisting}[style=Bash] $svn co https://svn.dune-project.org/svn/dune-grid-howto/releases/2.0 dune-grid-howto \end{lstlisting} Klaus Mosthaf committed Oct 08, 2010 141 David Werner committed Jan 19, 2011 142 143 144 The needed \texttt{dumux} module is checked out as described on \Dumux website \cite{DUMUX-HP}. Its file tree has to laid out also into \Dune-Root. That's why the next command is excuted in \Dune-Root too. David Werner committed Jan 13, 2011 145 David Werner committed Jan 14, 2011 146 147 148 \begin{lstlisting}[style=Bash]$ svn co --username=anonymous --password='' svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk dumux \end{lstlisting} Klaus Mosthaf committed Oct 12, 2010 149 David Werner committed Jan 19, 2011 150 151 The name of dumux' root directory is this time just \texttt{dumux}. David Werner committed Jan 13, 2011 152 \paragraph{Hints for \Dumux-Developers} David Werner committed Jan 19, 2011 153 154 155 156 157 158 159 If you also want activly take part in \Dumux development, you can apply either for full developer access or for developer access on certain parts of \Dumux. Granted developer access means that you are allowed to check in own code and that you can access the \texttt{dumux-devel} module, which enhances \texttt{dumux} by staging code of developer group. A developer ususally checks out non anonymously the modules \texttt{dumux} and \texttt{dumux-devel}. This is done by the commands below. But \texttt{joeuser} needs to replaced by the actual username of developer for accessing the software repository: David Werner committed Jan 14, 2011 160 161 162 163 164 165 \begin{lstlisting}[style=Bash] $svn co --username=joeuser svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk dumux$ svn co --username=joeuser svn://svn.iws.uni-stuttgart.de/DUMUX/dune-mux/trunk dumux-devel \end{lstlisting} David Werner committed Jan 19, 2011 166 167 168 \texttt{Dumux-devel} itself makes use of stable part \texttt{dumux} and hence it needs always together with it being checked out. One can omit in commands above the \texttt{--username} option, if the username for the repository access is identical to the one for the system account.\\ David Werner committed Jan 14, 2011 169 David Werner committed Jan 19, 2011 170 171 172 173 Please choose either not to store the password by subversion in an insecure way or choose to store it by subversion in a secure way like together with \texttt{kwallet} or \texttt{gnomekeyring}. Check the documentation of subversion on how this is being done. A leaked out password can be used by evil persons to abuse a software repository. Klaus Mosthaf committed Oct 12, 2010 174 David Werner committed Jan 24, 2011 175 176 177 178 179 180 181 182 183 184 \paragraph{checkout-dumux script} The shell-script \texttt{checkout-dumux} facilitates setting up a {\Dune}/{\Dumux} directory tree. It is contained in the download section of \Dumux' webpage \cite{DUMUX-HP}. For example the second line below will check out the required \Dune modules and \texttt{dumux}, \texttt{dumux-devel} and \texttt{external}. \begin{lstlisting}[style=Bash] $checkout-dumux -h # show help,$ checkout-dumux -gme -u joeuser -p password -d DUMUX \end{lstlisting} David Werner committed Feb 03, 2011 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 \subsection{Patching \Dune or external libraries} Patching of \Dune modules in order to work together with \Dumux can be necessary for various reasons. \\ Software like a compiler or even a standard library changes at times. But a certain release of a software-component, we depend on, does not reflect that change. In developing process of software which depends on other modules, it is not always feasible to adapt it to the most recent version of module of the day. That's why for serious errors there exist patches or they are be brought into existence, which fix problems with a certain module of a certain release but do not introduce to much structural change. It can also happen that a release gets amendments (updates) and a formerly useful patch gets obsoleted.\\ \Dumux carries within directory \texttt{dumux/patches} patches and documentation about their usage and application. Please check the README file in that directory for recent informations. At the time of this writing one patch has to applied as follows, but things may vary over time. David Werner committed Jan 24, 2011 200 David Werner committed Feb 03, 2011 201 202 \begin{lstlisting}[style=Bash] $# make sure you are in DUNE-Root David Werner committed Feb 03, 2011 203$ cd dune-istl David Werner committed Feb 03, 2011 204 205 206 207 $patch -p1 < ../dumux/patches/dune-istl-2.0.patch \end{lstlisting} The \texttt{checkout-dumux} script will also apply patches, if not explicitly requested to do not so. David Werner committed Jan 24, 2011 208 David Werner committed Jan 14, 2011 209 210 \subsection{Build of \Dune and \Dumux} \label{buildIt} David Werner committed Jan 19, 2011 211 212 213 214 Building of \Dune is done by \texttt{dunecontrol} as described in \Dune Installation Notes \cite{DUNE-INST} and in much more comprehensive form in \Dune Build System Howto \cite{DUNE-BS}. If something fails with \texttt{dunecontrol} feel to report it to \Dune or \Dumux developer mailing list, but also try to report also error details. People will likely help you.\\ David Werner committed Jan 14, 2011 215 David Werner committed Jan 19, 2011 216 217 218 219 220 It is possible to compile \Dumux with nearly no explicit options to the build system, but experience showed that the code quality through all parts of \Dune is not yet high enough to give the compiler full freedom for allowing certain kind optimizations. As option switches for optimization can switched on in parts build system for code by default, it is safer to pass the option \texttt{-fno-strict-aliasing} to the C++-compiler \cite{WIKIPED-ALIASING}, which is done here via a command-line argument to \texttt{dunecontrol}. David Werner committed Jan 14, 2011 221 222 223 \begin{lstlisting}[style=Bash] David Werner committed Jan 17, 2011 224$ # make sure you are in the directory DUNE-Root David Werner committed Jan 14, 2011 225 226 227 $./dune-common/bin/dunecontrol --configure-opts="CXXFLAGS=-fno-strict-aliasing" all \end{lstlisting} David Werner committed Jan 17, 2011 228 Too many options can make life hard, that's why one usually uses option-files for dunecontrol and its sub-tools. David Werner committed Jan 19, 2011 229 230 Larger sets of options are kept in them. \\ David Werner committed Jan 14, 2011 231 232 233 If you are going to compile with options suited for code debugging with a debugger, the following can be a starting point: David Werner committed Jan 19, 2011 234 %Below in command-line make sure to insert the right name of dumux' root directory, which is in case of installation from tar-files \texttt{dumux-2.0} or in case of installation from subversion just \texttt{dumux}. For a developer it is also possible to take options file from \texttt{dumux-devel}. David Werner committed Jan 14, 2011 235 236 \begin{lstlisting}[style=Bash] David Werner committed Jan 17, 2011 237$ # make sure you are in the directory DUNE-Root David Werner committed Jan 19, 2011 238 239 $cp dumux/debug.opts my-debug.opts # create a personal version$ gedit my-debug.opts # optional editing the options file David Werner committed Jan 17, 2011 240 $./dune-common/bin/dunecontrol --opts=my-debug.opts all David Werner committed Jan 14, 2011 241 242 243 244 245 \end{lstlisting} More optimized code, but which is typically not as useful for standard tasks in debugger can produced by \begin{lstlisting}[style=Bash] David Werner committed Jan 17, 2011 246 247$ cp dumux/optim.opts my-optim.opts $./dune-common/bin/dunecontrol --opts=my-optim.opts all David Werner committed Jan 14, 2011 248 249 \end{lstlisting} David Werner committed Jan 19, 2011 250 251 252 253 254 255 256 257 258 259 Sometimes it is necessary to have additional options which are specific to a package set of an operating system or sometimes you have your own preferences. Feel free to work with your own set of options, which may evolve over time. Above option files are more to understand as a starting point for setting up an own customization, than as something which is fixed to \Dumux. The use of external libraries can make it necessary to add quite many options in an option-file. It can be helpful to give your customized option file its own name, as done above. So one avoids to be confused with option files that came out of distribution and can possible updated by subversion later on. David Werner committed Jan 17, 2011 260 261 262 \subsection{Building doxygen documentation} \label{sec:build-doxy-doc} David Werner committed Jan 19, 2011 263 264 Doxygen documentation is done by especially formatted comments in source code, which can get extracted by the program \texttt{doxygen}. Beside extracting these comments, \texttt{doxygen} builds up web-browsable code structure documentation David Werner committed Jan 17, 2011 265 266 like class hierarchy of code displayed as graphs, see \cite{DOXYGEN-HP}.\\ David Werner committed Jan 19, 2011 267 268 Building a modules doxygen documentation is done as follows provided the program \texttt{doxygen} is installed: Set in building options the \texttt{--enable-doxygen} switch. David Werner committed Jan 17, 2011 269 This is either accomplished by adding it in \texttt{dunecontrol} options-file to \texttt{CONFIGURE\_FLAGS}, or by adding David Werner committed Jan 19, 2011 270 271 it to \texttt{dunecontrol}'s command-line-argument \texttt{--configure-opts}. After running \texttt{dunecontrol} enter in module's root directory the subdirectory \texttt{doc/doxygen}. David Werner committed Jan 17, 2011 272 273 274 275 276 You then run within that directory the command \texttt{doxygen}. Point then your web browser to the file \texttt{module-root-directory/doc/doxygen/html/index.html} too read the generated documentation. All here used \Dune-modules except \texttt{dune-grid-howto} so as well \texttt{dumux} contain some doxygen documentation. The external library UG has also a \texttt{doc/doxygen} directory for building its doxygen documentation. David Werner committed Jan 17, 2011 277 278 279 280 281 282 283 \begin{lstlisting}[style=Bash]$ # change before next command your directory to DUNE-Root $cd dumux/doc/doxygen$ doxygen $firefox html/index.html \end{lstlisting} David Werner committed Jan 17, 2011 284 285 \subsection{Building documentation of other \Dune modules} David Werner committed Jan 19, 2011 286 287 288 289 290 291 292 293 294 If the \texttt{--enable-documentation} switch had been set to configure flags of \texttt{dunecontrol}, this means not necessarily that for any \Dune module documentation is being build. But at least Makefiles for building documentation are generated. Provided you run \texttt{dunecontrol} with above option, it should be possible to build documentation if available. Look into \texttt{module-root-directory/doc/Makefile.am} to guess the targets you can build. E.g. for module \texttt{dune-istl} you can build documentation \texttt{istl.pdf} by typing the following in, if you where before in \Dune-Root: David Werner committed Jan 17, 2011 295 296 \begin{lstlisting}[style=Bash] David Werner committed Jan 17, 2011 297$ # change before next command your directory to DUNE-Root David Werner committed Jan 17, 2011 298 299 300 301 $cd dune-istl/doc$ make istl.pdf \end{lstlisting} David Werner committed Jan 19, 2011 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 Or for module \texttt{dune-grid-howto} documentation can be build by: \begin{lstlisting}[style=Bash] $# change before next command your directory to DUNE-Root$ cd dune-grid-howto/doc $make grid-howto.pdf \end{lstlisting} But it applies to \Dumux too, rebuilding the handbook can be done as follows: \begin{lstlisting}[style=Bash]$ cd dumux/doc/handbook $make dumux-handbook.pdf \end{lstlisting} David Werner committed Jan 17, 2011 318 At the time writing this to the author no general method of building documentation contained in \Dune's modules is known. David Werner committed Jan 14, 2011 319 320 %Alternatively, the tool CMake can be used to build \Dumux. Please check the file \texttt{INSTALL.cmake} for details. David Werner committed Jan 17, 2011 321 322 \subsection{External libraries and modules} \label{sec:external-modules-libraries} David Werner committed Oct 25, 2010 323 David Werner committed Jan 19, 2011 324 325 326 The following libraries provide additional functionality but are not generally required to run \Dumux. If you are going to use an external library check the information provided on the \Dune website \cite{DUNE-EXT-LIB}. If you are going to use an external \Dune module the website on external modules \cite{DUNE-EXT-MOD} can be helpful.\\ David Werner committed Jan 17, 2011 327 %Further information on external modules and libraries seemed to be contained in {\Dune}s Wiki \cite{DUNE-MAIN-WIKI}. David Werner committed Jan 19, 2011 328 329 330 331 332 333 334 Installing an external library can require additional libraries which ara also used by \Dune. Of some libraries as for BLAS or MPI there are can be multiple versions installed on system. Make sure that when configuring the external library it uses the same library as \Dune will use.\\ We list here some of external modules and external libraries and some more libraries and tools which get used by them. David Werner committed Oct 25, 2010 335 Philipp Nuske committed Sep 27, 2010 336 \begin{itemize} David Werner committed Jan 19, 2011 337 338 \item \textbf{\Dune-multidomaingrid}: External module. If you going to run on the same grid different domains or subdomains, this can be the package of choice. This is done by providing a meta grid. It can be userful for multi-physics approaches or domain decomposition methods. Download: \texttt{\url{http://gitorious.org/dune-multidomaingrid}} David Werner committed Jan 14, 2011 339 David Werner committed Jan 19, 2011 340 \item \textbf{UG}: External library for use as GRID. UG is a toolbox for Unstructured Grids: For \Dumux it has to be build by GNU buildsystem and a C++-compiler. That's why \Dune specific patches need applied before use. Building it makes use of the tools \texttt{lex}/\texttt{yacc} or the GNU variants \texttt{flex}/\texttt{bison}. Philipp Nuske committed Sep 27, 2010 341 David Werner committed Jan 19, 2011 342 \item \textbf{ALBERTA}: External library for use as GRID. Adaptive multi Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. Building it requirers a FORTRAN compiler \texttt{gfortran}. Philipp Nuske committed Sep 27, 2010 343 David Werner committed Jan 19, 2011 344 \item \textbf{ALUGrid}: External library for use as GRID. ALUGrid is build by a C++-compiler like \texttt{g++}. If you want to build a parallel version, you will need \texttt{MPI}. It was successfully run with \texttt{openmpi}. The parallel version needs also a graph partitioner, such as \texttt{METIS}. It was run successfully in combination with \Dune using \texttt{METIS}. Philipp Nuske committed Sep 27, 2010 345 David Werner committed Jan 19, 2011 346 \item \textbf{PARDISO}: External library for solving linear equations. The package PARDISO is a thread-safe, high-performance, robust, memory efficient and easy to use software for solving large sparse symmetric and asymmetric linear systems of equations on shared memory multiprocessors. The precompiled binary can be downloaded after personal registration from the PARDISO website (\texttt{\url{http://www.pardiso-project.org}}). Philipp Nuske committed Sep 27, 2010 347 David Werner committed Jan 19, 2011 348 \item \textbf{SuperLU}: External library for solving linear equations. SuperLU is a general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations. \\ (\texttt{\url{http://crd.lbl.gov/~xiaoye/SuperLU}}). Philipp Nuske committed Sep 27, 2010 349 David Werner committed Oct 25, 2010 350 351 \end{itemize} Klaus Mosthaf committed Oct 28, 2010 352 The following are dependencies of some of the used libraries. You will need them depending on which modules of \Dune and which external libraries you use. David Werner committed Jan 19, 2011 353 David Werner committed Oct 25, 2010 354 \begin{itemize} David Werner committed Jan 19, 2011 355 \item \textbf{MPI}: The parallel version of \Dune and also some of the external dependencies need MPI when they are going to be built for parallel computing. \texttt{Openmpi} version$\geqslant$1.4.2 and \texttt{MPICH} in a recent version have been reported to work. Philipp Nuske committed Sep 27, 2010 356 Klaus Mosthaf committed Oct 28, 2010 357 \item \textbf{lex/yacc} or \textbf{flex/bison}: These are quite common developing tools, code generators for lexical analyzers and parsers. This is a prerequisite for UG. Philipp Nuske committed Sep 27, 2010 358 David Werner committed Jan 17, 2011 359 \item \textbf{BLAS}: Alberta makes use of BLAS. Thus install GotoBLAS2, ATLAS, non-optimized BLAS or BLAS provided by a chip manufacturer. Take care that the installation scripts select the intended version of BLAS. See \texttt{\url{http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms}}. Philipp Nuske committed Oct 18, 2010 360 David Werner committed Jan 24, 2011 361 \item \textbf{METIS}: This is a dependency of ALUGrid, if you are going to run it parallel. David Werner committed Oct 25, 2010 362 David Werner committed Jan 17, 2011 363 364 \item \textbf{GotoBLAS2}: is an optimized version of BLAS. It covers not always available all processors of the day, but quite a broad range. Its license is now very open. A FORTRAN compiler like \texttt{gfortran} is needed to compile it.\\ Available by \texttt{\url{http://www.tacc.utexas.edu/tacc-projects/gotoblas2/}}. David Werner committed Oct 25, 2010 365 David Werner committed Jan 17, 2011 366 \item \textbf{Compilers}: Beside \texttt{g++} it has been reported that \Dune was successfully build with the Intel C++ compiler. David Werner committed Jan 17, 2011 367 C and FORTRAN compiler is needed for a some external libraries. As code of different compilers is linked together they have to be be compatible with each other. A good choice is the GNU compiler suite \texttt{gcc},\texttt{g++} and \texttt{gfortran}. David Werner committed Oct 25, 2010 368 David Werner committed Jan 19, 2011 369 \item \textbf{libgomp}: external libraries like ALUGrid when used together with METIS can make use of OpenMP. For that it can be necessary to install the \texttt{libgomp} library. David Werner committed Oct 25, 2010 370 371 % http://openmp.org/ David Werner committed Jan 17, 2011 372 %\item \textbf{libgmp}: The Gnu Multiple Precision Arithmetic Library (GMP) is also a prerequisite for \Dune. It may be necessary to install it. David Werner committed Oct 25, 2010 373 % http://gmplib.org/ David Werner committed Oct 25, 2010 374 \end{itemize} Klaus Mosthaf committed Oct 21, 2010 375 David Werner committed Jan 19, 2011 376 377 378 379 380 381 382 \subsection{Hints for Users from IWS} We provide some features to make life a little bit easier for users from the Institute of Hydraulic Engineering, University of Stuttgart. There exists internally a svn repository made for several external libraries. If you are allowed to access it: Go to {\Dune}-Root, then do: \paragraph{prepared external directory} 383 David Werner committed Jan 14, 2011 384 \begin{lstlisting}[style=Bash] David Werner committed Jan 19, 2011 385$ # Make sure you are in DUNE-Root David Werner committed Jan 14, 2011 386 387 $svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/external/trunk external \end{lstlisting} 388 Klaus Mosthaf committed Oct 27, 2010 389 This directory \texttt{external} contains a script to install external libraries, such as David Werner committed Jan 19, 2011 390 391 ALBERTA, ALUGrid, UG, METIS and GotoBLAS2: David Werner committed Jan 14, 2011 392 \begin{lstlisting}[style=Bash] David Werner committed Jan 19, 2011 393$ cd external David Werner committed Jan 14, 2011 394 395 $./installExternal.sh all \end{lstlisting} David Werner committed Jan 19, 2011 396 397 398 it is also possible to install only the actual needed external libraries: David Werner committed Jan 14, 2011 399 \begin{lstlisting}[style=Bash] David Werner committed Jan 19, 2011 400 401$ ./installExternal.sh -h # show, what options this script provide \$ ./installExternal.sh --parallel alu David Werner committed Jan 14, 2011 402 \end{lstlisting} 403 David Werner committed Jan 19, 2011 404 405 406 The libraries are then compiled within that directory and are not installed in a different place. A \Dune build needs to know, where they are. That's why has to refer to them as options for \texttt{dunecontrol}, for example via options file \texttt{my-debug.opts}.