Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression test and OpenFAST updates #42

Merged
merged 115 commits into from
Aug 31, 2017
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
6d617c1
add test_plot.py to /reg_tests/lib for graphically comparing two test…
Jun 9, 2017
dae13a0
ignore .DS_Store
rafmudaf Jul 26, 2017
02c1e99
better contrast between series, save plot to test dir
rafmudaf Jul 26, 2017
6ce0a6f
add a general use rtestlib
rafmudaf Jul 26, 2017
603df7a
rework pass_fail script as a module
rafmudaf Jul 26, 2017
b682d47
use rtestlib for general use functions
rafmudaf Jul 26, 2017
d23ac5a
use rtestlib for general use functions
rafmudaf Jul 26, 2017
8345616
plot the solutions differences for all channels in failing cases
rafmudaf Jul 26, 2017
d872435
plot only the failing channels
rafmudaf Jul 26, 2017
8f4f432
bug fix for adding the lib/ directory to python path
rafmudaf Jul 27, 2017
344765f
update chart style, remove %diff chart
rafmudaf Jul 28, 2017
f232e03
update the plotting script to a module and improve plots
rafmudaf Jul 28, 2017
1a65c2f
add a helper method to validate a directory or make it
rafmudaf Jul 28, 2017
5ce1753
initialize the plots directory with a plot list md
rafmudaf Jul 28, 2017
90802a6
change markdown to html for viewing in browser
rafmudaf Jul 31, 2017
5a2e8b1
update the regression test for directory structure updates in r-test
rafmudaf Jul 28, 2017
0fb2047
replace unicode with ascii characters in output
rafmudaf Jul 31, 2017
20310a7
fix for bug introduced in testing
rafmudaf Jul 31, 2017
b8a4a08
add better formatting for the plot html
rafmudaf Jul 31, 2017
0469203
update the servodyn controller paths for new r-test structure
rafmudaf Jul 31, 2017
d30a34f
use a non interactive backend for mpl plotting
rafmudaf Jul 31, 2017
80392e2
remove outdated comments
rafmudaf Jul 31, 2017
a19ef0a
bug fix for choosing a default baseline type
rafmudaf Aug 1, 2017
9e11fd8
update ctest config for latest directory structure update
rafmudaf Aug 1, 2017
fda2215
plotting is now an optional flag in cmake
rafmudaf Aug 1, 2017
7488ebb
use argparse for argument handling
rafmudaf Aug 1, 2017
a347728
add a default to the map getter call
rafmudaf Aug 1, 2017
ac93590
handle argument parsing with argparse module
rafmudaf Aug 1, 2017
ee50361
improve the argument metavar's for better help messages
rafmudaf Aug 1, 2017
2c411c7
add the optional plotting flag to the manual regression test script
rafmudaf Aug 1, 2017
44fe240
improve the console logging when executing the regression test manually
rafmudaf Aug 2, 2017
44ce18f
rotational velocity vector is now double precision
Aug 4, 2017
70ab728
always use R8Ki in BeamDyn_Driver
Aug 4, 2017
01f2a55
use ReKi in OrcaDyn_Driver to support single prec
Aug 4, 2017
737e0f5
Use double prec in ED CoordSys on trig functions
Aug 4, 2017
dbb4aa2
update r-test subdmodule to latest HEAD
rafmudaf Aug 4, 2017
d3a0d1c
print useful info
rafmudaf Aug 2, 2017
4ef03d9
cleanup module, print useful info
rafmudaf Aug 2, 2017
1504ee6
update input arguments and add verbose flag
rafmudaf Aug 4, 2017
a96d8a4
add verbose mode and single case execution
rafmudaf Aug 4, 2017
bd04f4e
update the results output formatting
rafmudaf Aug 4, 2017
92dc8d1
add time to pack series
rafmudaf Aug 4, 2017
32a52f4
import plotting resources only if plotting is turned on
rafmudaf Aug 4, 2017
ca0a5e9
improved syntax for calculating the norm
rafmudaf Aug 7, 2017
06ccce5
update variable names
rafmudaf Aug 7, 2017
ebed7be
remove code from development
rafmudaf Aug 7, 2017
ab697dd
update solution parsing in plotting for latest api
rafmudaf Aug 7, 2017
c58a4ac
add a `sphinx-html` target to bypass doxygen build
rafmudaf Aug 8, 2017
0572497
Updating the reading and writing of number of time steps to the veloc…
gantech Jun 1, 2017
f0cbcc0
Updating OpenFOAM.f90 to be more robust when interpolating chord to t…
gantech Jul 24, 2017
e43f448
Update install instructions and provide sample scripts for configurat…
gantech Jul 24, 2017
19f84d6
Updating install script
gantech Jul 24, 2017
d8f90a7
FAST CXX: Update CMake directives for Spack HDF5 compilation
sayerhs Jul 25, 2017
bd99e8d
Updating instructions for building OpenFAST manually and using spack.
gantech Aug 7, 2017
5a22064
fix links and formatting
Aug 8, 2017
4726391
Remove reference to MacOS 10.12 in the install instructions
gantech Aug 8, 2017
810c9cd
list dependencies before build instructions, keep cmake together
rafmudaf Aug 8, 2017
552ae67
update spack instructions
rafmudaf Aug 8, 2017
7fd109f
add openfast to spack packages
rafmudaf Aug 9, 2017
519c194
rm extraneous code
rafmudaf Aug 10, 2017
f576199
update beamdyn regression test script with new api’s
rafmudaf Aug 10, 2017
9115e31
status format update
rafmudaf Aug 16, 2017
8447ab9
support ascii output files in the output plotting
rafmudaf Aug 16, 2017
9d9dd92
enable regression test without actually running the cases
rafmudaf Aug 16, 2017
2f763d7
add max norm in the error quanitification
rafmudaf Aug 17, 2017
bbfc944
fix plot layout problems
rafmudaf Aug 17, 2017
42f22ca
add a summary section with norm info for each case
rafmudaf Aug 17, 2017
f9a5ed4
distinguish private from public functions
rafmudaf Aug 17, 2017
a37f73a
deprecate individual driver scripts in favor of a generic openfast dr…
rafmudaf Aug 18, 2017
ea1a9dc
use consistent input arguments
rafmudaf Aug 18, 2017
d398323
use the new generic case driver
rafmudaf Aug 18, 2017
b041dd3
write the case summary html
rafmudaf Aug 18, 2017
8151673
add and improve html export tools
rafmudaf Aug 18, 2017
63eca17
improve the results reporting
rafmudaf Aug 18, 2017
1be3427
bug fix when generating plots but not running the case
rafmudaf Aug 18, 2017
55b1765
add cell styling to max norms and failure cases
rafmudaf Aug 23, 2017
017400c
bug fix for deriving the log file name
rafmudaf Aug 23, 2017
e2b2752
add cmake functions for managing git status
rafmudaf Aug 15, 2017
fd02c81
create a git hash make variable to pass during compile
rafmudaf Aug 15, 2017
02b3c5e
add a subroutine to parse and compile program metadata
rafmudaf Aug 15, 2017
eb6e26f
update the version and program info header
rafmudaf Aug 15, 2017
bfe9509
test the cmake functions for including git info
rafmudaf Aug 18, 2017
fd15396
add git commit to version string
rafmudaf Aug 21, 2017
1261d5a
update the structured program metadata log
rafmudaf Aug 21, 2017
99bd62c
read only 8 bytes of the git commit hash
rafmudaf Aug 21, 2017
f666599
code cleanup
rafmudaf Aug 24, 2017
1038e40
only return the ‘name’ in name - version - date
rafmudaf Aug 24, 2017
ca3ec0d
clean up the log data
rafmudaf Aug 24, 2017
968a36f
suppress inflow wind success logs
rafmudaf Aug 24, 2017
ec99853
add a * to the commit hash when the local repo is dirty
rafmudaf Aug 24, 2017
58de4cc
update log file name
rafmudaf Aug 24, 2017
f639d97
update regression test criteria: diff/channel range
rafmudaf Aug 24, 2017
1e39981
add more clear implementation of the new normalized norm
rafmudaf Aug 24, 2017
fcb744e
improve the norm calculation
rafmudaf Aug 24, 2017
dc586c7
normalize based on 1 instead of tolerance
rafmudaf Aug 25, 2017
d0ebdb4
add option and support for unpacked binary output file
rafmudaf Aug 29, 2017
b602082
update doc strings in all python scripts and libraries
rafmudaf Aug 29, 2017
5d11b42
README and docstring updates
rafmudaf Aug 29, 2017
015b48b
readthedocs updates
rafmudaf Aug 29, 2017
ed2975f
remove unused code
rafmudaf Aug 29, 2017
5aaa4b4
update reg_tests README
rafmudaf Aug 29, 2017
d72acb3
append “-dirty” to the git info if there are local changes
rafmudaf Aug 29, 2017
ebb104f
get latest commits from r-test submodule
rafmudaf Aug 29, 2017
a2d443e
update the license file path and include license version in log state…
rafmudaf Aug 29, 2017
e7d5265
include a link to the original source for outside files
rafmudaf Aug 29, 2017
2340dc4
remove versions and date from the ProgDesc’s
rafmudaf Aug 29, 2017
5ff6f6c
bug fix for plot labels
rafmudaf Aug 29, 2017
787e85a
linux compiling instructions update
rafmudaf Aug 29, 2017
d183751
use git describe for greater consistency and flexibility
rafmudaf Aug 29, 2017
7913cac
update the version string format
rafmudaf Aug 29, 2017
3f646f9
Updating install instructions and scripts to clarify use of LAPACK li…
gantech Aug 31, 2017
b07f20c
Merging pull request branch to be upto date with latest dev
gantech Aug 31, 2017
5dabaae
remove a debug statement
rafmudaf Aug 30, 2017
220550d
plot the local over the baseline, use max norm instead of absolute norm
rafmudaf Aug 31, 2017
1754331
add visual studio handling of git info
rafmudaf Aug 31, 2017
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ install/*
ctest-build/*

vs-build
build
build
.DS_Store
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ include(${CMAKE_SOURCE_DIR}/cmake/FastFortranOptions.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)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
git_local_changes(GIT_DIRTY)
if(${GIT_DIRTY} STREQUAL "DIRTY")
set(GIT_SHA1 "${GIT_SHA1}-dirty")
endif()
add_definitions(-DGIT_COMMIT_HASH="${GIT_SHA1}")

# CMake Configuration variables
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
Expand Down Expand Up @@ -110,9 +120,6 @@ endif()

option(BUILD_TESTING "Build the testing tree." OFF)
if(BUILD_TESTING)
# add_subdirectory(reg_tests) this should be 'include'. with add_subdirectory,
# the CTestTestlist.cmake file is placed in the reg_tests subdirectory
# and cannot be found by ctest
include(reg_tests/CMakeLists.txt)
endif()

Expand Down
171 changes: 171 additions & 0 deletions cmake/GetGitRevisionDescription.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# - Returns a version string from Git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add the original repo from where you got this file? Also are the licensing terms of the original repo/file compatible with moving it into OpenFAST repo?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayerhs good point. that file is from this widely used github repo: https://github.com/rpavlik/cmake-modules. It is licensed under Boost Version 1.0. The original author and a link to the license are included in the docstring of the files included in our repo so I think we are in the clear legally. For reference, the first paragraph of the license is included below. And I'll add a link to the repo in that file's docstring.

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafaelmudafort Let's add a link to the git repo in the CMake file comments. That should suffice.

#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# git_local_changes(<var>)
#
# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
# Uses the return code of "git diff-index --quiet HEAD --".
# Does not regard untracked files.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Obtained from https://github.com/rpavlik/cmake-modules/blob/master/GetGitRevisionDescription.cmake
# on August 29 2017
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)

# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)

function(get_git_head_revision _refspecvar _hashvar)
set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
# We have reached the root directory, we are not in git
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
return()
endif()
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
endwhile()
# check if this is a submodule
if(NOT IS_DIRECTORY ${GIT_DIR})
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
endif()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()

if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)

configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")

set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()

function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()

# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()

#message(STATUS "Arguments to execute_process: ${ARGN}")

execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()

set(${_var} "${out}" PARENT_SCOPE)
endfunction()

function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} "${out}" PARENT_SCOPE)
endfunction()

function(git_local_changes _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()

execute_process(COMMAND
"${GIT_EXECUTABLE}"
diff-index --quiet HEAD --
WORKING_DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(res EQUAL 0)
set(${_var} "CLEAN" PARENT_SCOPE)
else()
set(${_var} "DIRTY" PARENT_SCOPE)
endif()
endfunction()
44 changes: 44 additions & 0 deletions cmake/GetGitRevisionDescription.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue with this file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Obtained from https://github.com/rpavlik/cmake-modules/blob/master/GetGitRevisionDescription.cmake.in
# on August 29 2017
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

set(HEAD_HASH)

file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)

string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
else()
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
set(HEAD_HASH "${CMAKE_MATCH_1}")
endif()
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()

if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 8)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
6 changes: 6 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if(SPHINX_FOUND)
)
add_dependencies(sphinx doxygen)
add_custom_target(docs DEPENDS sphinx)

# Add a sphinx-only HTML target to avoid building doxygen while developing documentation
add_custom_target(sphinx-html
COMMAND ${SPHINX_EXECUTABLE} -M html
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
-c ${CMAKE_CURRENT_BINARY_DIR})
else()
message(WARNING "Skipping Sphinx documentation due to missing dependencies.")
endif()
Loading