Skip to content

Commit 72d272a

Browse files
authored
Merge pull request #3169 from deslaughter/dev-tc_vs_updates
Update Visual Studio projects in dev-tc
2 parents 1224f46 + b18933c commit 72d272a

68 files changed

Lines changed: 3728 additions & 4691 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/build_windows_executables.bat

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,72 @@ for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\
77
@REM since building the Visual Studio projects modifies files
88
powershell -command "(Get-Content -Path '.\vs-build\CreateGitVersion.bat') -replace '--dirty', '' | Set-Content -Path '.\vs-build\CreateGitVersion.bat'"
99

10-
11-
1210
setlocal enabledelayedexpansion
1311

1412
:: Initialize a variable to store failed solutions
1513
set "FailedSolutions="
1614
set "OverallErrorLevel=0"
1715

1816

19-
echo on
20-
@REM Build all solutions (release 64)
17+
echo "Build all projects (Release|64)"
2118
devenv vs-build/OpenFAST.sln /Build "Release|x64"
22-
echo off
2319
if %ERRORLEVEL% NEQ 0 (
2420
set "FailedSolutions=!FailedSolutions!Release "
2521
set "OverallErrorLevel=1"
2622
echo Build of OpenFAST.sln Release failed!
2723
)
28-
echo on
2924

3025

31-
@REM Build all OpenMP solutions (release 64 OpenMP)
32-
echo on
33-
devenv vs-build/OpenFAST.sln /Build "Release_OpenMP|x64"
34-
echo off
26+
echo "Build all OpenMP projects (OpenMP_Release|64)"
27+
devenv vs-build/OpenFAST.sln /Build "OpenMP_Release|x64"
3528
if %ERRORLEVEL% NEQ 0 (
36-
set "FailedSolutions=!FailedSolutions!Release_OpenMP "
29+
set "FailedSolutions=!FailedSolutions!OpenMP_Release "
3730
set "OverallErrorLevel=1"
38-
echo Build of OpenFAST.sln Release_OpenMP failed!
31+
echo Build of OpenFAST.sln OpenMP_Release failed!
3932
)
40-
echo on
4133

4234

43-
@REM Build MATLAB solution last
44-
echo on
45-
devenv vs-build/OpenFAST.sln /Build "Release_Matlab|x64"
46-
echo off
35+
echo "Build OpenFAST-Simulink shared library (Matlab_Release|x64)"
36+
devenv vs-build/OpenFAST.sln /Build "Matlab_Release|x64"
4737
if %ERRORLEVEL% NEQ 0 (
48-
set "FailedSolutions=!FailedSolutions!Release_Matlab "
38+
set "FailedSolutions=!FailedSolutions!Matlab_Release "
4939
set "OverallErrorLevel=1"
50-
echo Build of OpenFAST.sln Release_Matlab failed!
40+
echo Build of OpenFAST.sln Matlab_Release failed!
5141
)
52-
echo on
53-
5442

5543

56-
@REM Copy controllers to bin directory
57-
@REM xcopy .\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData\*.dll .\build\bin\ /y
58-
59-
echo.
60-
echo Build Summary:
61-
echo off
44+
echo "Build Summary:"
6245
if defined FailedSolutions (
6346
echo The following solutions failed to build:
6447
echo %FailedSolutions%
6548
) else (
6649
echo All solutions built successfully.
6750
)
68-
echo on
51+
52+
@echo off
53+
setlocal enabledelayedexpansion
54+
55+
cd /d build\bin || exit /b 1
56+
57+
for %%F in (*_Release*) do (
58+
set "name=%%~nxF"
59+
set "newname=!name:_Release=!"
60+
if not "!name!"=="!newname!" (
61+
ren "%%F" "!newname!"
62+
)
63+
)
64+
for %%F in (*_Matlab*) do (
65+
set "name=%%~nxF"
66+
set "newname=!name:_Matlab=!"
67+
if not "!name!"=="!newname!" (
68+
ren "%%F" "!newname!"
69+
)
70+
)
71+
72+
endlocal
73+
74+
echo "List executables in build\bin"
75+
dir build\bin
6976

7077
:: Set the final error level based on the overall build status
7178
exit /b %OverallErrorLevel%

.github/scripts/test_windows_executables.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" %VS_VER%
2+
3+
for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
4+
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"
5+
16
echo off
27
setlocal enabledelayedexpansion
38

.github/workflows/deploy.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,18 @@ jobs:
145145
submodules: true
146146
fetch-depth: 0
147147

148-
- name: Test devenv actually works
149-
shell: cmd
150-
run: .github/scripts/windows_devenv_test.bat
148+
# - name: Test devenv actually works
149+
# shell: cmd
150+
# run: .github/scripts/windows_devenv_test.bat
151151

152-
- name: Install Intel oneAPI BaseKit (Windows)
152+
- name: Install Intel Fortran Essentials (Windows)
153153
shell: cmd
154154
env:
155-
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0ba263f5-de00-4e91-a780-fdb9e131c1e8/intel-oneapi-hpc-toolkit-2025.1.0.665_offline.exe
156-
COMPONENTS: intel.oneapi.win.ifort-compiler:intel.oneapi.win.mkl.devel
155+
URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33676fcf-14a3-4e96-a9b9-72976b1145d9/intel-fortran-essentials-2025.3.1.25_offline.exe
157156
run: |
158157
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5
159-
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
160-
del %TEMP%\webimage.exe
161-
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=.
158+
%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=.
162159
set installer_exit_code=%ERRORLEVEL%
163-
rd /s/q "webimage_extracted"
164160
exit /b %installer_exit_code%
165161
166162
- name: Set up MATLAB
@@ -169,30 +165,27 @@ jobs:
169165
with:
170166
products: Simulink
171167

172-
- name: Build Executables
168+
- name: Build Executabless
173169
env:
174170
MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }}
175171
run: .github/scripts/build_windows_executables.bat
176172

177-
- name: Test version output
178-
run: .github/scripts/test_windows_executables.bat
173+
# - name: Test version output
174+
# run: .github/scripts/test_windows_executables.bat
179175

180176
- name: Build MATLAB Mex File
181177
uses: matlab-actions/run-command@v2
182178
with:
183179
command: |
184180
mexname = 'FAST_SFunc';
185-
mex('-largeArrayDims', ...
186-
'-v', ...
181+
mex('-largeArrayDims', '-v', ...
187182
['-L' fullfile('build','bin')], ...
188183
['-I' fullfile('modules','openfast-library','src')], ... % "FAST_Library.h"
189184
['-I' fullfile('modules','supercontroller','src')], ... % "SuperController_Types.h"
190185
['-I' fullfile('modules','externalinflow','src')], ... % "ExternalInflow_Types.h"
191186
['-I' fullfile('modules','extloads','src')], ... % "ExtLoadsDX_Types.h"
192-
['-I' fullfile(matlabroot,'simulink','include')], ...
193-
['-I' fullfile(matlabroot,'extern','include')], ...
194187
['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ...
195-
'-lOpenFAST-Simulink_x64', ...
188+
'-lOpenFAST-Simulink', ...
196189
'-outdir', fullfile('build','bin'), ...
197190
'-output', mexname, ...
198191
fullfile('glue-codes','simulink','src','FAST_SFunc.c'));

glue-codes/simulink/src/create_FAST_SFunc.m

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,13 @@
3333
libDir = '../../../build/bin';
3434
includeDir = '../../../modules/openfast-library/src'; % needed for visual studio builds to find "FAST_Library.h"
3535
outDir = libDir;
36-
37-
switch computer('arch')
38-
case 'win64'
39-
% this is set up for files generated using the x64 configuration of vs-build
40-
libName = 'OpenFAST-Simulink_x64';
41-
42-
case 'win32'
43-
% this is set up for files generated using the x86
44-
% configuration of vs-build (win32 will work only on older versions of Matlab)
45-
libName = 'OpenFAST-Simulink_Win32';
46-
end
36+
libName = 'OpenFAST-Simulink';
4737

4838
else
4939
%% defaults for cmake builds:
5040

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

5545
end

modules/hydrodyn/src/Morison.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5445,6 +5445,7 @@ SUBROUTINE RefineElementHstLds_Rec(p, origin, pos1, posMid, pos2, FSPt, Sa1, SaM
54455445
type (Stack) :: SE ! Stack element
54465446

54475447
ErrStat = ErrID_None
5448+
ErrMsg = ""
54485449

54495450
! Initialize first stack element
54505451
SA(1)%level = 1

0 commit comments

Comments
 (0)