Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nektar
Nektar
Commits
e18516dd
Commit
e18516dd
authored
Nov 04, 2014
by
Dave Moxey
Browse files
Rewrite Windows instructions
parent
c6dec108
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/user-guide/installation/source.tex
View file @
e18516dd
...
...
@@ -95,7 +95,7 @@ Open a terminal.
If you have downloaded the tarball, first unpack it:
\begin{lstlisting}
[style=BashInputStyle]
tar -zxvf nektar++-
4.0.0
.tar.gz
tar -zxvf nektar++-
\nekver
.tar.gz
\end{lstlisting}
Change into the
\inlsh
{
nektar++
}
source code directory
\begin{lstlisting}
[style=BashInputStyle]
...
...
@@ -109,7 +109,7 @@ 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
tar -zxvf nektar++-
\nekver
.tar.gz
\end{lstlisting}
\item
Change into the source-code directory, create a
\inltt
{
build
}
...
...
@@ -185,7 +185,7 @@ From a terminal:
\end{lstlisting}
\end{enumerate}
\subsection
{
OSX
}
\subsection
{
OS
X
}
\subsubsection
{
Prerequisites
}
\nekpp
uses a number of external programs and libraries for some or all of its
...
...
@@ -197,13 +197,12 @@ compiled for use with Nektar++ \emph{automatically} (but not installed
system-wide).
\begin{notebox}
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).
Xcode includes Apple implementations of BLAS and LAPACK (called the Accelerate
Framework).
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).
\end{notebox}
\begin{center}
...
...
@@ -262,7 +261,7 @@ 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
tar -zxvf nektar++-
\nekver
.tar.gz
\end{lstlisting}
Change into the
\inlsh
{
nektar++
}
source code directory
\begin{lstlisting}
[style=BashInputStyle]
...
...
@@ -276,7 +275,7 @@ 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
tar -zxvf nektar++-
\nekver
.tar.gz
\end{lstlisting}
\item
Change into the source-code directory, create a
\inltt
{
build
}
...
...
@@ -352,183 +351,109 @@ From a terminal (Applications->Utilities->Terminal):
\subsection
{
Windows
}
Windows compilation is supported, but presently the build process is somewhat
convoluted. As such, only serial execution is supported with a minimal amount of
additional build packages:
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.
\begin{center}
\begin{tabular}
{
lccc
c
l
}
\begin{tabular}
{
lcccl
}
\toprule
Package
&
Req.
&
\multicolumn
{
2
}{
c
}{
Installation
}
&
Note
\\
\cline
{
3-
5
}
&
&
User
&
Auto.
&
\\
&
&
\multicolumn
{
2
}{
c
}{
Installation
}
&
\\
\cmidrule
(r)
{
3-
4
}
Package
&
Req.
&
User
&
Auto.
&
Note
\\
\midrule
MS Visual Studio
2012/2013
&
\check
mark
&
&
&
&
\\
CMake
$
>
=
3
.
0
$
&
\check
mark
&
\c
heck
mark
&
&
\\
BLAS
&
\check
mark
&
\c
heck
mark
&
&
Part of Xcode
\\
LAPACK
&
\check
mark
&
\c
heck
mark
&
&
Part of Xcode
\\
Boost
$
>
1
.
49
$
&
\check
mark
&
\c
heck
mark
&
\c
heck
mark
&
Compile with iostreams
\\
ModMETIS
&
\checkmark
&
&
\checkmark
&
\\
MS Visual Studio
&
\cmark
&
\c
mark
&
&
2012 and 2013 known working
\\
CMake
$
\geq
3
.
0
$
&
\c
mark
&
\cmark
&
&
\\
BLAS
&
\c
mark
&
\cmark
&
\cmark
&
\\
LAPACK
&
\c
mark
&
\cmark
&
\cmark
&
\\
Boost
$
\geq
1
.
55
$
&
\c
mark
&
\cmark
&
\cmark
&
Compile with iostreams
\\
ModMETIS
&
\cmark
&
\cmark
&
\cmark
&
\\
\bottomrule
\end{tabular}
\end{center}
\begin{itemize}
\item
Microsoft Visual Studio 2012 or 2013 (Windows 7 SP1+ required).
\item
CMake 3.0+ (download from
\url
{
http://www.cmake.org/download/
}
)
\subsubsection
{
Detailed instructions
}
\begin{enumerate}
\item
Install Microsoft Visual Studio 2013 (preferred) or 2012 (known to
work). This can be obtained from Microsoft free of charge by using their
Express developer tools from
\url
{
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
}
.
\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
\url
{
http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/
}
. By
default these install into
\inlsh
{
C:
\textbackslash
local
\textbackslash
boost
\_
1
\_
55
\_
0
}
. If you use these libraries, you will need to:
\begin{itemize}
\item
When prompted, select the option to add CMake to the system PATH.
\item
Rename
\texttt
{
libs-msvc12.0
}
to
\texttt
{
lib
}
\item
Inside the
\texttt
{
lib
}
directory, create duplicates of
\texttt
{
boost
\_
zlib.dll
}
and
\texttt
{
boost
\_
bzip2.dll
}
called
\texttt
{
zlib.dll
}
and
\texttt
{
libbz2.dll
}
.
\end{itemize}
\item
WinRAR (download from
\url
{
http://www.rarlab.com/download.htm
}
)
\item
Optionally, you can install Git to use development versions.
\end{itemize}
\newcommand
{
\nekver
}{
\input
{
../../VERSION
}}
\subsubsection
{
Unpack the tarballs
}
\begin{itemize}
\item
Unpack the
\inlsh
{
nektar++-
\nekver
.tar.gz
}
file using WinRAR.
\item
Create a
\inlsh
{
ThirdParty
}
directory within the
\inlsh
{
nektar++-
\nekver
}
subdirectory.
\end{itemize}
\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}
\subsubsection
{
Installing Boost
}
Boost can either be
Download ThirdParty packages from
\inlsh
{
www.nektar.info/thirdparty
}
as requried
below.
\begin{itemize}
\item
\textbf
{
TinyXML
}
Extract the
\inlsh
{
tinyxml
\_
2
\_
4
\_
3.zip
}
archive into
the ThirdParty directory using WinRAR. This will create a
\inlsh
{
tinyxml
}
sub-directory.
\item
\textbf
{
Loki
}
Extract the
\inlsh
{
loki-0.1.3.tar.bz2
}
archive into the
ThirdParty directory using WinRAR. This will create a
\inlsh
{
loki-0.1.3
}
sub-directory.
\item
\textbf
{
Mod-METIS
}
Extract the
\inlsh
{
modmetis-4.0.tar.bz2
}
archive
into the ThirdParty directory using WinRAR. This will create a
\inlsh
{
modmetis-4.0
}
sub-directory.
\begin{itemize}
\item
Open a command-line terminal and change to
\inlsh
{
ThirdParty
\textbackslash
modmetis-4.0
\textbackslash
build
}
.
\item
Run
\begin{lstlisting}
[style=BashInputStyle]
cmake ..
\
vcbuild "ModifiedMetis.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
\end{itemize}
\item
\textbf
{
NIST SparseBLAS
}
Extract the
\inlsh
{
spblastk0.9b
}
archive
into the ThirdParty directory using WinRAR. This will create a
\inlsh
{
spblastk0.9b
}
sub-directory.
\begin{itemize}
\item
From a command-line terminal change to
\inlsh
{
ThirdParty
\textbackslash
spblastk0.9b
\textbackslash
build
}
.
\item
Run
\begin{lstlisting}
[style=BashInputStyle]
cmake ..
\
vcbuild "NistSparseBlasToolkit.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
\end{itemize}
\item
\textbf
{
BLAS/LAPACK
}
Extract the
\inlsh
{
blaslapack-dll.zip
}
archive
into the ThirdParty directory using WinRAR. This will create
\inlsh
{
blas
\_
win32.*
}
and
\inlsh
{
lapack
\_
win32.*
}
files in the ThirdParty
directory.
\item
\textbf
{
ZLib
}
Extract the
\inlsh
{
zlib-1.2.3.tar.bz2
}
archive using
WinRAR. This will create a
\inlsh
{
zlib-1.2.3
}
sub-directory.
\item
\textbf
{
Boost
}
Extract the
\inlsh
{
boost
\_
1
\_
49
\_
0.tar.bz2
}
archive using
WinRAR. This will create a
{{{
boost
\_
1
\_
49
\_
0
}}}
sub-directory.
\begin{itemize}
\item
Open a command-line terminal and change to the
\inlsh
{
boost
\_
1
\_
49
\_
0
}
directory and run:
\begin{lstlisting}
[style=BashInputStyle]
bootstrap.bat
b2.exe -s ZLIB
_
SOURCE=..
\.
.
\.
.
\.
.
\zlib
-1.2.3
\
--prefix=..
\boost
toolset=msvc-9.0 install
\end{lstlisting}
\end{itemize}
\begin{notebox}
Boost might not be able to find the
\inlsh
{
zlib-1.2.3
}
directory specified
by the relative path in the command line above. If this happens, you can
replace the relative path with the absolute path of the
\inlsh
{
zlib-1.2.3
}
directory (surround it in quotes).
\end{notebox}
\end{itemize}
\subsubsection
{
Building Nektar++
}
Change to the
\inlsh
{
nektar++-
\nekver\textbackslash
builds
}
directory.
\begin{lstlisting}
[style=BashInputStyle]
cmake ..
\
vcbuild "Nektar++.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
To modify the default configuration use
\inlsh
{
cmake -i ..
\textbackslash
}
or use
the CMake-gui application.
\subsubsection
{
Notes on building on windows 7 64 bit with Visual Studio 10
}
To get a build working on a windows 7 64 bit machine with VS10, the following
modifications were helpful or necessary:
\begin{itemize}
\item
Instead of vcbuild (which doesn't exist in VS10) use msbuild.
\item
You may need to run
\\
\inlsh
{
C:
\textbackslash
Program Files
(x86)
\textbackslash
Microsoft Visual Studio 10.0
\textbackslash
VC
\textbackslash
vcvarsall.bat
}
\\
first to set up some registry entries to run
msbuild.
Try without first.
\item
You will probably wish to put msbuild into your path
\item
project files created by cmake are likely to have the extension .vcxproj
rather than .vcproj.
\item
When running b2.exe, provide the full path to zlib. Not doing so will only
cause an error later when running cmake for Nektar++
\item
When running b2.exe, use toolset=msvc-10.0 instead of toolset=msvc-9.0
\item
When using cmake for nektar++, it is helpful to use the cmake gui
\item
Using the cmake gui, set the BOOST
\_
ROOT variable to the appropriate path
for boost * Set Boost
\_
USE
\_
STATIC
\_
LIBS = ON (I did this by editing
CMakeLists.txt, but setting it from the gui should work)
\item
When running msbuild "Nektar++.sln" I got error can't find zlib.lib. As a
workaround, copy the files zlibd.lib (two of them) and rename the copies zlib.lib.
However, I believe these are the debug builds, so it would be better to work
out how to build in release mode.
\item
At this stage, when running msbuild "Nektar++.sln", I got boost link
errors.
To fix them, look for the line
\begin{lstlisting}
[style=BashInputStyle]
ADD
_
DEFINITIONS(-DBOOST
_
ALL
_
NO
_
LIB -DBOOST
_
PROGRAM
_
OPTIONS
_
DYN
_
LINK
\
-DBOOST
_
IOSTREAMS
_
DYN
_
LINK -DBOOST
_
THREAD
_
DYN
_
LINK)
\end{lstlisting}
in the
\inlsh
{
CMakeLists.txt
}
file and comment it out (and run cmake again)
\item
At this point, when building Nektar, linking against boost is fine, but I
got a compile error in TestData.cpp. This could be fixed by editing TestData.cpp
and replacing the line
\begin{lstlisting}
m
_
doc = new TiXmlDocument(pFilename.file
_
string().c
_
str());
\end{lstlisting}
with
\begin{lstlisting}
m
_
doc =new TiXmlDocument(pFilename.string().c
_
str());
\end{lstlisting}
\end{itemize}
\begin{notebox}
The step of building INSTALL.vcproj causes executables and dlls to be copied
into a directory
\inlsh
{
<path>
\textbackslash
nektar
\textbackslash
builds-test
\textbackslash
dist
\textbackslash
bin
}
.
The executables should be run from here so that they can find the dlls they need.
\end{notebox}
If you wish to put a breakpoint in to step through Nektar++, you may need to run
from the folder the executable was built in so that the pdb files are in the
expected place. Then a workaround is to copy the dlls into that folder.
\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
\emph
{
All Programs > Visual Studio 2013 > Visual Studio Tools > Developer
Command Prompt for VS2013
}
.
\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
that
\emph
{
Visual Studio 2013
}
is listed as
\emph
{
Visual Studio 12
}
in the
drop-down list. If you have a 64-bit installation of Windows 7, you should
select the
\emph
{
Win64
}
variant, otherwise 32-bit executables will be
generated. Select the option to use the native compilers.
\item
Click the
\emph
{
Configure
}
button.
\item
An error will appear, since Boost cannot be found. To rectify this,
select the option named
\inltt
{
THIRDPARTY
\_
BUILD
\_
BOOST
}
, and click Generate.
\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}
\item
\inlsh
{
builds
\textbackslash
dist
\textbackslash
lib
}
\item
\inlsh
{
builds
\textbackslash
dist
\textbackslash
bin
}
\item
\inlsh
{
builds
\textbackslash
ThirdParty
\textbackslash
dist
\textbackslash
lib
}
\item
Optionally, if you installed Boost from the binary packages,
\inlsh
{
C:
\textbackslash
local
\textbackslash
boost
\_
1
\_
55
\_
0
\textbackslash
lib
}
\end{itemize}
\item
Open a
\textbf
{
new
}
command line window, change to the
\inlsh
{
builds
}
directory, and then run the test suite by issuing the command
\begin{lstlisting}
[style=BashInputStyle]
ctest -C Release
\end{lstlisting}
\end{enumerate}
\subsection
{
CMake Option Reference
}
\label
{
s:installation:source:cmake
}
...
...
docs/user-guide/user-guide.tex
View file @
e18516dd
...
...
@@ -149,6 +149,9 @@ openany, % A chapter may start on either a recto or verso page.
%%% NEW COMMANDS
%%%-----------------------------------------------------------------------------
% Nektar++ version
\usepackage
{
xspace
}
\newcommand
{
\nekver
}{
\input
{
../../VERSION
}
\xspace
}
\newcommand
{
\p
}{
\partial
}
%Partial
% Or what ever you want
...
...
@@ -159,7 +162,6 @@ 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
}{
language=bash,
...
...
@@ -340,7 +342,7 @@ pdfauthor={I am the Author} % author
\vspace
{
\drop
}
{
\Huge\bfseries\raggedright\@
title
\par
}
\vskip
2.37
\baselineskip
{
\huge\bfseries
Version
\
input
{
../../VERSION
}
\par
}
{
\huge\bfseries
Version
\
nekver
\par
}
\vskip
4
\baselineskip
{
\huge\bfseries
\textcolor
{
darkgreen
}{
User Guide
}
\par
}
\vskip
1.0
\baselineskip
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment