opm-simulators/doc/handbook/install.tex
2012-07-12 21:22:27 +02:00

89 lines
4.8 KiB
TeX

\section{Installation}
\label{install}
For the installation of DuMu$^\text{x}$, the following steps have to be performed.
\paragraph{Checkout of the core modules}
From version 2.0 of DUNE, it was decided to stick to stable DUNE releases, comprising the core modules
\texttt{dune-common}, \texttt{dune-grid}, \texttt{dune-istl}, \texttt{dune-localfunctions}, and the external \texttt{dune-pdelab}.
First, create a directory where all the DUNE and \Dumux modules will be stored in. Then, enter the previously created folder.
The checkout has to be performed as described on
the DUNE webpage, \cite{DUNE-HP}:
\begin{itemize}
\item \texttt{svn checkout https://svn.dune-project.org/svn/dune-common/releases/2.0 dune-common}
\item \texttt{svn checkout https://svn.dune-project.org/svn/dune-grid/releases/2.0 dune-grid}
\item \texttt{svn checkout https://svn.dune-project.org/svn/dune-istl/releases/2.0 dune-istl}
\item \texttt{svn checkout https://svn.dune-project.org/svn/dune-localfunctions/releases/2.0 dune-localfunctions}
\item \texttt{svn checkout https://svn.dune-project.org/svn/dune-pdelab/branches/2.0snapshot dune-pdelab}
\end{itemize}
%The \Dumux webpage \cite{dumux-hp} contains the revision numbers of the core modules
%for which compatibility to \Dumux can be guaranteed.
Additionally, it is highly recommended that you also checkout the \texttt{dune-grid} HOWTO
by
\begin{center}
\texttt{svn checkout https://svn.dune-project.org/svn/dune-grid-howto/trunk dune-grid-howto}
\end{center}
and work yourself through that tutorial in order to get an understanding of
the Dune grid interface.
\paragraph{Checkout of DuMu$^\text{x}$ and external modules}
If you obtained a \Dumux tarball, you should just extract the tarball as usual
and can skip this part. First of all, you need to ask one of the IWS system administrators to
add your account to the group \texttt{svndune}. \\
On the repository, the \Dumux project is divided into a stable and developers part, which should stay seperate
on the file system. If you are working on a LH2 computer, you then can checkout both parts of \Dumux
and the external modules via
\begin{itemize}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/dumux/trunk dumux}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-mux/trunk dumux-dev}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/external/trunk external}
\end{itemize}
If you want to checkout from outside LH2, you first need to establish a tunnel.
To this end, you need to add once
\begin{center}
\texttt{ssht = ssh -p 2022 -l login -o HostKeyAlias=luftig.iws.uni-stuttgart.de}
\end{center}
with \texttt{login} replaced
by your actual IWS login name, to the section \texttt{[tunnels]} of the
file \texttt{\$HOME/} \texttt{.subversion/config},
The tunnel then needs to be initialized every time you want
to connect to the repository by
\begin{center}
\texttt{ssh -Nf -L 2022:luftig.iws.uni-stuttgart.de:22 login@login1.iws.uni-stuttgart.de}.
\end{center}
Then, you can checkout everything as described above, if you replace \texttt{luftig}
by \texttt{localhost}.
%Moreover, the possibility to checkout a read-only version from outside exists. Therefor, no IWS-account is needed. The following commands can be used for an anonymous checkout:
%\begin{itemize}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/dune-mux/trunk dumux}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/external/trunk external}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/dune-subgrid/trunk dune-subgrid}
%\end{itemize}
\paragraph{Build the external modules}
If you obtained a \Dumux tarball, you should skip this part.
The external modules have to be built first. They consist of Alberta, ALUGrid, UG, and METIS.
To install them all, execute the install script in the folder \texttt{external}:
\begin{center}
\texttt{./installExternal.sh all}
\end{center}
If you like to only install some of the external software, you can choose one of the
corresponding options instead of \texttt{all}: \texttt{alberta, alu, metis, ug}.
Please also refer to the DUNE webpage for additional details, \cite{DUNE-HP}.
\paragraph{Build DUNE and DuMu$^\text{x}$}
Type in the folder \texttt{DUMUX}:
\begin{center}
\texttt{./dune-common/bin/dunecontrol --opts=\$DUMUX\_ROOT/debug.opts all}
\end{center}
This uses the DUNE buildsystem. If it does not work, please consider
the file \texttt{INSTALL} in the \Dumux root directory (if you use
SVN, this \texttt{\$DUMUX\_ROOT} is usually \texttt{dumux}, if you use
a released version it is usually \texttt{dumux-VERSION}). You can also
find more information in the DUNE Buildsystem HOWTO located at the
DUNE webpage, \cite{DUNE-HP}. Alternatively, the tool CMake can be
used to build \Dumux. Please check the file \texttt{INSTALL.cmake} for
details.