Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 28 additions & 41 deletions docs/source/install_linux.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
Building OpenFAST
=================

OpenFAST uses the `CMake <https://cmake.org>`__ build system. We recommend installing OpenFAST using `spack <https://spack.readthedocs.io/en/latest>`__. However, we also provide some sample scripts in ``share`` folder if you choose to install without `spack`.
OpenFAST uses the `CMake <https://cmake.org>`__ build system.
We recommend building OpenFAST using `Spack <https://spack.readthedocs.io/en/latest>`__.
However, we also provide some sample scripts in ``openfast/share`` if you choose to proceed without `Spack`.

Dependencies
------------

OpenFAST has the following dependencies:

- LAPACK libraries provided through the variable ``BLASLIB``
- for the C++ API, `HDF5 <https://support.hdfgroup.org/HDF5/>`__ (provided by ``HDF5_ROOT``) and `yaml-cpp <https://github.com/jbeder/yaml-cpp>`__ (provided by ``YAML_ROOT``).

CMake Build Instructions
------------------------

::

git clone https://github.com/OpenFAST/OpenFAST.git
cd OpenFAST
mkdir build && cd build
cmake ../
make

A sample installation shell script is also provided in the ``openfast/share``. Run the script from ``openfast/`` as:
::

git clone https://github.com/OpenFAST/OpenFAST.git
cd OpenFAST
bash share/install.sh

Current CMake Options
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -28,17 +43,7 @@ Current CMake Options
- ``ORCA_DLL_LOAD`` - Enable OrcaFlex library load (Default: OFF)
- ``USE_DLL_INTERFACE`` - Enable runtime loading of dynamic libraries (Default: ON)

Dependencies
~~~~~~~~~~~~

OpenFAST has the following dependencies:

- ``LAPACK`` libraries provided through the variable ``BLASLIB``
- for the C++ API, `HDF5 <https://support.hdfgroup.org/HDF5/>`__ (provided by ``HDF5_ROOT``) and `yaml-cpp <https://github.com/jbeder/yaml-cpp>`__ (provided by ``YAML_ROOT``).



Building OpenFAST Semi-Automatically Using Spack on Mac OS X or Linux
Building OpenFAST Semi-Automatically Using Spack on macOS or Linux
---------------------------------------------------------------------

The following describes how to build OpenFAST and its dependencies
Expand All @@ -47,24 +52,20 @@ mostly automatically on your Mac using
This can also be used as a template to build OpenFAST on any
Linux system with Spack.

Step 1
~~~~~~
These instructions were developed on macOS 10.11 with the following tools installed via Homebrew:

This assumes you have a Homebrew installation of GCC installed already
(we are using GCC 6.3.0). These instructions have been tested on OSX 10.11.
We have built OpenFAST using Spack on MacOS Sierra by using Homebrew to
install ``cmake`` and ``pkg-config`` and defining these as external
packages in Spack (see
`packages.yaml.mac_sierra <https://github.com/NaluCFD/NaluSpack/blob/master/spack_config/packages.yaml.mac_sierra>`__).
- GCC 6.3.0
- CMake 3.6.1
- pkg-config 0.29.2

Step 2
Step 1
~~~~~~

Checkout the official Spack repo from github (we will checkout into ``${HOME}``):

``cd ${HOME} && git clone https://github.com/LLNL/spack.git``

Step 3
Step 2
~~~~~~

Add Spack shell support to your ``.profile`` by adding the lines:
Expand All @@ -74,7 +75,7 @@ Add Spack shell support to your ``.profile`` by adding the lines:
export SPACK_ROOT=${HOME}/spack
. $SPACK_ROOT/share/spack/setup-env.sh

Step 4
Step 3
~~~~~~

Copy the `https://github.com/OpenFAST/openfast/dev/share/spack/package.py`__ file
Expand All @@ -85,7 +86,7 @@ to your installation of Spack:
mkdir ${SPACK_ROOT}/etc/spack/openfast ; cd ${SPACK_ROOT}/etc/spack/openfast
wget --no-check-certificate https://github.com/OpenFAST/openfast/dev/share/spack/package.py

Step 5
Step 4
~~~~~~

Try ``spack info openfast`` to see if Spack works. If it does, check the
Expand All @@ -101,12 +102,10 @@ compilers you have available by:
-- clang --------------------------------------------------------
clang@8.0.0-apple clang@7.3.0-apple

Step 6
Step 5
~~~~~~

Install OpenFAST with whatever version of GCC (6.3.0 for us) you have
installed from Homebrew and force the build to use CMake 3.6.1 because
newer versions currently don't build on OS X:
Install OpenFAST with your chosen version of GCC:

::

Expand Down Expand Up @@ -134,15 +133,3 @@ The executables and libraries will be located at


Add the appropriate paths to your ``PATH`` and ``LD_LIBRARY_PATH`` to run OpenFAST.


Building OpenFAST manually on Mac OS X or Linux
-----------------------------------------------

A sample installation shell script is provided in the `share` folder. Run the script from `openfast_dir` as:

::

git clone https://github.com/OpenFAST/OpenFAST.git
cd OpenFAST
bash share/install.sh