Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fd6b7d8
Update visual studio projects for dev-tc
deslaughter Jan 23, 2026
384afa5
Merge remote-tracking branch 'origin/dev-tc-perf' into dev-tc_vs_updates
deslaughter Jan 23, 2026
8c78132
Disable MATLAB in GH actions Windows deploy temporarily
deslaughter Jan 23, 2026
508a798
Fix missing include path in AWAE-C for release builds
deslaughter Jan 23, 2026
723b5a7
temporarily disable test on windows build
deslaughter Jan 23, 2026
8ce743d
Rework visual studio projects
deslaughter Jan 27, 2026
f075331
Merge branch 'dev-tc_vs_updates' of github.com:deslaughter/openfast i…
deslaughter Jan 27, 2026
08768c9
Tidy up Windows build GH action
deslaughter Jan 27, 2026
f2b7c88
Fix Simulink build from VS
deslaughter Jan 27, 2026
ff0b515
Add controllers to VS solution
deslaughter Jan 27, 2026
40b7346
Remove OpenFAST from Simulink build in VS projects. Fix dependency on…
deslaughter Jan 27, 2026
2bb1a15
Update create_FAST_SFunc.m, use intel-fortran-essentials in deploy.ym…
deslaughter Jan 27, 2026
1f21188
Fix renaming in build_windows_executables.bat
deslaughter Jan 27, 2026
b7874d2
Convert windows build script to powershell
deslaughter Jan 27, 2026
82cd9f4
Try again
deslaughter Jan 27, 2026
69a8eea
Almost have simulink build working with VS
deslaughter Jan 27, 2026
0589eac
Windows deploy will work this time
deslaughter Jan 27, 2026
117c402
Revert "Windows deploy will work this time"
deslaughter Jan 28, 2026
fae9a99
Remove bad line from morison
deslaughter Jan 28, 2026
e02e3ed
Update r-test pointer
deslaughter Jan 28, 2026
acb4628
Merge remote-tracking branch 'upstream/dev-tc' into dev-tc_vs_updates
deslaughter Jan 28, 2026
d7d92d2
update r-test pointer
deslaughter Jan 28, 2026
21f6995
Add SoilDyn to VS projects, fix LinDyn project, Update VS solution
deslaughter Jan 28, 2026
2628e9d
Merge remote-tracking branch 'origin/dev-tc_vs_updates' into dev-tc_v…
deslaughter Jan 28, 2026
740dcfe
Update r-test pointer
deslaughter Jan 28, 2026
e802f81
update r-test pointer
deslaughter Jan 28, 2026
d209d1d
Don't build soildyn driver when doing matlab build
deslaughter Jan 28, 2026
28bf160
Update r-test pointer
deslaughter Jan 29, 2026
0f1355b
Update r-test pointer
deslaughter Feb 4, 2026
b18933c
Merge remote-tracking branch 'upstream/dev-tc' into dev-tc_vs_updates
deslaughter Feb 4, 2026
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
63 changes: 35 additions & 28 deletions .github/scripts/build_windows_executables.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,72 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\
@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'"



setlocal enabledelayedexpansion

:: Initialize a variable to store failed solutions
set "FailedSolutions="
set "OverallErrorLevel=0"


echo on
@REM Build all solutions (release 64)
echo "Build all projects (Release|64)"
devenv vs-build/OpenFAST.sln /Build "Release|x64"
echo off
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release failed!
)
echo on


@REM Build all OpenMP solutions (release 64 OpenMP)
echo on
devenv vs-build/OpenFAST.sln /Build "Release_OpenMP|x64"
echo off
echo "Build all OpenMP projects (OpenMP_Release|64)"
devenv vs-build/OpenFAST.sln /Build "OpenMP_Release|x64"
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release_OpenMP "
set "FailedSolutions=!FailedSolutions!OpenMP_Release "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release_OpenMP failed!
echo Build of OpenFAST.sln OpenMP_Release failed!
)
echo on


@REM Build MATLAB solution last
echo on
devenv vs-build/OpenFAST.sln /Build "Release_Matlab|x64"
echo off
echo "Build OpenFAST-Simulink shared library (Matlab_Release|x64)"
devenv vs-build/OpenFAST.sln /Build "Matlab_Release|x64"
if %ERRORLEVEL% NEQ 0 (
set "FailedSolutions=!FailedSolutions!Release_Matlab "
set "FailedSolutions=!FailedSolutions!Matlab_Release "
set "OverallErrorLevel=1"
echo Build of OpenFAST.sln Release_Matlab failed!
echo Build of OpenFAST.sln Matlab_Release failed!
)
echo on



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

echo.
echo Build Summary:
echo off
echo "Build Summary:"
if defined FailedSolutions (
echo The following solutions failed to build:
echo %FailedSolutions%
) else (
echo All solutions built successfully.
)
echo on

@echo off
setlocal enabledelayedexpansion

cd /d build\bin || exit /b 1

for %%F in (*_Release*) do (
set "name=%%~nxF"
set "newname=!name:_Release=!"
if not "!name!"=="!newname!" (
ren "%%F" "!newname!"
)
)
for %%F in (*_Matlab*) do (
set "name=%%~nxF"
set "newname=!name:_Matlab=!"
if not "!name!"=="!newname!" (
ren "%%F" "!newname!"
)
)

endlocal

echo "List executables in build\bin"
dir build\bin

:: Set the final error level based on the overall build status
exit /b %OverallErrorLevel%
5 changes: 5 additions & 0 deletions .github/scripts/test_windows_executables.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@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"

echo off
setlocal enabledelayedexpansion

Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,18 @@ jobs:
submodules: true
fetch-depth: 0

- name: Test devenv actually works
shell: cmd
run: .github/scripts/windows_devenv_test.bat
# - name: Test devenv actually works
# shell: cmd
# run: .github/scripts/windows_devenv_test.bat

- name: Install Intel oneAPI BaseKit (Windows)
- name: Install Intel Fortran Essentials (Windows)
shell: cmd
env:
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0ba263f5-de00-4e91-a780-fdb9e131c1e8/intel-oneapi-hpc-toolkit-2025.1.0.665_offline.exe
COMPONENTS: intel.oneapi.win.ifort-compiler:intel.oneapi.win.mkl.devel
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33676fcf-14a3-4e96-a9b9-72976b1145d9/intel-fortran-essentials-2025.3.1.25_offline.exe
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=.
%TEMP%\webimage.exe -s -a --silent --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
Expand All @@ -169,30 +165,27 @@ jobs:
with:
products: Simulink

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

- name: Test version output
run: .github/scripts/test_windows_executables.bat
# - name: Test version output
# run: .github/scripts/test_windows_executables.bat

- name: Build MATLAB Mex File
uses: matlab-actions/run-command@v2
with:
command: |
mexname = 'FAST_SFunc';
mex('-largeArrayDims', ...
'-v', ...
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', ...
'-lOpenFAST-Simulink', ...
'-outdir', fullfile('build','bin'), ...
'-output', mexname, ...
fullfile('glue-codes','simulink','src','FAST_SFunc.c'));
Expand Down
14 changes: 2 additions & 12 deletions glue-codes/simulink/src/create_FAST_SFunc.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,13 @@
libDir = '../../../build/bin';
includeDir = '../../../modules/openfast-library/src'; % needed for visual studio builds to find "FAST_Library.h"
outDir = libDir;

switch computer('arch')
case 'win64'
% this is set up for files generated using the x64 configuration of vs-build
libName = 'OpenFAST-Simulink_x64';

case 'win32'
% this is set up for files generated using the x86
% configuration of vs-build (win32 will work only on older versions of Matlab)
libName = 'OpenFAST-Simulink_Win32';
end
libName = 'OpenFAST-Simulink';

else
%% defaults for cmake builds:

fprintf( '\n----------------------------\n' );
fprintf( 'Do not use this script with Mac/Linux. Follow the CMake instructions at the top of the script instead.' );
fprintf( 'Do not use this script with Mac/Linux. Follow the CMake instructions at the top of this script instead.' );
fprintf( '\n----------------------------\n' );

end
Expand Down
1 change: 1 addition & 0 deletions modules/hydrodyn/src/Morison.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5445,6 +5445,7 @@ SUBROUTINE RefineElementHstLds_Rec(p, origin, pos1, posMid, pos2, FSPt, Sa1, SaM
type (Stack) :: SE ! Stack element

ErrStat = ErrID_None
ErrMsg = ""

! Initialize first stack element
SA(1)%level = 1
Expand Down
Loading