Commit f2de1dbb authored by Chris Cantwell's avatar Chris Cantwell

Instructions for installing Nektar++.

parent 1334bf92
\section{Installing Debian/Ubuntu Packagse}
\section{Installing Debian/Ubuntu Packages}
\label{s:installation:debian}
\section{Installing Redhat/Fedora Packages}
\label{s:installation:redhat}
\section{Installing OSX Packages}
\label{s:installation:osx}
\section{Installing from Source}
\label{s:installation:source}
This section explains how to build Nektar++ from the source-code package. We
recommend using pre-built binaries for your distribution, if available. See
Sections~\ref{s:installation:debian}-\ref{s:installation:osx}.
Nektar++ uses a number of third-party libraries. Some of these are required,
others are optional. It is generally more straightforward to use
versions of these libraries supplied pre-packaged for your operating system,
but if you run into difficulties with compilation errors or failing regression tests, the Nektar++
build system can automatically build tried and tested versions of these
libraries for you. This requires enabling the relevant options
in the CMake configuration.
% \begin{custombox}{Warning}{\bcdanger}{red}
% Don't do this.
% \end{custombox}
\subsection{Obtaining the source code}
There are two ways to obtain the source code for \nekpp:
\begin{itemize}
\item Download the latest source-code archive from the
\href{http://www.nektar.info/downloads}{Nektar++ downloads page}.
\item Clone the git repository
\begin{itemize}
\item Using anonymous access. This does not require
credentials but any changes to the code cannot be pushed to the repository. Use
this if you would like to try using Nektar++ and do not intend to be an active
developer.
\begin{lstlisting}[style=BashInputStyle]
git clone http://gitlab.nektar.info/clone/nektar.git nektar++
\end{lstlisting}
\item Using authenticated access. This will allow you to directly contribute
back into the code.
\begin{lstlisting}[style=BashInputStyle]
git clone git@gitlab.nektar.info:nektar.git nektar++
\end{lstlisting}
\end{itemize}
\end{itemize}
\subsection{Linux}
3.4/UserGuide/Compile/Linux
\subsubsection{Prerequisites}
\nekpp requires the following to be pre-installed on your system
\begin{itemize}
\item CMake
\item BLAS and LAPACK
\item Modern C++ compiler: g++, icpc, etc
\end{itemize}
This software should be available through your Linux distribution.
\begin{notebox}
CMake 2.8.7 or later is required.
\end{notebox}
\subsubsection{Quick Start}
Open a terminal.
If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
mkdir -p build && cd build
ccmake ../
make install
\end{lstlisting}
\subsubsection{Detailed instructions}
From a terminal:
\begin{enumerate}
\item If you have downloaded the tarball, first unpack it
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
\end{lstlisting}
\item (Optional) If you have administrative access, install the third-party
libraries supplied with your Linux distribution.
\begin{warningbox}
Boost version 1.51 has a bug which prevents \nekpp working correctly.
Please use a newer version.
\end{warningbox}
\begin{notebox}
FFTW and Arpack are optional. They provide additional or optimised
functionality, but alternative implementations are included as part of
\nekpp.
\end{notebox}
\item Change into the source-code directory, create a \inltt{build}
subdirectory and enter it
\begin{lstlisting}[style=BashInputStyle]
mkdir -p build && cd build
\end{lstlisting}
\item Run the CMake GUI and configure the build
\begin{lstlisting}[style=BashInputStyle]
ccmake ../
\end{lstlisting}
\begin{itemize}
\item Select the components of Nektar++ (prefixed with
\inltt{NEKTAR\_BUILD\_}) you would like to build. Disabling solvers
which you do not require will speed up the build process.
\item Select the optional libraries you would like to use (prefixed with
\inltt{NEKTAR\_USE\_}) for additional functionality.
\end{itemize}
A full list of configuration options can be found in
Section~\ref{s:installation:source:cmake}.
\item Press \inltt{c} to configure the build. If errors arise relating to
missing libraries, review the \inltt{THIRDPARTY\_BUILD\_} selections in the previous
step or install the missing libraries from system packages.
\item When configuration completes without errors, press \inltt{c} again
until the option \inltt{g} to generate build files appears. Press \inltt{g}
to generate the build files and exit CMake.
\item Compile the code
\begin{lstlisting}[style=BashInputStyle]
make install
\end{lstlisting}
During the build, missing third-party libraries will be automatically
downloaded, configured and built in the \nekpp \inlsh{build} directory.
% Hacky way to get an lstlisting to an argument of a macro
\newsavebox\installationLinuxTip
\begin{lrbox}{\installationLinuxTip}\begin{minipage}{0.8\linewidth}
\begin{lstlisting}[style=BashInputStyle]
make -j4 install
\end{lstlisting}
\end{minipage}
\end{lrbox}
\begin{tipbox}
If you have multiple processors/cores on your system, compilation can be
significantly increased by adding the \inlsh{-jX} option to make, where X is
the number of simultaneous jobs to spawn. For example,
\noindent\usebox\installationLinuxTip
\end{tipbox}
\item Test the build by running unit and regression tests.
\begin{lstlisting}[style=BashInputStyle]
ctest
\end{lstlisting}
\end{enumerate}
\subsection{OSX}
3.4/UserGuide/Compile/Mac
\subsubsection{Prerequisites}
To compile \nekpp on OSX, Apple's Xcode Developer Tools must be installed. They
can be installed either from the App Store (only on Mac OS 10.7 and above) or
downloaded directly from
\href{http://connect.apple.com/}{http://connect.apple.com/}
(you are required to have an Apple Developer Connection account).
\nekpp also requires the following to be pre-installed on your system
\begin{itemize}
\item CMake
\item BLAS and LAPACK
\end{itemize}
This software should be available through your Linux distribution.
\begin{notebox}
CMake 2.8.7 or later is required.
\end{notebox}
\subsubsection{Quick Start}
Open a terminal (Applications->Utilities->Terminal).
If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
mkdir -p build && cd build
ccmake ../
make install
\end{lstlisting}
\subsubsection{Detailed instructions}
From a terminal (Applications->Utilities->Terminal):
\begin{enumerate}
\item If you have downloaded the tarball, first unpack it
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
\end{lstlisting}
\item (Optional) If you have administrative access, install the third-party
libraries from MacPorts:
\begin{lstlisting}[style=BashInputStyle]
sudo port install cmake zlib fftw-3 arpack
\end{lstlisting}
\begin{warningbox}
Boost version 1.51 has a bug which prevents \nekpp working correctly.
Please use a newer version.
\end{warningbox}
\begin{notebox}
FFTW and Arpack are optional. They provide additional or optimised
functionality, but alternative implementations are included as part of
\nekpp.
\end{notebox}
\item Change into the source-code directory, create a \inltt{build}
subdirectory and enter it
\begin{lstlisting}[style=BashInputStyle]
mkdir -p build && cd build
\end{lstlisting}
\item Run the CMake GUI and configure the build
\begin{lstlisting}[style=BashInputStyle]
ccmake ../
\end{lstlisting}
\begin{itemize}
\item Select the components of Nektar++ (prefixed with
\inltt{NEKTAR\_BUILD\_}) you would like to build. Disabling solvers
which you do not require will speed up the build process.
\item Select the optional libraries you would like to use (prefixed with
\inltt{NEKTAR\_USE\_}) for additional functionality.
\end{itemize}
A full list of configuration options can be found in
Section~\ref{s:installation:source:cmake}.
\item Press \inltt{c} to configure the build. If errors arise relating to
missing libraries, review the \inltt{THIRDPARTY\_BUILD\_} selections in the previous
step or install the missing libraries from system packages.
\item When configuration completes without errors, press \inltt{c} again
until the option \inltt{g} to generate build files appears. Press \inltt{g}
to generate the build files and exit CMake.
\item Compile the code
\begin{lstlisting}[style=BashInputStyle]
make install
\end{lstlisting}
During the build, missing third-party libraries will be automatically
downloaded, configured and built in the \nekpp \inlsh{build} directory.
% Hacky way to get an lstlisting to an argument of a macro
\newsavebox\installationMacTip
\begin{lrbox}{\installationMacTip}\begin{minipage}{0.8\linewidth}
\begin{lstlisting}[style=BashInputStyle]
make -j4 install
\end{lstlisting}
\end{minipage}
\end{lrbox}
\begin{tipbox}
If you have multiple processors/cores on your system, compilation can be
significantly increased by adding the \inlsh{-jX} option to make, where X is
the number of simultaneous jobs to spawn. For example,
\noindent\usebox\installationMacTip
\end{tipbox}
\item Test the build by running unit and regression tests.
\begin{lstlisting}[style=BashInputStyle]
ctest
\end{lstlisting}
\end{enumerate}
\subsection{Windows}
3.4/UserGuide/Compile/Windows
\subsection{CMake Option Reference}
\label{s:installation:source:cmake}
3.4/UserGuide/Compile/CMakeOptions
This section describes the main configuration options which can be set when
building Nektar++. The default options should work on almost all systems, but
additional features (such as parallelisation and specialist libraries) can be
enabled if needed.
\subsubsection{Components}
The first set of options specify the components of the Nektar++ toolkit to
compile. Some options are dependent on others being enabled, so the available
options may change.
Components of the \nekpp package can be selected using the following options:
\begin{itemize}
\item \inlsh{NEKTAR\_BUILD\_DEMOS} (Recommended)
Compiles the demonstration programs. These are primarily used by the
regression testing suite to verify the \nekpp library, but also provide an
example of the basic usage of the framework.
\item \inlsh{NEKTAR\_BUILD\_LIBRARY} (Required)
Compiles the Nektar++ framework libraries. This is required for all other
options.
\item \inlsh{NEKTAR\_BUILD\_SOLVERS} (Recommended)
Compiles the solvers distributed with the \nekpp framework.
If enabling \inlsh{NEKTAR\_BUILD\_SOLVERS}, individual solvers can be
enabled or disabled. See Chapter~\ref{s:solvers} for the list of available
solvers. You can disable solvers which are not required to reduce
compilation time. See the \inlsh{NEKTAR\_SOLVER\_X} option.
\item \inlsh{NEKTAR\_BUILD\_TESTS} (Recommended)
Compiles the testing program used to verify the \nekpp framework.
\item \inlsh{NEKTAR\_BUILD\_TIMINGS}
Compiles programs used for timing \nekpp operations.
\item \inlsh{NEKTAR\_BUILD\_UNIT\_TESTS}
Compiles tests for checking the core library functions.
\item \inlsh{NEKTAR\_BUILD\_UTILITIES}
Compiles utilities for pre- and post-processing simulation data.
\item \inlsh{NEKTAR\_SOLVER\_X}
Enabled compilation of the 'X' solver.
\end{itemize}
A number of ThirdParty libraries are required by \nekpp. There are also
optional libraries which provide additional functionality. These can be selected
using the following options:
\begin{itemize}
\item \inlsh{NEKTAR\_USE\_BLAS\_LAPACK} (Required)
Enables the use of Basic Linear Algebra Subroutines libraries for linear
algebra operations.
\item \inlsh{NEKTAR\_USE\_SYSTEM\_BLAS\_LAPACK} (Recommended)
On Linux systems, use the default BLAS and LAPACK library on the system.
This may not be the implementation offering the highest performance for your
architecture, but it is the most likely to work without problem.
\item \inlsh{NEKTAR\_USE\_OPENBLAS}
Use OpenBLAS for the BLAS library. OpenBLAS is based on the Goto BLAS
implementation and generally offers better performance than a non-optimised
system BLAS. However, the library must be installed on the system.
\item \inlsh{NEKTAR\_USE\_MKL}
Use the Intel MKL library. This is typically available on cluster
environments and should offer performance tuned for the specific cluster
environment.
\item \inlsh{NEKTAR\_USE\_MPI} (Recommended)
Build Nektar++ with MPI parallelisation. This allows solvers to be run in
serial or parallel.
\item \inlsh{NEKTAR\_USE\_FFTW}
Build Nektar++ with support for FFTW for performing Fast Fourier Transforms
(FFTs). This is used only when using domains with homogeneous coordinate
directions.
\item \inlsh{NEKTAR\_USE\_ARPACK}
Build Nektar++ with support for ARPACK. This provides routines used for
linear stability analyses. Alternative Arnoldi algorithms are also
implemented directly in Nektar++.
\item \inlsh{NEKTAR\_USE\_VTK}
Build Nektar++ with support for VTK libraries. This is only needed for
specialist utilities and is not needed for general use.
\begin{notebox}
The VTK libraries are not needed for converting the output of simulations to
VTK format for visualization as this is handled internally.
\end{notebox}
\end{itemize}
The \inlsh{THIRDPARTY\_BUILD\_X} options select which third-party libraries are
automatically built during the \nekpp build process. Below are the choices of X:
\begin{itemize}
\item \inlsh{BOOST}
The \emph{Boost} libraries are frequently provided by the operating system,
so automatic compilation is not enabled by default. If you do not have
Boost on your system, you can enable this to have Boost configured
automatically.
\item \inlsh{GSMPI}
(MPI-only) Parallel communication library.
\item \inlsh{LOKI}
An implementation of a singleton.
\item \inlsh{METIS}
A graph partitioning library used for substructuring of matrices and mesh
partitioning when Nektar++ is run in parallel.
\item \inlsh{TINYXML}
Library for reading and writing XML files.
\end{itemize}
\chapter{Solvers}
\label{c:solvers}
\label{s:solvers}
\input{adr}
\input{ape}
......
......@@ -152,6 +152,7 @@ openany, % A chapter may start on either a recto or verso page.
%%%-----------------------------------------------------------------------------
\usepackage{xcolor}
\usepackage{listings} % Display code / shell commands
\usepackage{lstautogobble}
\usepackage{xspace}
%\newcommand{\shellcommand}[1]{\begin{lstlisting} \#1 \end{lstlisting}
\lstdefinestyle{BashInputStyle}{
......@@ -160,12 +161,16 @@ openany, % A chapter may start on either a recto or verso page.
% numbers=left,
% numberstyle=\tiny,
% numbersep=3pt,
frame=,
frame=single,
columns=fullflexible,
backgroundcolor=\color{black!10},
backgroundcolor=\color{yellow!10},
linewidth=\linewidth,
xleftmargin=0.05\linewidth,
keepspaces=true
keepspaces=true,
framesep=5pt,
rulecolor=\color{black!30},
aboveskip=10pt,
autogobble=true
}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
......@@ -202,11 +207,76 @@ openany, % A chapter may start on either a recto or verso page.
\usepackage{tikz}
\newcommand{\inltt}[1]{\tikz[anchor=base,baseline]\node[inner sep=3pt,
rounded corners,outer sep=0,draw=black!30,fill=black!10]{\texttt{#1}};}
rounded corners,outer sep=0,draw=black!30,fill=black!05]{\small\texttt{#1}};}
\newcommand{\inlsh}[1]{\tikz[anchor=base,baseline]\node[inner sep=2pt,
outer sep=0,fill=black!10]{\texttt{#1}};}
outer sep=0,fill=black!05]{\texttt{#1}};}
\newcommand{\nekpp}{{\em Nektar++}\xspace}
% Highlight box
\usepackage{environ}
\usepackage[tikz]{bclogo}
\usetikzlibrary{calc}
\NewEnviron{notebox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=3pt,fill=black!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\textwidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bcinfo};
\end{minipage}%
\begin{minipage}{.8\textwidth}
\textbf{Note}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{warningbox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=3pt,fill=red!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\textwidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bcdanger};
\end{minipage}%
\begin{minipage}{.8\textwidth}
\textbf{Warning}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{tipbox}
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=3pt,fill=green!10,draw=black!30] (box)
{\parbox[t]{.99\linewidth}{%
\begin{minipage}{.1\textwidth}
\centering\tikz[scale=1]\node[scale=1.5]{\bclampe};
\end{minipage}%
\begin{minipage}{.8\textwidth}
\textbf{Tip}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
\NewEnviron{custombox}[3]
{\par\medskip\noindent
\begin{tikzpicture}
\node[inner sep=3pt,fill=#3!10,draw=black!30] (box)
{\parbox[t]{.99\textwidth}{%
\begin{minipage}{.1\textwidth}
\centering\tikz[scale=1]\node[scale=1.5]{#2};
\end{minipage}%
\begin{minipage}{.8\textwidth}
\textbf{#1}\par\smallskip
\BODY
\end{minipage}\hfill}%
};
\end{tikzpicture}\par\medskip%
}
%%% TABLE OF CONTENTS AND INDEX
%%%-----------------------------------------------------------------------------
......@@ -225,12 +295,23 @@ colorlinks,
citecolor=darkblue,
filecolor=darkblue,
linkcolor=darkblue,
urlcolor=darkblue
urlcolor=darkblue,
pdfborder={0 0 0}, % No borders around internal hyperlinks
pdfauthor={I am the Author} % author
}
\usepackage{memhfixc} %
% \makeatletter
% \def\@setref#1#2#3{%
% \ifx#1\relax
% \protect\G@refundefinedtrue
% \nfss@text{\reset@font\bfseries\huge\textcolor{red}{#3 undefined}}%
% \@latex@warning{Reference `#3' on page \thepage \space
% undefined}%
% \else
% \expandafter#2#1\null
% \fi}
% \makeatother
%%% PRETTY TITLE PAGE FOR PDF DOC
%%%-----------------------------------------------------------------------------
......
Markdown is supported
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