Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1a21479
Fix FAST_ExtInfw_Restart API
marchdf Apr 25, 2025
9ee64ed
bug fix #2762
mayankchetan Apr 25, 2025
654230d
Backport of github action to build windows executables
deslaughter Apr 25, 2025
be0337e
IO: Updated OpenFAST_io for MoorDyn input files
RyanDavies19 Feb 26, 2025
eb50dce
IO: clean up openfast_io for MD after testing, fix *** error in MD ou…
RyanDavies19 Feb 26, 2025
45ed316
MD: update version
RyanDavies19 Feb 27, 2025
27faafe
MD: IO output format fix
RyanDavies19 Feb 28, 2025
5dbf3a3
IO: Fix MoorDyn outlist handling, remove MoorDyn echo file reading
RyanDavies19 Mar 3, 2025
d689a1e
bug fix: Adjust steady-state solver small angle assumptions
bjonkman Mar 17, 2025
54b09cd
Merge pull request #2777 from mayankchetan/of_io_fix
andrew-platt Apr 25, 2025
9b55934
Merge pull request #2779 from andrew-platt/b/backportPR2658_404
andrew-platt Apr 25, 2025
d66ab68
Merge pull request #2776 from marchdf/fix-restart
andrew-platt Apr 25, 2025
92a2e94
Use MATLAB_ROOT environment variable to define MATLAB install directory
deslaughter Apr 25, 2025
e0d3eea
Merge pull request #2780 from andrew-platt/b/backport2760_404
andrew-platt Apr 25, 2025
2a6bdb0
Merge pull request #2778 from deslaughter/build-windows-backport
andrew-platt Apr 25, 2025
16ac8cb
Avoid ending program when called as a shared library
bjonkman Mar 13, 2025
8f2979d
Merge pull request #2785 from andrew-platt/backport/2671
andrew-platt Apr 28, 2025
c08ddba
Update version info
andrew-platt Apr 28, 2025
e9cec2d
Update v4.0.4.md
andrew-platt Apr 28, 2025
db6012f
Update docs/changelogs/v4.0.4.md
andrew-platt Apr 28, 2025
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
42 changes: 42 additions & 0 deletions .github/scripts/build_windows_executables.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" %VS_VER%

for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"

@REM Make the script that generates the git version description ignore dirty
@REM since building the Visual Studio projects modifies files
powershell -command "(Get-Content -Path '.\vs-build\CreateGitVersion.bat') -replace '--dirty', '' | Set-Content -Path '.\vs-build\CreateGitVersion.bat'"

echo on

@REM Build all solutions
devenv vs-build/AeroDisk/AeroDisk_Driver.sln /Build "Release|x64"
devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release|x64"
devenv vs-build/AeroDyn/AeroDyn_Driver.sln /Build "Release_OpenMP|x64"
devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release|x64"
devenv vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln /Build "Release_OpenMP|x64"
devenv vs-build/BeamDyn/BeamDyn-w-registry.sln /Build "Release|x64"
devenv vs-build/Discon/Discon.sln /Build "Release|x64"
devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release|x64"
devenv vs-build/FAST-farm/FAST-Farm.sln /Build "Release_OpenMP|x64"
devenv vs-build/HydroDyn/HydroDynDriver.sln /Build "Release|x64"
devenv vs-build/HydroDyn_c_binding/HydroDyn_c_binding.sln /Build "Release|x64"
devenv vs-build/InflowWind_c_binding/InflowWind_c_binding.sln /Build "Release|x64"
devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release|x64"
devenv vs-build/InflowWind/InflowWind_driver.sln /Build "Release_OpenMP|x64"
devenv vs-build/MoorDyn/MoorDynDriver.sln /Build "Release|x64"
devenv vs-build/MoorDyn_c_binding/MoorDyn_c_binding.sln /Build "Release|x64"
devenv vs-build/FAST/FAST.sln /Build "Release|x64"
devenv vs-build/SeaState/SeaStateDriver.sln /Build "Release|x64"
devenv vs-build/SimpleElastoDyn/SimpleElastoDyn_Driver.sln /Build "Release|x64"
devenv vs-build/SubDyn/SubDyn.sln /Build "Release|x64"
devenv vs-build/TurbSim/TurbSim.vfproj /Build "Release|x64"
devenv vs-build/UnsteadyAero/UnsteadyAero.sln /Build "Release|x64"

@REM Build MATLAB solution last
devenv vs-build/FAST/FAST.sln /Build "Release_Matlab|x64"

@REM Copy controllers to bin directory
xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y

exit /b %ERRORLEVEL%
101 changes: 98 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ on:
types:
- released

push:
paths-ignore:
- 'LICENSE'
- 'README.rst'
- 'docs/**'
- 'share/**'

jobs:

# Disabled as publish-to-pypi is working correctly
publish-to-pypi-test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
if: false
# if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -44,7 +53,7 @@ jobs:

publish-to-pypi:
runs-on: ubuntu-latest
if: github.event_name == 'release'
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3

Expand All @@ -71,9 +80,11 @@ jobs:
run: hatch publish
working-directory: openfast_io

# Disabled as it fails due to huge memory requirements
docker-build-and-push:
runs-on: ubuntu-latest
if: github.event_name == 'release'
if: false
# if: github.event_name == 'release'
timeout-minutes: 500
env:
DOCKERFILE_PATH: share/docker/Dockerfile
Expand Down Expand Up @@ -123,3 +134,87 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max

build-windows-executables:
runs-on: windows-2022
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Install Intel oneAPI BaseKit (Windows)
shell: cmd
env:
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe
COMPONENTS: intel.oneapi.win.mkl.devel
run: |
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
del %TEMP%\webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
set installer_exit_code=%ERRORLEVEL%
rd /s/q "webimage_extracted"
exit /b %installer_exit_code%

- name: Install Intel oneAPI HPCKit (Windows)
shell: cmd
env:
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe
COMPONENTS: intel.oneapi.win.ifort-compiler
run: |
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
del %TEMP%\webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
set installer_exit_code=%ERRORLEVEL%
rd /s/q "webimage_extracted"
exit /b %installer_exit_code%

- name: Set up MATLAB
id: setup-matlab
uses: matlab-actions/setup-matlab@v2
with:
products: Simulink

- name: Build Executables
env:
MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }}
run: .github/scripts/build_windows_executables.bat

- name: Test version output
run: |
build/bin/openfast_x64.exe -h
build/bin/TurbSim_x64.exe -h
build/bin/FAST.Farm_x64.exe -h

- name: Build MATLAB Mex File
uses: matlab-actions/run-command@v2
with:
command: |
mexname = 'FAST_SFunc';
mex('-largeArrayDims', ...
'-v', ...
['-L' fullfile('build','bin')], ...
['-I' fullfile('modules','openfast-library','src')], ... % "FAST_Library.h"
['-I' fullfile('modules','supercontroller','src')], ... % "SuperController_Types.h"
['-I' fullfile('modules','externalinflow','src')], ... % "ExternalInflow_Types.h"
['-I' fullfile('modules','extloads','src')], ... % "ExtLoadsDX_Types.h"
['-I' fullfile(matlabroot,'simulink','include')], ...
['-I' fullfile(matlabroot,'extern','include')], ...
['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ...
'-lOpenFAST-Simulink_x64', ...
'-outdir', fullfile('build','bin'), ...
'-output', mexname, ...
fullfile('glue-codes','simulink','src','FAST_SFunc.c'));

- name: Upload executables
uses: actions/upload-artifact@v4
with:
name: openfast-binaries
path: |
build/bin/*.exe
build/bin/*.dll
build/bin/*.mexw64
93 changes: 93 additions & 0 deletions docs/changelogs/v4.0.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
**Feature or improvement description**
Pull request to merge `rc-4.0.4` into `main` and create a tagged release for v4.0.4

See the milestone and project pages for additional information

https://github.com/OpenFAST/openfast/milestone/20

Test results, if applicable
See GitHub Actions

### Release checklist:
- [ ] Update the documentation version in docs/conf.py
- [ ] Update the versions in docs/source/user/api\_change.rst
- [ ] Update version info in openfast\_io/pyproject.toml
- [ ] Verify readthedocs builds correctly
- [ ] Create an annotated tag in OpenFAST during merge (mark as most recent if necessary)
- [ ] Create a merge commit in r-test and add a corresponding annotated tag
- [ ] Compile executables for Windows builds
- [ ] `AeroDisk_Driver_x64.exe`
- [ ] `AeroDyn_Driver_x64.exe`
- [ ] `AeroDyn_Driver_x64_OpenMP.exe`
- [ ] `AeroDyn_Inflow_c_binding_x64.dll`
- [ ] `AeroDyn_Inflow_c_binding_x64_OpenMP.dll`
- [ ] `BeamDyn_Driver_x64.exe`
- [ ] `DISCON.dll (x64)`
- [ ] `DISCON_ITIBarge.dll (x64)`
- [ ] `DISCON_OC3Hywind.dll (x64)`
- [ ] `DISCON_SC.dll (x64)`
- [ ] `FAST.Farm_x64.exe`
- [ ] `FAST.Farm_x64_OMP.exe`
- [ ] `FAST_SFunc.mexw64`
- [ ] `HydroDynDriver_x64.exe`
- [ ] `HydroDyn_C_Binding_x64.dll`
- [ ] `IinflowWind_c_binding_x64.dll`
- [ ] `InflowWind_Driver_x64.exe`
- [ ] `InflowWind_Driver_x64_OpenMP.exe`
- [ ] `MoorDyn_Driver_x64.exe`
- [ ] `MoorDyn_c_binding_x64.dll`
- [ ] `OpenFAST-Simulink_x64.dll`
- [ ] `openfast_x64.exe`
- [ ] `SeaStateDriver_x64.exe`
- [ ] `SimpleElastoDyn_x64.exe`
- [ ] `SubDyn_x64.exe`
- [ ] `Turbsim_x64.exe`
- [ ] `UnsteadyAero_x64.exe`

# Changelog

## Overview

This release includes several bug fixes and improvements for _OpenFAST_, GitHub actions, and _openfast\_io_.

## General

### CMake build system

### GitHub actions

#2778 Backport of GitHub Action to build windows executables on releaseCompiler (@deslaughter) -- backport of #2636


### openfast_io

#2779 MD: Backport of PR #2658 -- openfast\_IO MoorDyn compatibility (@RyanDavies19)

#2777 bug fix #2762 (@mayankchetan)

#2658 openfast\_IO MoorDyn compatibilityModule (@RyanDavies19)



## Solvers

### Simulink

#2785 Avoid ending program when called as a shared library (@bjonkman) -- backport of #2671



## Module changes

### OpenFAST library

#2780 backport of #2760: bug-fix: Adjust steady-state solver small angle assumptions (@bjonkman)

#2776 Fix FAST\_ExtInfw\_Restart APIC++ API (@marchdf)



## Input file changes

No input file changes since v4.0.0

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def runDoxygen(sourcfile, doxyfileIn, doxyfileOut):
# The short X.Y version.
version = u'4.0'
# The full version, including alpha/beta/rc tags.
release = u'v4.0.3'
release = u'v4.0.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
6 changes: 6 additions & 0 deletions docs/source/user/api_change.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ The line number corresponds to the resulting line number after all changes are i
Thus, be sure to implement each in order so that subsequent line numbers are correct.


OpenFAST v4.0.3 to OpenFAST v4.0.4
----------------------------------

No input file changes were made.


OpenFAST v4.0.2 to OpenFAST v4.0.3
----------------------------------

Expand Down
1 change: 0 additions & 1 deletion glue-codes/openfast-cpp/src/OpenFAST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ void fast::OpenFAST::init() {
tmpRstFileRoot,
&AbortErrLev,
&turbineData[iTurb].dt,
&turbineData[iTurb].inflowType,
&turbineData[iTurb].numBlades,
&turbineData[iTurb].numVelPtsBlade,
&turbineData[iTurb].numVelPtsTwr,
Expand Down
2 changes: 1 addition & 1 deletion modules/moordyn/src/MoorDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MODULE MoorDyn

PRIVATE

TYPE(ProgDesc), PARAMETER :: MD_ProgDesc = ProgDesc( 'MoorDyn', 'v2.2.2', '2024-01-16' )
TYPE(ProgDesc), PARAMETER :: MD_ProgDesc = ProgDesc( 'MoorDyn', 'v2.3.8', '2025-02-27' )

INTEGER(IntKi), PARAMETER :: wordy = 0 ! verbosity level. >1 = more console output

Expand Down
8 changes: 4 additions & 4 deletions modules/moordyn/src/MoorDyn_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ SUBROUTINE MDIO_WriteOutputs( Time, p, m, y, ErrStat, ErrMsg )
if ( p%NumOuts > 0_IntKi .and. p%MDUnOut > 0 ) then

! Write the output parameters to the file
Frmt = '(F10.4,'//TRIM(Int2LStr(p%NumOuts))//'(A1,ES15.7E2))' ! should evenutally use user specified format?
Frmt = '(F10.4,'//TRIM(Int2LStr(p%NumOuts))//'(A1,ES15.7))' ! should evenutally use user specified format?

WRITE(p%MDUnOut,Frmt) Time, ( p%Delim, y%WriteOutput(I), I=1,p%NumOuts )
END IF
Expand All @@ -1605,9 +1605,9 @@ SUBROUTINE MDIO_WriteOutputs( Time, p, m, y, ErrStat, ErrMsg )
+ m%LineList(I)%N*SUM(m%LineList(I)%OutFlagList(10:18))

if (m%LineList(I)%OutFlagList(2) == 1) THEN ! if node positions are included, make them using a float format for higher precision
Frmt = '(F10.4,'//TRIM(Int2LStr(3*(m%LineList(I)%N + 1)))//'(A1,ES15.7E2),'//TRIM(Int2LStr(LineNumOuts - 3*(m%LineList(I)%N - 1)))//'(A1,ES15.7E2))'
Frmt = '(F10.4,'//TRIM(Int2LStr(3*(m%LineList(I)%N + 1)))//'(A1,ES15.7),'//TRIM(Int2LStr(LineNumOuts - 3*(m%LineList(I)%N - 1)))//'(A1,ES15.7))'
else
Frmt = '(F10.4,'//TRIM(Int2LStr(LineNumOuts))//'(A1,ES15.7E2))' ! should evenutally use user specified format?
Frmt = '(F10.4,'//TRIM(Int2LStr(LineNumOuts))//'(A1,ES15.7))' ! should evenutally use user specified format?
end if

L = 1 ! start of index of line output file at first entry 12345.7890
Expand Down Expand Up @@ -1755,7 +1755,7 @@ SUBROUTINE MDIO_WriteOutputs( Time, p, m, y, ErrStat, ErrMsg )
+ m%RodList(I)%N*SUM(m%RodList(I)%OutFlagList(12:18))


Frmt = '(F10.4,'//TRIM(Int2LStr(RodNumOuts))//'(A1,ES15.7E2))' ! should evenutally use user specified format?
Frmt = '(F10.4,'//TRIM(Int2LStr(RodNumOuts))//'(A1,ES15.7))' ! should evenutally use user specified format?

L = 1 ! start of index of line output file at first entry

Expand Down
2 changes: 1 addition & 1 deletion modules/openfast-library/src/FAST_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
EXTERNAL_ROUTINE void FAST_AllocateTurbines(int * iTurb, int *ErrStat, char *ErrMsg);
EXTERNAL_ROUTINE void FAST_DeallocateTurbines(int *ErrStat, char *ErrMsg);

EXTERNAL_ROUTINE void FAST_ExtInfw_Restart(int * iTurb, const char *CheckpointRootName, int *AbortErrLev, double * dt, int * InflowType,
EXTERNAL_ROUTINE void FAST_ExtInfw_Restart(int * iTurb, const char *CheckpointRootName, int *AbortErrLev, double * dt,
int * NumBl, int * NumBlElem, int * NumTwrElem, int * n_t_global,
ExtInfw_InputType_t* ExtInfw_Input, ExtInfw_OutputType_t* ExtInfw_Output, SC_DX_InputType_t* SC_DX_Input, SC_DX_OutputType_t* SC_DX_Output,
int *ErrStat, char *ErrMsg);
Expand Down
Loading