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

Merge OpenFAST/dev + HD/SeaSt code cleanup #5

Merged
merged 55 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
84addf3
Clean up in rtestlib
rafmudaf May 17, 2022
fa66d5b
Determine passing channels instead of norms
rafmudaf Jun 22, 2022
b2b3d5c
Plot pass/fail boundary in error plot
rafmudaf May 17, 2022
22e8395
Unify baselines
rafmudaf Aug 1, 2022
68ed80a
Update reg test driver scripts
rafmudaf May 20, 2022
acf2c89
Update reg test plotting - bug fixes, Bokeh 2.4
rafmudaf Jun 22, 2022
2d75a72
Expand precision for BeamDyn and SubDyn module tests
rafmudaf Aug 1, 2022
c70fb2b
Mark channels with nan or inf as failing
rafmudaf Jun 16, 2022
df1cc9e
Add a no-run flag to CTest options
rafmudaf Jun 21, 2022
0b76b44
Add fpic compiler flag for C targets
rafmudaf Jul 10, 2022
7c2215b
IfW Driver: Fix output headers and column fmt
rafmudaf Aug 1, 2022
761ef68
HD: add precision and update Python driver scripts
rafmudaf Aug 1, 2022
abcdb12
Test ascii output silently
rafmudaf Jul 10, 2022
ccaabe4
Add more precision to SubDyn tests
rafmudaf Aug 1, 2022
8a59edd
Update a few HD cases to use RANLUX pRNG
rafmudaf Aug 1, 2022
d1daab1
Make atol a function of the magnitude of the data
rafmudaf Jul 21, 2022
35387f7
Rename openfast library ctest function
rafmudaf Jul 22, 2022
ff1cf54
Set ctest driver paths based on system type
rafmudaf Jul 22, 2022
0ffbe85
Add a ctest label for fastlib cases
rafmudaf Aug 1, 2022
0d8762b
Add HD module test for OC4 jacket
rafmudaf Aug 8, 2022
e46cbaa
Connect tolerance parameters through CMake
rafmudaf Aug 16, 2022
705bf08
Disable consistently inconsistent test cases
rafmudaf Aug 17, 2022
92ddaf3
Bug fix in finding the channel order of magnitude
rafmudaf Aug 17, 2022
c045341
Improvements to regression-test python scripts
bjonkman Aug 18, 2022
134959c
Add legend to error plots
rafmudaf Aug 18, 2022
783925f
Revert path changes (see #1021)
rafmudaf Aug 18, 2022
2ea9bcb
Merge pull request #1217 from rafmudaf/q3/one_baseline
rafmudaf Aug 18, 2022
1910374
Merge OpenFAST/dev into LuWang_hydro
bjonkman Aug 22, 2022
c8b2477
Fix broken manual regression test
bjonkman Aug 22, 2022
edea770
cleanup seastate output file close routine
bjonkman Aug 23, 2022
be4c884
python scripts: avoid plotting errors with different numbers of outpu…
bjonkman Aug 23, 2022
6eb4920
update r-test
bjonkman Aug 23, 2022
4fc9d81
update minor text in documentation; HD documentation is OUT OF DATE
bjonkman Aug 23, 2022
cec8dfa
Merge remote-tracking branch 'NREL/dev' into f/Python_RegTests
bjonkman Aug 23, 2022
6adf4ac
Fix broken manual regression test python script
bjonkman Aug 23, 2022
b22fc02
python scripts: avoid plotting errors with different numbers of outpu…
bjonkman Aug 23, 2022
cd14fab
fix broken spacing from previous merge conflict
bjonkman Aug 23, 2022
4923e05
Missing r-test commit from previous PR
andrew-platt Aug 23, 2022
93b5288
Merge remote-tracking branch 'NREL/dev' into f/Python_RegTests
bjonkman Aug 23, 2022
fccee33
r-test: missing test case after merge of #1217
andrew-platt Aug 23, 2022
273e9c1
Merge remote-tracking branch 'NREL/dev' into f/Python_RegTests
bjonkman Aug 23, 2022
a8b7c89
r-test: Remove -m64 in CMAKE_Fortran_FLAG from r-test
andrew-platt Aug 24, 2022
0a6d2f0
Merge pull request #1228 from andrew-platt/b/CMake_FlagUpdate-rtest
andrew-platt Aug 24, 2022
19b4ca7
Merge pull request #1222 from bjonkman/f/Python_RegTests
andrew-platt Aug 24, 2022
b888e4a
[bugfix] Seg Fault due to hub model and external inflow (#1227)
psakievich Aug 25, 2022
de3a9c2
merge OpenFAST/dev into LuWang_hydro
bjonkman Aug 25, 2022
7ae3388
Merge remote-tracking branch 'NREL/dev' into LuWang_hydro
bjonkman Aug 25, 2022
5b0823a
Cleanup size of lines read from file
bjonkman Aug 25, 2022
4708737
NWTC_IO: update GetWords to return the number actually read
bjonkman Aug 25, 2022
0076b03
HD: increase max length of line read from kinematics files
bjonkman Aug 29, 2022
dd123af
HD: replace unnecessary array with scalar
bjonkman Aug 29, 2022
d7b57ef
HD/SeaSt: update error handling + code cleanup
bjonkman Aug 29, 2022
f088391
NWTC_IO: cleanup some error handling
bjonkman Aug 29, 2022
4dae42a
Merge remote-tracking branch 'luwang00/dev' into LuWang_hydro
bjonkman Aug 29, 2022
43cc15b
update r-test
bjonkman Aug 30, 2022
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
38 changes: 19 additions & 19 deletions .github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
- name: Setup workspace
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure build
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
- name: Setup workspace
run: cmake -E make_directory ${{runner.workspace}}/openfast/build
- name: Configure build
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev # gcovr
- name: Setup workspace
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Build OpenFAST C-Interfaces
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Build OpenFAST glue-code
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Build FAST.Farm
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Run AeroDyn tests
Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -387,13 +387,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Run Interface / API tests
working-directory: ${{runner.workspace}}/openfast/build
run: |
ctest -VV -L "cpp|python" -j ${{env.NUM_PROCS}}
ctest -VV -L "cpp|python|fastlib" -j ${{env.NUM_PROCS}}
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand All @@ -436,7 +436,7 @@ jobs:
run: |
ctest -VV -j8 \
-L openfast \
-LE "cpp|linear|python" \
-LE "cpp|linear|python|fastlib" \
-E "5MW_OC4Semi_WSt_WavesWN|5MW_OC3Mnpl_DLL_WTurb_WavesIrr|5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth|5MW_OC3Trpd_DLL_WSt_WavesReg|5MW_Land_BD_DLL_WTurb"
- name: Failing test artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -471,7 +471,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -515,7 +515,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -559,7 +559,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -603,7 +603,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -647,7 +647,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4 jinja2==3.0
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -691,7 +691,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down Expand Up @@ -735,7 +735,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
pip install numpy "Bokeh>=2.4"
sudo apt-get update -y
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Configure Tests
Expand Down
1 change: 1 addition & 0 deletions cmake/OpenfastFortranOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ macro(set_fast_gfortran)
if(NOT WIN32)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpic ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic")
endif(NOT WIN32)

# Fix free-form compilation for OpenFAST
Expand Down
1 change: 1 addition & 0 deletions docs/source/testing/regression_test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ configuration as described in the following sections.

In both modes of execution a directory is created in the build directory
called ``reg_tests`` where all of the input files for the test cases are copied
(but not overwritten)
and all of the locally generated outputs are stored. Ultimately, both CTest and
the manual execution program call a series of Python scripts and libraries in
``reg_tests`` and ``reg_tests/lib``. One such script is ``lib/pass_fail.py``
Expand Down
5 changes: 3 additions & 2 deletions docs/source/user/aerodyn/examples/ad_primary_example.dat
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ True SumPrint - Generate a summary file listing input option
1, 3, 4, 6 BlOutNd - Blade nodes whose values will be output (-)
0 NTwOuts - Number of tower node outputs [0 - 9] (-)
1 TwOutNd - Tower nodes whose values will be output (-)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
"B1N1VDisx, B1N1VDisy, B1N1VDisz" ! disturbed wind velocity at Blade 1, Node 1
"B1N2VDisx, B1N2VDisy, B1N2VDisz" ! disturbed wind velocity at Blade 1, Node 2
"B1N3VDisx, B1N3VDisy, B1N3VDisz" ! disturbed wind velocity at Blade 1, Node 3
Expand All @@ -91,7 +91,7 @@ END of OutList section (the word "END" must appear in the first 3 columns of the
====== Outputs for all blade stations (same ending as above for B1N1.... =========================== [optional section]
1 BldNd_BladesOut - Number of blades to output all node information at. Up to number of blades on turbine. (-)
"All" BldNd_BlOutNd - Future feature will allow selecting a portion of the nodes to output. Not implemented yet. (-)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
"Fx, Fy"
"Vx, Vy"
"Vrel"
Expand All @@ -103,3 +103,4 @@ END of OutList section (the word "END" must appear in the first 3 columns of the
"Vindy"
"Alpha"
END (the word "END" must appear in the first 3 columns of this last OutList line in the optional nodal output section)
====================================================================================================
23 changes: 12 additions & 11 deletions docs/source/user/beamdyn/examples/bd_primary_nrel_5mw.inp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ True RotStates - Orient states in the rotating frame during line
---------------------- PITCH ACTUATOR PARAMETERS -------------------------------
False UsePitchAct - Whether a pitch actuator should be used (flag)
200 PitchJ - Pitch actuator inertia (kg-m^2) [used only when UsePitchAct is true]
2E+07 PitchK - Pitch actuator stiffness (kg-m^2/s^2) [used only when UsePitchAct is true]
20000000 PitchK - Pitch actuator stiffness (kg-m^2/s^2) [used only when UsePitchAct is true]
500000 PitchC - Pitch actuator damping (kg-m^2/s) [used only when UsePitchAct is true]
---------------------- OUTPUTS -------------------------------------------------
True SumPrint - Print summary data to "<RootName>.sum" (flag)
Expand All @@ -92,17 +92,18 @@ True SumPrint - Print summary data to "<RootName>.sum" (flag)
"N1Mxl,N1Myl,N1Mzl"
"TipTDxr, TipTDyr, TipTDzr"
"TipRDxr, TipRDyr, TipRDzr"
END of input file (the word "END" must appear in the first 3 columns of the last OutList line)
END of OutList section (the word "END" must appear in the first 3 columns of the last OutList line)
====== Outputs for all blade stations (same ending as above for B1N1.... =========================== (optional section)
"All" BldNd_BlOutNd - Future feature will allow selecting a portion of the nodes to output. Not implemented yet. (-)
"All" BldNd_BlOutNd - Future feature will allow selecting a portion of the nodes to output. Not implemented yet. (-)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
"TDxr, TDyr, TDzr"
"TVxr, TVyr, TVzr"
"TAxr, TAyr, TAzr"
"RDxr, RDyr, RDzr"
"RVxr, RVyr, RVzr"
"RAxr, RAyr, RAzr"
"Fxr, Fyr, Fzr"
"TDxr, TDyr, TDzr"
"TVxr, TVyr, TVzr"
"TAxr, TAyr, TAzr"
"RDxr, RDyr, RDzr"
"RVxr, RVyr, RVzr"
"RAxr, RAyr, RAzr"
"Fxr, Fyr, Fzr"
"TipTDxr, TipTDyr, TipTDzr"
"TipRDxr, TipRDyr, TipRDzr"
END of input file (the word "END" must appear in the first 3 columns of this last OutList line)
END (the word "END" must appear in the first 3 columns of this last OutList line in the optional nodal output section)
--------------------------------------------------------------------------------
3 changes: 2 additions & 1 deletion modules/hydrodyn/python-lib/hydrodyn_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ def check_error(self):
def check_input_motions(self,nodePos,nodeVel,nodeAcc):
# make sure number of nodes didn't change for some reason
if self._initNumNodePts != self.numNodePts:
# @ANDY TODO: `time` is not available here so this would be a runtime error
print(f"At time {time}, the number of node points changed from initial value of {self._initNumNodePts}. This is not permitted during the simulation.")
self.hydrodyn_end()
raise Exception("\nError in calling HydroDyn library.")
Expand Down Expand Up @@ -594,7 +595,7 @@ def __init__(self,filename,chan_names,chan_units):
# write file header
t_string=datetime.datetime.now()
dt_string=datetime.date.today()
self.OutFile.write(f"## This file was generated by InflowWind_Driver on {dt_string.strftime('%b-%d-%Y')} at {t_string.strftime('%H:%M:%S')}\n")
self.OutFile.write(f"## This file was generated by HydroDyn_Driver on {dt_string.strftime('%b-%d-%Y')} at {t_string.strftime('%H:%M:%S')}\n")
self.OutFile.write(f"## This file contains output channels requested from the OutList section of the input file")
self.OutFile.write(f"{filename}\n")
self.OutFile.write("#\n")
Expand Down
5 changes: 0 additions & 5 deletions modules/hydrodyn/src/Conv_Radiation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval,
! For now, this is the only model we have implemented
RdtnFrmAM = .FALSE.

! Initialize the NWTC Subroutine Library

CALL NWTC_Init( )



! If HighFreq is greater than
! RdtnOmegaMax, Abort because RdtnDT must be reduced in order to have
Expand Down
2 changes: 1 addition & 1 deletion modules/hydrodyn/src/HydroDyn_Input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ SUBROUTINE HydroDyn_ParseInput( InputFileName, OutRootName, defWtrDens, defWtrDp
CHARACTER( 2) :: strI ! string version of the loop counter
INTEGER :: UnEc ! The local unit number for this module's echo file
CHARACTER(1024) :: EchoFile ! Name of HydroDyn echo file
CHARACTER(1024) :: Line ! String to temporarially hold value of read line
CHARACTER(MaxFileInfoLineLen) :: Line ! String to temporarially hold value of read line
real(ReKi), ALLOCATABLE :: tmpVec1(:), tmpVec2(:) ! Temporary arrays for WAMIT data
integer(IntKi) :: startIndx, endIndx ! indices into working arrays
INTEGER, ALLOCATABLE :: tmpArray(:) ! Temporary array storage of the joint output list
Expand Down
3 changes: 0 additions & 3 deletions modules/hydrodyn/src/Morison.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1897,9 +1897,6 @@ SUBROUTINE Morison_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, In
errMsg = ""



! Initialize the NWTC Subroutine Library
CALL NWTC_Init( )

! Define parameters here:
p%DT = Interval
Expand Down
7 changes: 1 addition & 6 deletions modules/hydrodyn/src/WAMIT.f90
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ SUBROUTINE WAMIT_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, Init
LOGICAL :: NewPer ! When .TRUE., indicates that the period has just changed.
LOGICAL :: ZeroFreq ! When .TRUE., indicates that the zero -frequency limit of added mass is contained within the WAMIT output files.

CHARACTER(1024) :: Line ! String to temporarily hold the value of a line within a WAMIT output file.
CHARACTER(MaxFileInfoLineLen) :: Line ! String to temporarily hold the value of a line within a WAMIT output file.

TYPE(FFT_DataType) :: FFT_Data ! the instance of the FFT module we're using
integer(IntKi) :: iSub, jSub ! indices into the 6x6 sub-matrices used to redimensionalize the WAMIT data (Needed because NBodyMod=1 could have WAMIT matrices which are 6N x 6N)
Expand Down Expand Up @@ -217,11 +217,6 @@ SUBROUTINE WAMIT_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, Init
ErrMsg = ""
InitOut%NULLVAL = 0 ! set to avoid compiler warnings about INTENT(OUT) not getting set


! Initialize the NWTC Subroutine Library (set pi constants)

CALL NWTC_Init( )

! Copy Output Init data from Waves Module Init call

p%NStepWave = InitInp%NStepWave
Expand Down
Loading