Skip to content

Commit

Permalink
Merge pull request #9 from rafmudaf/F/FloatingLin
Browse files Browse the repository at this point in the history
Merge openfast/dev
  • Loading branch information
ghaymanNREL authored Sep 10, 2019
2 parents d249761 + a40f661 commit 3cb7fec
Show file tree
Hide file tree
Showing 446 changed files with 3,083 additions and 1,682 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# add (semi-useful) version info to git archive
CreateGitVersion.bat ident export-subst

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf

56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Bug report
about: Report a bug to help us improve
title: 'Bug report'
labels: "Type: Bug"
---

**Bug description**
<A clear and concise description of the bug.>

**To Reproduce**
<Update the following list with your specific information.>
Steps to reproduce the behavior:
1. Compile with '...'
2. Run '...' case with '...' settings
3. Open '...' output
4. See the error

**Expected behavior**
<A clear and concise description of what you expected to happen.>

**Screenshots, if applicable**
<Add screenshots to help explain your problem.>

**OpenFAST Version**
<Please provide as much detail as possible including git commit. The best information is a screenshot of the OpenFAST system description that prints when running OpenFAST:>

```
**************************************************************************************************
OpenFAST
Copyright (C) National Renewable Energy Laboratory
Copyright (C) Envision Energy USA LTD
This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
See the "LICENSE" file distributed with this software for details.
**************************************************************************************************
OpenFAST-v2.0.0
Compile Info:
- Architecture: 64 bit
- Precision: double
- Date: Nov 27 2018
- Time: 17:19:38
Execution Info:
- Date: 11/29/2018
- Time: 10:52:28-0700
```

**System Information (please complete the following information):**
- OS: <e.g. Ubuntu 14.04 or macOS 10.12>
- Compiler: <e.g. GFortran 4.4>
- Compiler settings: <e.g. CMake flags or other settings>

**Additional context**
<Add any other context about the problem here.>
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature request'
labels: 'Type: Enhancement'
---

**Is your feature request related to a problem? Please describe.**
<A clear and concise description of the problem.>

**Describe the solution you'd like**
<A clear and concise description of what you want to happen.>

**Describe alternatives you've considered**
<A clear and concise description of any alternative solutions or features youve considered.>

**Additional context**
<Add any other context or screenshots about the feature request here.>
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

**Complete this sentence**
THIS PULL REQUEST __ [IS/IS NOT] __ READY TO MERGE

**Feature or improvement description**
<A clear and concise description of the new code.>

**Related issue, if one exists**
<Link to a related GitHub Issue.>

**Impacted areas of the software**
<List any modules or other areas which should be impacted by this pull request. This helps to determine the verification tests.>

**Additional supporting information**
<Add any other context about the problem here.>

**Test results, if applicable**
<Add the results from unit tests and regression tests here along with justification for any failing test cases.>
76 changes: 36 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,58 @@

language: c

os:
- linux
- osx
matrix:
include:
- os: linux
dist: bionic
env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=ON
- os: linux
dist: bionic
env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=OFF
- os: linux
dist: bionic
env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=ON; CPP_API=ON; CMAKE_FLAGS="-DBUILD_OPENFAST_CPP_API=$CPP_API"
- os: osx
osx_image: xcode9.2
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
- os: osx
osx_image: xcode9.2
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF

# linux configuration; container-based environments (default for linux) require the following setup block
# macos dependency install
addons:
apt:
homebrew:
packages:
- gfortran
- libblas-dev
- liblapack-dev

env:
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF

# mac configuration
- gcc@7
- yaml-cpp
- hdf5
- open-mpi
update: true

before_install:
# first uninstall a conflicting package
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask uninstall oclint; fi

# install required packages
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# mac configuration
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc@7; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake; fi # cmake is already installed in the default mac image

# linux configuration
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install gfortran libblas-dev liblapack-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CPP_API" == "ON" ]]; then sudo apt-get install libopenmpi-dev libyaml-cpp-dev libhdf5-dev libxml2-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.7.1; fi

# common configuration
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.6.3; fi
- pip3 install numpy

install:
- mkdir build && cd build
- cmake .. -DBUILD_TESTING=ON -DDOUBLE_PRECISION=$DOUBLE_PRECISION
- make -j 8 install

matrix:
exclude:
- os: linux
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
- os: linux
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
- os: osx
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
- os: osx
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF
- cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DDOUBLE_PRECISION=$DOUBLE_PRECISION $CMAKE_FLAGS
- cat CMakeCache.txt
- make -j4 install

script:
# beamdyn unit tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R beamdyn_utest; fi
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -VV -R beamdyn_utest; fi

# beamdyn regression tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R bd_; fi
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -j4 -VV -R bd_; fi

# subset of openfast regression tests
# do not run
Expand All @@ -71,4 +68,3 @@ script:
# CURRENTLY, TESTS FAIL WITH VERY MINOR DIFFERENCES
# - ctest -VV -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ctest -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26 ; fi

34 changes: 9 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ include(${CMAKE_SOURCE_DIR}/cmake/OpenfastFortranOptions.cmake)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

# Get the git info into the executable
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
include(GetGitRevisionDescription)
git_describe(GIT_DESCRIBE)
add_definitions(-DGIT_VERSION_INFO="${GIT_DESCRIBE}")

# CMake Configuration variables
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
Expand Down Expand Up @@ -77,12 +71,12 @@ endif()
########################################################################
# Build rules for OpenFAST Registry
#
add_subdirectory(modules-local/openfast-registry)
add_subdirectory(modules/openfast-registry)

########################################################################
# OpenFAST Core modules
# OpenFAST modules
#
set(OPENFAST_MODULES_LOCAL
set(OPENFAST_MODULES
nwtc-library
inflowwind
aerodyn
Expand All @@ -98,12 +92,7 @@ set(OPENFAST_MODULES_LOCAL
supercontroller
turbsim
openfast-library
)

########################################################################
# OpenFAST External modules
#
set(OPENFAST_MODULES_EXTERNAL
version
feamooring
moordyn
icedyn
Expand All @@ -112,20 +101,15 @@ set(OPENFAST_MODULES_EXTERNAL
)

set(OPENFAST_REGISTRY_INCLUDES "" CACHE INTERNAL "Registry includes paths")
set_registry_includes("modules-local" ${OPENFAST_MODULES_LOCAL})
set_registry_includes("modules-ext" ${OPENFAST_MODULES_EXTERNAL})
set_registry_includes("modules" ${OPENFAST_MODULES})
# Fix non-standard path addition to OPENFAST_REGISTRY_INCLUDES in icefloe module
set(OPENFAST_REGISTRY_INCLUDES
${OPENFAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules-ext/icefloe/src/interfaces/FAST/
${OPENFAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules/icefloe/src/interfaces/FAST/
CACHE INTERNAL "Registry includes paths")

foreach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-local/${IDIR}")
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})

foreach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-ext/${IDIR}")
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})
foreach(IDIR IN ITEMS ${OPENFAST_MODULES})
add_subdirectory("${CMAKE_SOURCE_DIR}/modules/${IDIR}")
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES})

add_subdirectory(glue-codes)

Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# OpenFAST

OpenFAST is an open-source wind turbine simulation tool which builds on FAST v8. OpenFAST was created with the goal of being a community model developed and used by research laboratories, academia, and industry. It is managed by a dedicated team at the National Renewable Energy Lab. Our objective is to ensure that OpenFAST is sustainable software that is well tested and well documented.
OpenFAST is a wind turbine simulation tool which builds on FAST v8. It was
created with the goal of being a community model developed and used by research
laboratories, academia, and industry. It is managed by a dedicated team at the
National Renewable Energy Lab. Our objective is to ensure that OpenFAST is
sustainable software that is well tested and well documented. If you'd like
to contribute, see the
[Developer Documentation](https://openfast.readthedocs.io/en/dev/source/dev/index.html)
and any open GitHub issues with the
[Help Wanted](https://github.com/OpenFAST/openfast/issues?q=is%3Aopen+is%3Aissue+label%3A"Help+wanted")
tag.

**OpenFAST is under active development**.

Expand Down
35 changes: 29 additions & 6 deletions cmake/FindMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,40 @@
# HINTS $ENV{MKLROOT}
# PATH_SUFFIXES include)

# infer the architecture build type
# https://cmake.org/cmake/help/v3.0/variable/CMAKE_SIZEOF_VOID_P.html
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
set(ARCHDIR "ia32")
set(WINDOWS_INTERFACE "_c_")
set(UNIX_INTERFACE "")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(ARCHDIR "intel64")
set(WINDOWS_INTERFACE "_lp64_")
set(UNIX_INTERFACE "_lp64")
endif()

set(MKLSEARCHPATHS
$ENV{MKLROOT}/lib/${ARCHDIR}_win
$ENV{MKLROOT}/lib/${ARCHDIR}
$ENV{MKLROOT}/lib
)

# using mkl_intel_c on windows since that is the default for intel compilers
# https://software.intel.com/en-us/mkl-windows-developer-guide-using-the-cdecl-and-stdcall-interfaces
find_library(MKL_IFACE_LIB
NAMES mkl_intel_lp64 libmkl_intel_lp64.a mkl_intel_lp64_dll.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
NAMES mkl_intel${UNIX_INTERFACE} libmkl_intel${UNIX_INTERFACE} mkl_intel${WINDOWS_INTERFACE}dll
PATHS ${MKLSEARCHPATHS}
NO_DEFAULT_PATH)

find_library(MKL_SEQ_LIB
NAMES mkl_sequential libmkl_sequential.a mkl_sequential.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
NAMES mkl_sequential libmkl_sequential mkl_sequential_dll
PATHS ${MKLSEARCHPATHS}
NO_DEFAULT_PATH)

find_library(MKL_CORE_LIB
NAMES mkl_core libmkl_core.a mkl_core_dll.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
NAMES mkl_core libmkl_core mkl_core_dll
PATHS ${MKLSEARCHPATHS}
NO_DEFAULT_PATH)

if (MKL_IFACE_LIB AND MKL_SEQ_LIB AND MKL_CORE_LIB)
set(MKL_LIBRARIES ${MKL_IFACE_LIB} ${MKL_SEQ_LIB} ${MKL_CORE_LIB})
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindYAMLCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find_path(YAML_INCLUDES
PATH_SUFFIXES include)

find_library(YAML_LIBRARIES
NAMES libyaml-cpp.a yaml-cpp
NAMES yaml-cpp libyaml-cpp.a
HINTS ${YAML_ROOT} ${CMAKE_INSTALL_PREFIX}
PATH_SUFFIXES lib)

Expand Down
2 changes: 1 addition & 1 deletion cmake/OpenfastCmakeUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function(generate_f90_types regfile outfile)
add_custom_command(
OUTPUT ${output}
DEPENDS openfast_registry ${input}
COMMAND ${CMAKE_BINARY_DIR}/modules-local/openfast-registry/openfast_registry
COMMAND ${CMAKE_BINARY_DIR}/modules/openfast-registry/openfast_registry
${input} ${OPENFAST_REGISTRY_INCLUDES} ${ARGN})
set_source_files_properties(${output} PROPERTIES GENERATED TRUE)
endfunction(generate_f90_types)
Expand Down
7 changes: 7 additions & 0 deletions cmake/OpenfastFortranOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ macro(set_fast_gfortran)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all -pedantic -fbacktrace" )
endif()

if(CYGWIN)
# increase the default 2MB stack size to 16 MB
MATH(EXPR stack_size "16 * 1024 * 1024")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},--stack,${stack_size}")
endif()

endmacro(set_fast_gfortran)

#
Expand Down
Loading

0 comments on commit 3cb7fec

Please sign in to comment.