Skip to content

Commit

Permalink
Merge pull request #542 from OpenFAST/dev
Browse files Browse the repository at this point in the history
Release v2.4.0
  • Loading branch information
rafmudaf committed Sep 14, 2020
2 parents f2419c5 + 103130b commit ff33ca1
Show file tree
Hide file tree
Showing 344 changed files with 136,689 additions and 56,148 deletions.
16 changes: 8 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,18 +1,18 @@

**Complete this sentence**
THIS PULL REQUEST __ [IS/IS NOT] __ READY TO MERGE
<!-- Is this pull request ready to be merged? -->
<!-- i.e. tests pass or are expected to fail; all development is finished; appropriate documentation is included. -->
<!-- If not but opening the pull request will facilitate development, make it a "draft" pull request -->

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

**Related issue, if one exists**
<Link to a related GitHub Issue.>
<!-- 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.>
<!-- 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.>
<!-- 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.>
<!-- Add the results from unit tests and regression tests here along with justification for any failing test cases. -->
73 changes: 52 additions & 21 deletions .github/actions/compile-and-test/entrypoint.sh
@@ -1,38 +1,69 @@
#!/bin/bash

git fetch origin ${GITHUB_REF}:CI
git checkout CI
git submodule update

# Print the current git info
echo `git status`
echo `git log -1`
cd /openfast/reg_tests/r-test
echo `git status`
echo `git log -1`
cd /openfast
verbosecommand() { echo ">>> $1" && eval $1 && echo "<<<"; }

# Configure Bash to exit if any command returns an error
set -e

verbosecommand "cd /openfast"

repo="OpenFAST"
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]; then
repo=${GITHUB_ACTOR}
fi
# Create a branch "CI" at the current commit from the GH Actor's fork.
verbosecommand "git fetch https://github.com/${repo}/openfast ${GITHUB_REF}:CI"
verbosecommand "git checkout CI"
verbosecommand "git submodule update"

# Display the current git info
echo "*** git-status from openfast:"
verbosecommand "git status"

echo "*** git-log from openfast:"
verbosecommand "git log -1"

verbosecommand "cd /openfast/reg_tests/r-test"
echo "*** git-status from r-test:"
verbosecommand "git status"

echo "*** git-log from r-test:"
verbosecommand "git log -1"

verbosecommand "cd /openfast"

# Display the differences between this commit and `dev`
echo "*** git-diff from ${GITHUB_REF} to dev:"
verbosecommand "git diff dev --numstat"

# Move into the "build" directory, remove the old reg tests, and compile
cd /openfast/build
rm -rf reg_tests
cmake ..
make -j4 install
verbosecommand "cd /openfast/build"
verbosecommand "rm -rf reg_tests"
verbosecommand "cmake .."
verbosecommand "make -j4 install"

# Run the tests

# NWTC Library tests
ctest -VV -R nwtc_library_utest
verbosecommand "ctest -VV -R nwtc_library_utest"

# BeamDyn-specific tests
ctest -VV -j7 -R bd_
ctest -VV -R beamdyn_utest
verbosecommand "ctest -VV -j7 -R bd_"
verbosecommand "ctest -VV -R beamdyn_utest"

# OLAF free vortex wake tests
ctest -VV -R fvw_utest

# OpenFAST linearization tests
# Dont run these in parallel, copying the case files can fail in a race condition
ctest -VV -L linear
# Exclude the Ideal_Beam test cases
# - They fail consistently in the Docker container when run on GitHub,
# but pass everywhere else including running the same Docker image locally
verbosecommand "ctest -VV -L linear -E Ideal"

# Subset of OpenFAST regression tests; do not run
## - 9, 16 because they're very sensitive
## - 19, 20 because theyre too long
## - 17, 22, 23 becuase we dont know why they fail :(
ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25
## - 17, 22, 23 because we dont know why they fail :(
verbosecommand "ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25,26,27,28,29"
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration-workflow.yml
Expand Up @@ -15,8 +15,8 @@ jobs:
name: OpenFAST tests on Ubuntu
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@main
with:
submodule: recursive
submodules: recursive
- name: Build and test step
uses: ./.github/actions/compile-and-test
7 changes: 6 additions & 1 deletion .gitignore
Expand Up @@ -41,6 +41,11 @@ vs-build/
.vscode
.atom
.fortls

# backup files
*.asv
~$*.xlsx

# LaTeX compiling files
*.aux
*.nlo
*.log
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,6 +1,6 @@
[submodule "reg_tests/r-test"]
path = reg_tests/r-test
url = https://github.com/openfast/r-test.git
url = https://github.com/OpenFAST/r-test.git
[submodule "unit_tests/pfunit"]
path = unit_tests/pfunit
url = https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
3 changes: 0 additions & 3 deletions .readthedocs.yml
Expand Up @@ -5,9 +5,6 @@
# Required
version: 2

sphinx:
configuration: docs/conf.py

formats:
- htmlzip
- pdf
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -57,6 +57,9 @@ script:
# beamdyn regression tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -j4 -VV -R bd_; fi

# linearization cases
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -L linear; fi

# subset of openfast regression tests
# do not run
# - 3, 4, 7, 15, 16, 17 since the free yaw is not well trusted
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -33,8 +33,9 @@ option(BUILD_SHARED_LIBS "Enable building shared libraries" off)
option(DOUBLE_PRECISION "Treat REAL as double precision" on)
option(USE_DLL_INTERFACE "Enable runtime loading of dynamic libraries" on)
option(FPE_TRAP_ENABLED "Enable FPE trap in compiler options" off)
option(ORCA_DLL_LOAD "Enable OrcaFlex Library Load" off)
option(ORCA_DLL_LOAD "Enable OrcaFlex Library Load" on)
option(BUILD_OPENFAST_CPP_API "Enable building OpenFAST - C++ API" off)
option(OPENMP "Enable OpenMP support" off)

# Precompiler/preprocessor flag configuration
# Do this before configuring modules so that the flags are included
Expand Down Expand Up @@ -169,4 +170,4 @@ endif()
option(BUILD_DOCUMENTATION "Build documentation." OFF)
if(BUILD_DOCUMENTATION)
add_subdirectory(docs)
endif()
endif()
10 changes: 2 additions & 8 deletions README.rst
Expand Up @@ -29,7 +29,7 @@ FAST v8 - OpenFAST v0.1.0
The transition from FAST v8 to OpenFAST v0.1.0 represents the effort to better
support an open-source developer community around FAST-based aero-hydro-servo-
elastic engineering models of wind-turbines and wind-plants. OpenFAST is the
next generation of FAST analysis tools. More inforation is available in the
next generation of FAST analysis tools. More information is available in the
`transition notes <http://openfast.readthedocs.io/en/latest/source/user/fast_to_openfast.html>`_.

FAST v8 is a computer-aided engineering tool for simulating the coupled dynamic
Expand Down Expand Up @@ -114,15 +114,9 @@ Details for compiling
`developing <http://openfast.readthedocs.io/en/latest/source/dev/index.html>`_
OpenFAST on Unix-based and Windows machines are available at `readthedocs <http://openfast.readthedocs.io>`_.

Nightly Testing
---------------
The ``dev`` branch is automatically compiled and run through the test suite
nightly. The results are publicly available through the
`CDash Dashboard <http://my.cdash.org/index.php?project=OpenFAST&date=>`_.

Help
----
Please use `github issues <https://github.com/OpenFAST/OpenFAST/issues>`_ to:
Please use `GitHub Issues <https://github.com/OpenFAST/OpenFAST/issues>`_ to:

* ask usage questions
* report bugs
Expand Down
53 changes: 49 additions & 4 deletions cmake/OpenfastFortranOptions.cmake
Expand Up @@ -73,6 +73,27 @@ macro(set_fast_fortran)
endif()
endmacro(set_fast_fortran)

#
# CHECK_F2008_FEATURES - Check if Fortran2008 features are available
#
macro(check_f2008_features)
include(CheckFortranSourceCompiles)
check_fortran_source_compiles(
"program test
use iso_fortran_env, only: compiler_version, real32, real64, real128
integer, parameter :: quki = real128
integer, parameter :: dbki = real64
integer, parameter :: reki = real32
end program test"
HAS_FORTRAN2008
SRC_EXT F90)
if (HAS_FORTRAN2008)
message(STATUS "Enabling Fortran 2008 features")
add_definitions(-DHAS_FORTRAN2008_FEATURES)
endif()
endmacro(check_f2008_features)

#
# SET_FAST_GFORTRAN - Customizations for GNU Fortran compiler
#
Expand All @@ -83,17 +104,18 @@ macro(set_fast_gfortran)
endif(NOT WIN32)

# Fix free-form compilation for OpenFAST
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp -fopenmp")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp")

# Deal with Double/Single precision
if (DOUBLE_PRECISION)
add_definitions(-DDOUBLE_PRECISION)
add_definitions(-DOPENFAST_DOUBLE_PRECISION)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8")
endif (DOUBLE_PRECISION)

# debug flags
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all -pedantic -fbacktrace" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all -pedantic -fbacktrace " )
endif()

if(CYGWIN)
Expand All @@ -102,6 +124,13 @@ macro(set_fast_gfortran)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},--stack,${stack_size}")
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fopenmp" )
endif()

check_f2008_features()
endmacro(set_fast_gfortran)

#
Expand All @@ -123,14 +152,22 @@ macro(set_fast_intel_fortran_posix)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpic -fpp")
# Deal with Double/Single precision
if (DOUBLE_PRECISION)
add_definitions(-DDOUBLE_PRECISION)
add_definitions(-DOPENFAST_DOUBLE_PRECISION)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -double_size 128")
endif (DOUBLE_PRECISION)

# debug flags
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -check all -traceback" )
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -qopenmp" )
endif()

check_f2008_features()
endmacro(set_fast_intel_fortran_posix)

#
Expand All @@ -145,7 +182,7 @@ macro(set_fast_intel_fortran_windows)

# Deal with Double/Single precision
if (DOUBLE_PRECISION)
add_definitions(-DDOUBLE_PRECISION)
add_definitions(-DOPENFAST_DOUBLE_PRECISION)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /real_size:64 /double_size:128")
endif (DOUBLE_PRECISION)

Expand All @@ -157,4 +194,12 @@ macro(set_fast_intel_fortran_windows)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /check:all /traceback" )
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /qopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /qopenmp" )
endif()

check_f2008_features()
endmacro(set_fast_intel_fortran_windows)
Binary file not shown.

0 comments on commit ff33ca1

Please sign in to comment.