From a9f8f300b8f4c456ac0e0bddf2952f2410ec797b Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Tue, 8 Aug 2017 12:45:07 -0600 Subject: [PATCH 1/2] list dependencies before build instructions, keep cmake together --- docs/source/install_linux.rst | 42 ++++++++++++++--------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/docs/source/install_linux.rst b/docs/source/install_linux.rst index 6c41b3d9ad..3eaaa95d02 100644 --- a/docs/source/install_linux.rst +++ b/docs/source/install_linux.rst @@ -1,11 +1,20 @@ Building OpenFAST ================= -OpenFAST uses the `CMake `__ build system. We recommend installing OpenFAST using `spack `__. However, we also provide some sample scripts in ``share`` folder if you choose to install without `spack`. +OpenFAST uses the `CMake `__ build system. +We recommend building OpenFAST using `Spack `__. +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 `__ (provided by ``HDF5_ROOT``) and `yaml-cpp `__ (provided by ``YAML_ROOT``). CMake Build Instructions ------------------------ - :: git clone https://github.com/OpenFAST/OpenFAST.git @@ -13,7 +22,13 @@ CMake Build Instructions 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 ~~~~~~~~~~~~~~~~~~~~~ @@ -28,17 +43,6 @@ 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 `__ (provided by ``HDF5_ROOT``) and `yaml-cpp `__ (provided by ``YAML_ROOT``). - - - -Building OpenFAST Semi-Automatically Using Spack on Mac OS X or Linux --------------------------------------------------------------------- The following describes how to build OpenFAST and its dependencies @@ -134,15 +138,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 From 6c3ed5585bb5a32af1228bd0654d8fa3b38df04b Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Tue, 8 Aug 2017 12:45:28 -0600 Subject: [PATCH 2/2] update spack instructions --- docs/source/install_linux.rst | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/source/install_linux.rst b/docs/source/install_linux.rst index 3eaaa95d02..370948593b 100644 --- a/docs/source/install_linux.rst +++ b/docs/source/install_linux.rst @@ -43,6 +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) +Building OpenFAST Semi-Automatically Using Spack on macOS or Linux --------------------------------------------------------------------- The following describes how to build OpenFAST and its dependencies @@ -51,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 `__). +- 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: @@ -78,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://raw.githubusercontent.com/OpenFAST/openfast/dev/share/spack/package.py`__ file @@ -89,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://raw.githubusercontent.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 @@ -105,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: ::