|Version 18 (modified by acomerfo, 13 months ago) (diff)|
Mac OS X compilation instructions
Install Apple's Xcode Developer Tools
Apple's Xcode Developer Tools can be install either from the App Store (only on Mac OS 10.7 and above) or download directly from http://connect.apple.com/ (you are required to have an Apple Developer Connection account).
Getting the Nektar++ source code and ThirdParty packages
The Nektar++ source code and required ThirdParty libraries can be downloaded from Downloads. These can be unpacked in the terminal (Applications->Utilities->Terminal) using the following commands:
- Unpack the nektar++-3.2.0.tar.gz file:
tar -zxvf nektar++-3.2.0.tar.gz
- Unpack the ThirdParty-3.2.0.tar.gz file.
tar -zxvf ThirdParty-3.2.0.tar.gz
Rename the resulting directory to ThirdParty/ and put it in nektar++-3.2.0/. (This will mean library/ and ThirdParty/ are both sub-directories of the original nektar++-3.2.0/.)
A number of third party libraries are required by Nektar++ in order to function. These can either be installed directly from the downloaded third party libraries (for details see the instructions for Linux) or alternatively using MacPorts MacPorts. MacPorts is a free/open source software that simplifies the installation of packages on Mac OS X. Below an outline of the MacPorts install is given.
ThirdParty libraries installation using MacPorts
Note: In the following there are a number of packages that must be installed from the ThirdParty libraries; this is because a number of libraries have been modified for Nektar++. The following requires superuser permissions on your system.
- CMake is an open-source, cross-platform make file generator system. To check whether cmake is installed on your system type:
If the command is not available on your system, you need to install the cmake package.
The following command will install all of the packages, which are available from MacPorts, required by Nektar++ This can be done by typing the following command:
sudo port install cmake zlib boost fftw-3 arpack
Note fftw-3 and arpack are optional.
The rest of the ThirdParty packages must be installed from the provided libraries in the nektar++-3.2.0/ThirdParty directory.
At the terminal in ThirdParty/, extract the tinyxml_2_4_3.zip archive with
Extract the loki-0.1.3.tar.bz2 archive withThis will create loki-0.1.3/.
tar -xjvf loki-0.1.3.tar.bz2
- NIST Sparse BLAS
Extract and compile the sparse matrix library developed by NIST. For more information about this library, see http://math.nist.gov/spblas/original.html
tar -xjvf spblastk0.9b.tar.bz2 cd spblastk0.9b/build/ cmake ../ make install
Extract and compile the graph partitioning package METIS. As we use a modified version of the standard METIS distribution, you are required to link against this version rather than the standard version possibly available on your system. For more information about the original METIS library, see http://www.cs.umn.edu/~karypis/metis
tar -xjvf modmetis-4.0.tar.bz2 cd modmetis-4.0/ cmake ../ make install
Change to the nektar++-3.2.0/builds directory. Configure the Nektar++ software as follows:
cmake ../ make install
To modify the default configuration use cmake -i ../ or one of the graphical frontends to CMake such as ccmake ../.
If you have multiple cores on your machine, tell make to use them: e.g. for 4 cores: make -j4 install.
To verify the build procedure, Nektar++ comes with a series of unit and regression tests. From the nektar++/builds directory run the tests and check they all pass: