source.tex 26.3 KB
Newer Older
1
\section{Installing from Source}
2
\label{s:installation:source}
3

4
This section explains how to build Nektar++ from the source-code package.
5 6

Nektar++ uses a number of third-party libraries. Some of these are required,
7 8 9 10 11 12
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.
13 14 15 16 17 18 19 20 21 22


\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
23
	credentials but any changes to the code cannot be pushed to the
Michael Turner's avatar
Michael Turner committed
24
	public repository. Use this initially if you would like to try using
25
	Nektar++ or make local changes to the code.
26
    \begin{lstlisting}[style=BashInputStyle]
27
        git clone http://gitlab.nektar.info/clone/nektar/nektar.git nektar++
28 29 30 31
    \end{lstlisting}
	\item Using authenticated access. This will allow you to directly contribute
	back into the code.
    \begin{lstlisting}[style=BashInputStyle]
32
        git clone git@gitlab.nektar.info:nektar/nektar.git nektar++
33
    \end{lstlisting}
34 35 36 37
    \begin{tipbox}
    You can easily switch to using the authenticated access from anonymous
    access at a later date.
    \end{tipbox}
38 39 40
	\end{itemize}
\end{itemize}

41
\subsection{Linux}
42
\subsubsection{Prerequisites}
43 44 45 46 47 48 49 50 51
\nekpp uses a number of external programs and libraries for some or all of its
functionality. Some of these are \emph{required} and must be installed prior to
compiling Nektar++, most of which are available as pre-built \emph{system}
packages on most Linux distributions or can be installed manually by a
\emph{user}. Others are optional and required only for specific features, or can
be downloaded and compiled for use with Nektar++ \emph{automatically} (but not
installed system-wide).

\begin{center}
52
\begin{tabularx}{\linewidth}{lccccX}
53
\toprule
54 55
        &      & \multicolumn{3}{c}{Installation} & \\ \cmidrule(r){3-5}
Package & Req. & Sys. & User & Auto.              & Note \\
56
\midrule
57 58
C++ compiler    & \cmark & \cmark & & & gcc, icc, etc \\
CMake  $>2.8.7$ & \cmark & \cmark & \cmark &        & Ncurses
59 60
GUI optional
\\
61
BLAS            & \cmark & \cmark & \cmark &        & Or MKL,
62 63
ACML, OpenBLAS
\\
64
LAPACK          & \cmark & \cmark & \cmark &        & \\
65
Boost $>=1.52$   & \cmark & \cmark & \cmark & \cmark & Compile
66 67
with iostreams
\\
68 69 70 71
Scotch          &        & \cmark & \cmark & \cmark & Required
for multi-level static condensation, highly recommended\\
METIS           &        & \cmark & \cmark & \cmark &
Alternative mesh partitioning\\
72
FFTW $>3.0$     &        & \cmark & \cmark & \cmark & For
73
high-performance FFTs\\
74
ARPACK $>2.0$   &        & \cmark & \cmark &        & For
75
arnoldi algorithms\\
76
OpenMPI         &        & \cmark &        &        & For
77
parallel execution\\
78
GSMPI           &        &        &        & \cmark & For
79
parallel execution\\
80
HDF5            &        & \cmark & \cmark & \cmark & For
81
large-scale parallel I/O (requires CMake >3.1)\\
82
PETSc           &        &        & \cmark & \cmark &
83
Alternative linear solvers\\
84
VTK $>5.8$      &        & \cmark & \cmark &        & Visualisation
85 86
utilities\\
\bottomrule
87
\end{tabularx}
88 89 90 91 92 93
\end{center}

\begin{warningbox}
Boost version 1.51 has a bug which prevents \nekpp working correctly.
Please use a newer version.
\end{warningbox}
94 95 96 97 98 99 100


\subsubsection{Quick Start}
Open a terminal.

If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
101
tar -zxvf nektar++-(*\nekver*).tar.gz
102 103 104
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
Michael Turner's avatar
Michael Turner committed
105
    mkdir -p build && cd build
106 107 108 109 110 111 112 113 114
    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]
115
tar -zxvf nektar++-(*\nekver*).tar.gz
116
    \end{lstlisting}
Michael Turner's avatar
Michael Turner committed
117

118
    \item Change into the source-code directory, create a \inltt{build}
Michael Turner's avatar
Michael Turner committed
119
    subdirectory and enter it
120 121 122
    \begin{lstlisting}[style=BashInputStyle]
    mkdir -p build && cd build
    \end{lstlisting}
Michael Turner's avatar
Michael Turner committed
123

124
    \item Run the CMake GUI and configure the build by pressing \inltt{c}
125 126 127 128 129 130 131 132 133
    \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.
134
        \item Select the libraries not already available on your system which
Michael Turner's avatar
Michael Turner committed
135
        you wish to be compiled automatically (prefixed with
136
        \inltt{THIRDPARTY\_BUILD\_})
137 138 139
    \end{itemize}
    A full list of configuration options can be found in
    Section~\ref{s:installation:source:cmake}.
140 141 142 143 144 145 146 147

    \begin{notebox}
    Selecting \inltt{THIRDPARTY\_BUILD\_} options will request CMake to
    automatically download thirdparty libraries and compile them within the
    \nekpp directory. If you have administrative access to your machine, it is
    recommended to install the libraries system-wide through your
    package-management system.
    \end{notebox}
Michael Turner's avatar
Michael Turner committed
148 149


150
    \item Press \inltt{c} to configure the build. If errors arise relating to
151 152 153
    missing libraries, review the \inltt{THIRDPARTY\_BUILD\_} selections in
    the configuration step above or install the missing libraries manually or
    from system packages.
Michael Turner's avatar
Michael Turner committed
154

155 156 157
    \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.
Michael Turner's avatar
Michael Turner committed
158

159 160 161 162 163 164
    \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.
Michael Turner's avatar
Michael Turner committed
165

166 167 168 169 170 171 172 173
    % 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}
Michael Turner's avatar
Michael Turner committed
174

175 176 177
    \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
178
    the number of simultaneous jobs to spawn. For example, use
Michael Turner's avatar
Michael Turner committed
179

180
    \noindent\usebox\installationLinuxTip
Michael Turner's avatar
Michael Turner committed
181

182
    on a quad-core system.
183
    \end{tipbox}
Michael Turner's avatar
Michael Turner committed
184

185 186 187 188 189
    \item Test the build by running unit and regression tests.
    \begin{lstlisting}[style=BashInputStyle]
    ctest
    \end{lstlisting}
\end{enumerate}
190

Dave Moxey's avatar
Dave Moxey committed
191
\subsection{OS X}
192 193

\subsubsection{Prerequisites}
194 195 196 197
\nekpp uses a number of external programs and libraries for some or all of its
functionality. Some of these are \emph{required} and must be installed prior to
compiling Nektar++, most of which are available on \emph{MacPorts}
(www.macports.org) or can be installed manually by a \emph{user}. Others are
Michael Turner's avatar
Michael Turner committed
198
optional and required only for specific features, or can be downloaded and
199 200 201 202
compiled for use with Nektar++ \emph{automatically} (but not installed
system-wide).

\begin{notebox}
Dave Moxey's avatar
Dave Moxey committed
203 204 205 206 207 208
  To compile \nekpp on OS X, 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).  Xcode includes Apple
  implementations of BLAS and LAPACK (called the Accelerate Framework).
209
\end{notebox}
210

211
\begin{center}
212
\begin{tabularx}{\linewidth}{lccccX}
213
\toprule
214 215
        &      & \multicolumn{3}{c}{Installation} & \\ \cmidrule(r){3-5}
Package & Req. & MacPorts & User & Auto.          & Note \\
216
\midrule
217 218
Xcode           & \cmark &        & & & Provides developer tools \\
CMake  $>2.8.7$ & \cmark & \texttt{cmake}   & \cmark &        & Ncurses
219
GUI optional \\
220
BLAS            & \cmark &                  &        &        & Part of
221
Xcode \\
222
LAPACK          & \cmark &                  &        &        & Part of
223
Xcode \\
224
Boost $>=1.52$   & \cmark & \texttt{boost}   & \cmark & \cmark & Compile
225 226
with iostreams \\
TinyXML         & \cmark & \texttt{tinyxml} & \cmark & \cmark & \\
227 228 229 230
Scotch          &        & \texttt{scotch}  & \cmark & \cmark & Required
for multi-level static condensation, highly recommended\\
METIS           &        & \texttt{metis}   & \cmark & \cmark &
Alternative mesh partitioning\\
231
FFTW $>3.0$     &        & \texttt{fftw-3}  & \cmark & \cmark & For
232
high-performance FFTs\\
233
ARPACK $>2.0$   &        & \texttt{arpack}  & \cmark &        & For
234
arnoldi algorithms\\
235
OpenMPI         &        & \texttt{openmpi} &        &        & For
236
parallel execution\\
237
GSMPI           &        &                  &        & \cmark & For
238
parallel execution\\
239
HDF5            &        & \cmark & \cmark & \cmark & For
Dave Moxey's avatar
Dave Moxey committed
240
large-scale parallel I/O (requires CMake >3.1)\\
241
PETSc           &        & \texttt{petsc}   & \cmark & \cmark &
242
Alternative linear solvers\\
243
VTK $>5.8$      &        & \texttt{vtk}     & \cmark &        &
244 245
Visualisation utilities\\
\bottomrule
246
\end{tabularx}
247 248 249 250
\end{center}

\newsavebox\installationOSXMacPortsTip
\begin{lrbox}{\installationOSXMacPortsTip}\begin{minipage}{0.8\linewidth}
251 252 253
\begin{lstlisting}[style=BashInputStyle]
sudo port install cmake
\end{lstlisting}
254 255 256 257 258 259 260 261
\end{minipage}
\end{lrbox}

\begin{tipbox}
CMake, and some other software, is available from MacPorts
(\url{http://macports.org}) and can be installed using, for example,

\noindent\usebox\installationOSXMacPortsTip
262 263 264

Package names are given in the table above. Similar packages also exist in other
package managers such as Homebrew.
265
\end{tipbox}
266 267 268 269 270 271 272


\subsubsection{Quick Start}
Open a terminal (Applications->Utilities->Terminal).

If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
273
tar -zxvf nektar++-(*\nekver*).tar.gz
274 275 276
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
Michael Turner's avatar
Michael Turner committed
277
    mkdir -p build && cd build
278 279 280 281 282 283 284 285 286
    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]
287
tar -zxvf nektar++-(*\nekver*).tar.gz
288 289 290
    \end{lstlisting}

    \item Change into the source-code directory, create a \inltt{build}
Michael Turner's avatar
Michael Turner committed
291
    subdirectory and enter it
292 293 294
    \begin{lstlisting}[style=BashInputStyle]
    mkdir -p build && cd build
    \end{lstlisting}
Michael Turner's avatar
Michael Turner committed
295

296 297 298 299
    \item Run the CMake GUI and configure the build
    \begin{lstlisting}[style=BashInputStyle]
    ccmake ../
    \end{lstlisting}
300 301
    Use the arrow keys to navigate the options and \inlsh{ENTER} to select/edit
    an option.
302 303 304 305 306 307
    \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.
308
        \item Select the libraries not already available on your system which
Michael Turner's avatar
Michael Turner committed
309
        you wish to be compiled automatically (prefixed with
310
        \inltt{THIRDPARTY\_BUILD\_})
Michael Turner's avatar
Michael Turner committed
311
        \item
312 313 314
    \end{itemize}
    A full list of configuration options can be found in
    Section~\ref{s:installation:source:cmake}.
315

316 317 318 319 320 321
    \begin{notebox}
    Selecting \inltt{THIRDPARTY\_BUILD\_} options will request CMake to
    automatically download thirdparty libraries and compile them within the
    \nekpp directory. If you have administrative access to your machine, it is
    recommended to install the libraries system-wide through MacPorts.
    \end{notebox}
Michael Turner's avatar
Michael Turner committed
322

323
    \item Press \inltt{c} to configure the build. If errors arise relating to
Michael Turner's avatar
Michael Turner committed
324
        missing libraries (variables set to \inlsh{NOTFOUND}), review the
325
        \inltt{THIRDPARTY\_BUILD\_} selections in the previous
Michael Turner's avatar
Michael Turner committed
326 327
    step or install the missing libraries manually or through MacPorts.

328 329 330
    \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.
Michael Turner's avatar
Michael Turner committed
331

332 333 334 335 336 337
    \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.
Michael Turner's avatar
Michael Turner committed
338

339 340 341 342 343 344 345 346
    % 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}
Michael Turner's avatar
Michael Turner committed
347

348 349 350 351 352 353
    \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}
Michael Turner's avatar
Michael Turner committed
354

355 356 357 358 359 360
    \item Test the build by running unit and regression tests.
    \begin{lstlisting}[style=BashInputStyle]
    ctest
    \end{lstlisting}
\end{enumerate}

361
\subsection{Windows}
362

Dave Moxey's avatar
Dave Moxey committed
363 364 365 366
Windows compilation is supported, but the build process is somewhat convoluted
at present. As such, only serial execution is supported with a minimal amount of
additional build packages. These can either be installed by the user, or
automatically in the build process.
Dave Moxey's avatar
Dave Moxey committed
367 368

\begin{center}
369
\begin{tabularx}{\linewidth}{lcccX}
Dave Moxey's avatar
Dave Moxey committed
370
\toprule
Dave Moxey's avatar
Dave Moxey committed
371 372
                  &        & \multicolumn{2}{c}{Installation} & \\ \cmidrule(r){3-4}
Package           & Req.   & User   & Auto.        & Note \\
Dave Moxey's avatar
Dave Moxey committed
373
\midrule
374
MS Visual Studio  & \cmark & \cmark &              & 2012, 2013 and 2015 known working\\
Dave Moxey's avatar
Dave Moxey committed
375 376 377 378
CMake $\geq 3.0$  & \cmark & \cmark &              & \\
BLAS              & \cmark & \cmark & \cmark       & \\
LAPACK            & \cmark & \cmark & \cmark       & \\
Boost $\geq 1.55$ & \cmark & \cmark & \cmark       & Compile with iostreams\\
Dave Moxey's avatar
Dave Moxey committed
379
\bottomrule
380
\end{tabularx}
Dave Moxey's avatar
Dave Moxey committed
381
\end{center}
382

Dave Moxey's avatar
Dave Moxey committed
383 384 385
\subsubsection{Detailed instructions}

\begin{enumerate}
386
  \item Install Microsoft Visual Studio 2015 (preferred), 2013 or 2012 (known to
Dave Moxey's avatar
Dave Moxey committed
387
  work). This can be obtained from Microsoft free of charge by using their
388 389
  Community developer tools from
  \url{https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx}.
Dave Moxey's avatar
Dave Moxey committed
390 391 392 393 394 395 396 397 398
  \item Install WinRAR from \url{http://www.rarlab.com/download.htm}.
  \item Install CMake 3.0+ from \url{http://www.cmake.org/download/}. When
  prompted, select the option to add CMake to the system PATH.
  \item (Optional) Install Git from \url{http://git-scm.com/download/win} to use
  the development versions of \nekpp. When prompted, select the option to add
  Git to the system PATH. You do not need to select the option to add Unix tools
  to the PATH.
  \item (Optional) If you do not wish to build boost during the compilation
  process (which can take some time), then boost binaries can be found at
399
  \url{http://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/}. By
Dave Moxey's avatar
Dave Moxey committed
400
  default these install into \inlsh{C:\textbackslash local\textbackslash
401
    boost\_1\_61\_0}. If you use these libraries, you will need to:
402
  \begin{itemize}
403
    \item Rename \texttt{libs-msvc14.0} to \texttt{lib}
Dave Moxey's avatar
Dave Moxey committed
404 405
    \item Inside the \texttt{lib} directory, create duplicates of
    \texttt{boost\_zlib.dll} and \texttt{boost\_bzip2.dll} called
406 407 408 409 410 411 412
    \texttt{zlib.dll} and \texttt{libbz2.dll}
	\item Add a \inlsh{BOOST\_HOME} environment variable. To do so,
	navigate to \emph{Control Panel > System and Security > System}, select
	\emph{Advanced System Settings}, and in the \emph{Advanced} tab click the
	\emph{Environment Variables}. In the \emph{System Variables} box, click
	\emph{New}. In the \emph{New System Variable} window, type \inlsh{BOOST\_HOME}
	next to \emph{Variable name} and \inlsh{C:\textbackslash local\textbackslash
413
	boost\_1\_61\_0} next to\emph{Variable value}.
414
  \end{itemize}
Dave Moxey's avatar
Dave Moxey committed
415 416 417 418 419 420 421 422 423 424 425
  \item Unpack \inlsh{nektar++-\nekver.tar.gz} using WinRAR.

  \begin{notebox}
    Some Windows versions do not recognise the path of a folder which has
    \inltt{++} in the name. If you think that your Windows version can not
    handle path containing special characters, you should rename
    \inlsh{nektar++-\nekver} to \inlsh{nektar-\nekver}.
  \end{notebox}
  \item Create a \inlsh{builds} directory within the \inlsh{nektar++-\nekver}
  subdirectory.
  \item Open a Visual Studio terminal. From the start menu, this can be found in
426 427
  \emph{All Programs > Visual Studio 2015 > Visual Studio Tools > Developer
    Command Prompt for VS2015}.
Dave Moxey's avatar
Dave Moxey committed
428 429 430 431 432 433 434
  \item Change directory into the \texttt{builds} directory and run the CMake
  graphical utility:
  \begin{lstlisting}[style=BashInputStyle]
    cd C:\path\to\nektar\builds
    cmake-gui ..
  \end{lstlisting}
  \item Select the build system you want to generate build scripts for. Note
435 436
  that \emph{Visual Studio 2015} is listed as \emph{Visual Studio 14} in the
  drop-down list. If you have a 64-bit installation of Windows, you should
Dave Moxey's avatar
Dave Moxey committed
437 438
  select the \emph{Win64} variant, otherwise 32-bit executables will be
  generated. Select the option to use the native compilers.
439
  \item Click the \emph{Configure} button, then the \emph{Generate} button.
Dave Moxey's avatar
Dave Moxey committed
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
  \item Return to the command line and issue the command:
  \begin{lstlisting}[style=BashInputStyle]
    msbuild INSTALL.vcxproj /p:Configuration=Release
  \end{lstlisting}
  To build in parallel with, for example, 12 processors, issue:
  \begin{lstlisting}[style=BashInputStyle]
    msbuild INSTALL.vcxproj /p:Configuration=Release /m:12
  \end{lstlisting}
  \item After the installation process is completed, the executables will be
  available in \inlsh{builds\textbackslash dist\textbackslash bin}.
  \item To use these executables, you need to modify your system \inlsh{PATH} to
  include the library directories where DLLs are stored. To do this, navigate to
  \emph{Control Panel > System and Security > System}, select \emph{Advanced
    System Settings}, and in the \emph{Advanced} tab click the \emph{Environment
    Variables}. In the \emph{System Variables} box, select \emph{Path} and click
  \emph{Edit}. To the end of this list, add the \textbf{full paths} to
  directories:
  \begin{itemize}
458
    \item \inlsh{builds\textbackslash dist\textbackslash lib\textbackslash nektar++-\nekver}
Dave Moxey's avatar
Dave Moxey committed
459 460
    \item \inlsh{builds\textbackslash dist\textbackslash bin}
    \item Optionally, if you installed Boost from the binary packages,
461
    \inlsh{C:\textbackslash local\textbackslash boost\_1\_61\_0 \textbackslash lib}
Dave Moxey's avatar
Dave Moxey committed
462
  \end{itemize}
463 464
  \item To run the test suite, open a \textbf{new} command line window, change
  to the \inlsh{builds} directory, and then issue the command
Dave Moxey's avatar
Dave Moxey committed
465 466 467 468
  \begin{lstlisting}[style=BashInputStyle]
    ctest -C Release
  \end{lstlisting}
\end{enumerate}
469 470

\subsection{CMake Option Reference}
471
\label{s:installation:source:cmake}
472 473 474 475 476 477 478 479 480 481 482 483 484
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)
Michael Turner's avatar
Michael Turner committed
485

486 487 488 489
    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.

490 491 492 493 494 495 496
    \item \inlsh{NEKTAR\_BUILD\_DOC}

    Compiles the Doxygen documentation for the code. This will be put in
    \begin{lstlisting}[style=BashInputStyle]
    $BUILDDIR/doxygen/html
    \end{lstlisting}

497
    \item \inlsh{NEKTAR\_BUILD\_LIBRARY} (Required)
Michael Turner's avatar
Michael Turner committed
498

499 500 501 502
    Compiles the Nektar++ framework libraries. This is required for all other
    options.

    \item \inlsh{NEKTAR\_BUILD\_SOLVERS} (Recommended)
Michael Turner's avatar
Michael Turner committed
503

504 505 506
    Compiles the solvers distributed with the \nekpp framework.

    If enabling \inlsh{NEKTAR\_BUILD\_SOLVERS}, individual solvers can be
507
    enabled or disabled. See Part~\ref{p:applications} for the list of available
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525
    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.
Michael Turner's avatar
Michael Turner committed
526

527
    \item \inlsh{NEKTAR\_SOLVER\_X}
Michael Turner's avatar
Michael Turner committed
528

529 530 531
    Enabled compilation of the 'X' solver.
\end{itemize}

532 533 534
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:
535
\begin{itemize}
536 537 538 539
    \item \inlsh{NEKTAR\_USE\_ACML}

    Use the optimised BLAS library for AMD processors.

540
    \item \inlsh{NEKTAR\_USE\_ACCELERATE\_FRAMEWORK}
Michael Turner's avatar
Michael Turner committed
541

542 543 544 545 546
    Use the Mac Osx accelerate framework for BLAS and LAPACK
    methods. This option should only be required under in a Mac OSX
    environment.

    \item \inlsh{NEKTAR\_USE\_ARPACK}
Michael Turner's avatar
Michael Turner committed
547

548 549 550
    Build \nekpp with support for ARPACK. This provides routines used for
    linear stability analyses. Alternative Arnoldi algorithms are also
    implemented directly in \nekpp.
Michael Turner's avatar
Michael Turner committed
551

552
    \item \inlsh{NEKTAR\_USE\_BLAS\_LAPACK} (Required)
Michael Turner's avatar
Michael Turner committed
553

554 555 556 557
    Enables the use of Basic Linear Algebra Subroutines libraries for linear
    algebra operations.

    \item \inlsh{NEKTAR\_USE\_SYSTEM\_BLAS\_LAPACK} (Recommended)
Michael Turner's avatar
Michael Turner committed
558

559 560 561
    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.
Michael Turner's avatar
Michael Turner committed
562

563
    \item \inlsh{NEKTAR\_USE\_CCM}
Michael Turner's avatar
Michael Turner committed
564

565
    Use the ccmio library provided with the Star-CCM package for
Michael Turner's avatar
Michael Turner committed
566
    reading ccm files. This option is required as part of NekMesh
567 568 569 570 571 572
    if you wish to convert a Star-CCM mesh into the Nektar format. It
    is possible to read a Tecplot plt file from Star-CCM but this
    output currently needs to be converted to ascii format using the
    Tecplot package.

    \item \inlsh{NEKTAR\_USE\_FFTW}
Michael Turner's avatar
Michael Turner committed
573

574 575 576
    Build \nekpp with support for FFTW for performing Fast Fourier Transforms
    (FFTs). This is used only when using domains with homogeneous coordinate
    directions.
Michael Turner's avatar
Michael Turner committed
577

578 579 580 581
    \item \inlsh{NEKTAR\_USE\_HDF5}

    Build \nekpp with support for HDF5. This enables input/output in the HDF5
    parallel file format, which can be very efficient for large numbers of
Chris Cantwell's avatar
Chris Cantwell committed
582
    processes. HDF5 output can be enabled by using a command-line option or
583
    in the \inlsh{SOLVERINFO} section of the XML file. This option requires 
Dave Moxey's avatar
Dave Moxey committed
584 585
    that \nekpp be built with MPI support with \inlsh{NEKTAR\_USE\_MPI} enabled
    and that HDF5 is compiled with MPI support.
586

587 588 589 590 591 592
    \item \inlsh{NEKTAR\_USE\_METIS}

    Build \nekpp with support for the METIS graph partitioning library. This
    provides both an alternative mesh partitioning algorithm to SCOTCH for
    parallel simulations.

593
    \item \inlsh{NEKTAR\_USE\_MKL}
Michael Turner's avatar
Michael Turner committed
594

595 596 597
    Use the Intel MKL library. This is typically available on cluster
    environments and should offer performance tuned for the specific cluster
    environment.
598

599
    \item \inlsh{NEKTAR\_USE\_MPI} (Recommended)
Michael Turner's avatar
Michael Turner committed
600

601 602
    Build Nektar++ with MPI parallelisation. This allows solvers to be run in
    serial or parallel.
Michael Turner's avatar
Michael Turner committed
603

604
    \item \inlsh{NEKTAR\_USE\_OPENBLAS}
Michael Turner's avatar
Michael Turner committed
605

606 607 608
    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.
Michael Turner's avatar
Michael Turner committed
609

610 611 612 613
    \item \inlsh{NEKTAR\_USE\_PETSC}

    Build \nekpp with support for the PETSc package for solving linear systems.

614
    \item \inlsh{NEKTAR\_USE\_SCOTCH} (Recommended)
615 616

    Build \nekpp with support for the SCOTCH graph partitioning library. This
617 618 619 620
    provides both a mesh partitioning algorithm for parallel simulations and
    enabled support for multi-level static condensation, so is highly
    recommended and enabled by default. However for systems that do not support
    SCOTCH build requirements (e.g. Windows), this can be disabled.
621 622 623 624 625

    \item \inlsh{NEKTAR\_USE\_SMV}

    Build \nekpp with support for optimised sparse matrix-vector operations.

626
    \item \inlsh{NEKTAR\_USE\_VTK}
Michael Turner's avatar
Michael Turner committed
627

628
    Build \nekpp with support for VTK libraries. This is only needed for
629
    specialist utilities and is not needed for general use.
Michael Turner's avatar
Michael Turner committed
630

631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
    \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}
Michael Turner's avatar
Michael Turner committed
648

649
    (MPI-only) Parallel communication library.
Michael Turner's avatar
Michael Turner committed
650

651
    \item \inlsh{METIS}
Michael Turner's avatar
Michael Turner committed
652

653 654
    A graph partitioning library used for mesh partitioning when \nekpp is run
    in parallel.
655 656 657 658 659 660 661

    \item \inlsh{PETSC}

    A package for the parallel solution of linear algebra systems.

    \item \inlsh{SCOTCH}

662 663 664
    A graph partitioning library used for mesh partitioning when \nekpp is run
    in parallel, and reordering routines that are used in multi-level static
    condensation.
665

666
    \item \inlsh{TINYXML}
Michael Turner's avatar
Michael Turner committed
667

668 669
    Library for reading and writing XML files.
\end{itemize}