From 57fbf5ccd9a4e99488f35ece8bd8b3d724c5dc62 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 4 Dec 2026 10:31:10 +0900 Subject: [PATCH 1/2] feat(release): openfast.exe in double precision build_static_windows.ps1 takes -OpenFASTConfiguration (Double_Release, the default, or Release) and builds openfast.exe from that Visual Studio solution configuration; Double_Release is OpenFAST's double-precision build (ReKi = 8 bytes), as its CMake builds and every OpenFAST validation of CableDyn. The build fails unless openfast.exe -v reports the precision of the configuration. The CableDyn adapter template already carries Double_Release, and the integration adds the static core to every link configuration. RELEASE.md, the coupling, OpenFAST and installation pages, the README and the CHANGELOG name the double-precision executable. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 ++++++++ CMakeLists.txt | 2 +- README.md | 2 +- RELEASE.md | 6 +++-- doc/coupling.rst | 7 +++--- doc/installation.rst | 5 ++-- doc/openfast.rst | 4 ++-- .../integrate_openfast_vs_solution.ps1 | 2 +- release/build_static_windows.ps1 | 24 ++++++++++++++----- 9 files changed, 44 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c9e27a..1331de21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ All notable changes to CableDyn are recorded in this file. The format follows ## [Unreleased] +### Changed + +- The release `openfast.exe` is OpenFAST's double-precision build (the Visual Studio + `Double_Release` configuration, `Precision: double` in `openfast.exe -v`), as every OpenFAST + validation of CableDyn and every CMake build of OpenFAST. Up to 0.5.0 it was the + single-precision `Release` configuration, whose ElastoDyn, AeroDyn and HydroDyn states, meshes and + outputs carry 7 digits. `release/build_static_windows.ps1 -OpenFASTConfiguration Release` still + builds the single-precision executable, and the release build checks the precision the + executable reports. + ## [0.5.0] - 2026-12-04 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 81a17543..b43c427b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ if(CABLEDYN_STATIC_WINDOWS_RELEASE) # and are called per element and per Newton iteration; without interprocedural # optimisation IFX cannot inline across those module boundaries. The core archive # then holds IPO objects, so it links only through an IPO-capable IFX link (the - # driver below, or the OpenFAST Release|x64 project, which enables whole-program + # driver below, or the OpenFAST Double_Release|x64 (or Release|x64) project, which enables whole-program # optimisation). # # The floating-point model is /fp:precise, as in every IFX build (below); the reference diff --git a/README.md b/README.md index 6555321a..a81855f5 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Unsupported combinations stop with a named error rather than running approximate | Asset | Contents | |---|---| | `CableDyn_driver.exe` | Standalone solver for Windows x64 (AVX2 processor) | - | `openfast.exe` | OpenFAST with CableDyn available as `CompMooring = 5` | + | `openfast.exe` | OpenFAST (double precision) with CableDyn available as `CompMooring = 5` | | `cabledyn-0.5.0-py3-none-any.whl` | Python package (pre- and post-processing, batch runs) | | `cabledyn-0.5.0.tar.gz` | Python source distribution | | `SHA256SUMS.txt` | Checksums for the assets above | diff --git a/RELEASE.md b/RELEASE.md index 06d34116..b6e31289 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -68,7 +68,7 @@ only the `cabledyn` package and its metadata. `openfast.exe` with CableDyn, checks that a coupled run prints the CableDyn banner, and checks that the output is finite. 2. **Linearisation check**: with the built executable and again with the release workflow's - `openfast.exe` (single precision, the Visual Studio `Release` configuration), run + `openfast.exe` (double precision, the Visual Studio `Double_Release` configuration), run `python validation/scripts/openfast_lin_ab.py --exe --case-dir `, where `` holds the `examples/openfast` IEA-15 UMaine twin decks and the r-test `MD_Shared` turbine-1 ElastoDyn, HydroDyn, SeaState and HydroData @@ -105,7 +105,9 @@ active-code-page manifest (`release/check_static_windows_binary.ps1`), or if the standalone and `CompMooring = 5` smoke cases fail with a system-only `PATH` or from a folder named in mixed scripts. It also fails unless `openfast.exe -v` names the executable `OpenFAST-v5.0.0-CableDyn-0.5.0`: the OpenFAST base and the CableDyn version, -never a `-dirty` describe of the patched tree. +never a `-dirty` describe of the patched tree, and unless it reports `Precision: double` +(the default `-OpenFASTConfiguration Double_Release`; `Release` builds the single-precision +executable of the releases up to 0.5.0). The release workflow (`.github/workflows/release-windows-static.yml`) produces exactly these assets: diff --git a/doc/coupling.rst b/doc/coupling.rst index 31eed549..d7023a3b 100644 --- a/doc/coupling.rst +++ b/doc/coupling.rst @@ -81,9 +81,10 @@ dependency of CableDyn or ``openfast.exe``. The release build is described in The release compiler is pinned to IFX 2025.3 or newer, and both CableDyn and stock-MoorDyn OpenFAST paths must pass separate smoke cases. A successful CableDyn case alone does not qualify the executable as a drop-in OpenFAST replacement. The packaged OpenFAST executable is built from -the upstream Visual Studio ``Release|x64`` solution target (the same build family used for the -official Windows release), with CableDyn installed as a normal solution module; it is not a -CMake-built approximation of that executable. +the upstream Visual Studio ``Double_Release|x64`` solution target (the double-precision member +of the build family used for the official Windows release), with CableDyn installed as a normal +solution module; it is not a CMake-built approximation of that executable. Up to CableDyn 0.5.0 +the packaged executable was the single-precision ``Release|x64`` target. C binding (``CableDyn_CAPI``) ----------------------------- diff --git a/doc/installation.rst b/doc/installation.rst index 7c4898a6..c0f9fd60 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -34,8 +34,9 @@ What is on the release page * - ``openfast.exe`` - OpenFAST v5.0.0 (maintained by NLR, the National Laboratory of the Rockies, formerly NREL) with CableDyn built in as ``CompMooring = 5``; stock MoorDyn - (``CompMooring = 3``) is still available in the same binary (:doc:`openfast`). It names - itself ``OpenFAST-v5.0.0-CableDyn-0.5.0`` (``openfast.exe -v`` and the start of every run). + (``CompMooring = 3``) is still available in the same binary (:doc:`openfast`). It is the + double-precision build (``Precision: double`` in ``openfast.exe -v``) and names itself + ``OpenFAST-v5.0.0-CableDyn-0.5.0`` (``openfast.exe -v`` and the start of every run). * - ``cabledyn-0.5.0-py3-none-any.whl`` - the pure-Python package: deck editing, case generation, driver automation, result readers, fatigue and spectral post-processing (:doc:`python`) diff --git a/doc/openfast.rst b/doc/openfast.rst index 5c7416f9..6b63004b 100644 --- a/doc/openfast.rst +++ b/doc/openfast.rst @@ -647,8 +647,8 @@ Positions, tangents and coupled-point displacements are stepped by 1 µm, which seabed penetration of a light cable and the stretch of every taut element. Velocities are stepped by 0.1 m/s, MoorDyn-F's step. The output differences are taken from CableDyn's own double-precision loads and channels, not from the OpenFAST output mesh, so a single-precision -OpenFAST build (the Visual Studio ``Release`` configuration, as the release ``openfast.exe``) -linearises as a double-precision one: its mesh carries 7 digits, too few for loads of a few MN +OpenFAST build (the Visual Studio ``Release`` configuration, as the release ``openfast.exe`` up to +0.5.0) linearises as a double-precision one: its mesh carries 7 digits, too few for loads of a few MN over a 1 µm step. A line restrained in torsion adds the twist angle of every node that its end frames do not hold diff --git a/integration/openfast/integrate_openfast_vs_solution.ps1 b/integration/openfast/integrate_openfast_vs_solution.ps1 index a440abf8..a562a6f2 100644 --- a/integration/openfast/integrate_openfast_vs_solution.ps1 +++ b/integration/openfast/integrate_openfast_vs_solution.ps1 @@ -164,7 +164,7 @@ $sln | Set-Content -LiteralPath $solution -Encoding utf8 # The independently built CableDyn core is not a solution project, so add it # explicitly to every OpenFAST link configuration. The static-release core is # compiled with /Qipo and links only in configurations with whole-program -# optimisation (Release|x64, which the release builds). +# optimisation (Release|x64 and Double_Release|x64; the release builds Double_Release). [xml]$vf = Get-Content -LiteralPath $openfastProject -Raw foreach ($configuration in $vf.VisualStudioProject.Configurations.Configuration) { $linker = @($configuration.Tool | Where-Object { $_.Name -eq 'VFLinkerTool' })[0] diff --git a/release/build_static_windows.ps1 b/release/build_static_windows.ps1 index 637d09a5..ba196e8e 100644 --- a/release/build_static_windows.ps1 +++ b/release/build_static_windows.ps1 @@ -17,7 +17,12 @@ param( [string]$MklVars = 'C:\Program Files (x86)\Intel\oneAPI\mkl\latest\env\vars.bat', [string]$VcVarsAll = '', # Local copy of the pinned reference LAPACK source archive; downloaded when empty. - [string]$ReferenceLapackArchive = '' + [string]$ReferenceLapackArchive = '', + # The OpenFAST solution configuration of openfast.exe: Double_Release (the release: OpenFAST's + # double-precision build, ReKi = 8 bytes, as its CMake builds and every OpenFAST validation of + # CableDyn) or Release (single precision, the release up to CableDyn 0.5.0). + [ValidateSet('Double_Release', 'Release')] + [string]$OpenFASTConfiguration = 'Double_Release' ) $ErrorActionPreference = 'Stop' @@ -181,7 +186,8 @@ Remove-Item -LiteralPath (Join-Path $cdBuild 'CableDyn_driver.exe') -Force -Erro Invoke-StaticToolchain "cmake --build `"$cdBuild`" --target cabledyn_core cabledyn -j $Jobs" # Match the official OpenFAST Windows release route: integrate CableDyn into the -# maintained Intel Fortran solution and build its non-OpenMP Release|x64 target. +# maintained Intel Fortran solution and build its non-OpenMP $OpenFASTConfiguration|x64 target +# (Double_Release, double precision, unless asked otherwise). # This preserves the solution's compiler, MKL, stack-reserve, whole-program # optimisation, and static runtime settings instead of approximating them with a # separate CMake OpenFAST build. The reference LAPACK is listed explicitly, so @@ -204,8 +210,8 @@ $expectedOpenFASTVersion = "$ofDescribe-CableDyn-$($Matches[1])" $devenv = Join-Path $vsRoot 'Common7\IDE\devenv.com' if (-not (Test-Path -LiteralPath $devenv)) { throw "Visual Studio command-line builder not found: $devenv" } -$openFastBuild = "`"$devenv`" `"$OpenFASTRoot\vs-build\OpenFAST.sln`" /Build `"Release|x64`" " + - "/Project `"OpenFAST`" /ProjectConfig `"Release|x64`"" +$openFastBuild = "`"$devenv`" `"$OpenFASTRoot\vs-build\OpenFAST.sln`" /Build `"$OpenFASTConfiguration|x64`" " + + "/Project `"OpenFAST`" /ProjectConfig `"$OpenFASTConfiguration|x64`"" try { Invoke-StaticToolchain $openFastBuild } catch { @@ -213,7 +219,7 @@ try { # parallel-compiles the large upstream NWTC library. A resumed solution # build recompiles the missing object; a deterministic source/link error # fails again and still blocks the release. - Write-Warning "OpenFAST solution build failed once; retrying the resumable Release|x64 build" + Write-Warning "OpenFAST solution build failed once; retrying the resumable $OpenFASTConfiguration|x64 build" Invoke-StaticToolchain $openFastBuild } @@ -221,7 +227,7 @@ New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null $driver = Join-Path $OutputDir 'CableDyn_driver.exe' $openfast = Join-Path $OutputDir 'openfast.exe' Copy-Item -LiteralPath (Join-Path $cdBuild 'CableDyn_driver.exe') -Destination $driver -Force -$vsOpenFAST = Join-Path $ofVsBuild 'bin\OpenFAST_Release.exe' +$vsOpenFAST = Join-Path $ofVsBuild "bin\OpenFAST_$OpenFASTConfiguration.exe" if (-not (Test-Path -LiteralPath $vsOpenFAST)) { throw "Visual Studio OpenFAST output not found: $vsOpenFAST" } Copy-Item -LiteralPath $vsOpenFAST -Destination $openfast -Force @@ -248,6 +254,12 @@ try { throw "openfast.exe -v does not report OpenFAST-$expectedOpenFASTVersion`n$($ofVersionRun.Text)" } Write-Host "PASS openfast.exe identity: OpenFAST-$expectedOpenFASTVersion" + # the precision of the configuration built, as openfast.exe reports it (' - Precision: double') + $expectedPrecision = if ($OpenFASTConfiguration -eq 'Double_Release') { 'double' } else { 'single' } + if ($ofVersionRun.Text -notmatch "(?m)^\s*-\s*Precision:\s*$expectedPrecision\s*$") { + throw "openfast.exe -v does not report Precision: $expectedPrecision`n$($ofVersionRun.Text)" + } + Write-Host "PASS openfast.exe precision: $expectedPrecision" # On a processor without x86-64-v3 both executables stop at start with the message # (simulated here): exit 3 before any CableDyn or OpenFAST code prints. $env:CABLEDYN_CPU_GUARD_SIMULATE = 'SIMULATED-FEATURE' From f0b6ae040afff13743402332787ee93ef1745312 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 4 Dec 2026 12:57:12 +0900 Subject: [PATCH 2/2] test(docs): the release build's solution configuration and precision check test_windows_release_is_publicly_reproducible looked for the literal Release|x64 target in build_static_windows.ps1. It now checks that the script builds the configured solution target, that Double_Release is the default, and that it checks the precision openfast.exe reports. Signed-off-by: Jae Hoon Seo --- tests/test_documentation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_documentation.py b/tests/test_documentation.py index 8d13059e..baf58ae8 100644 --- a/tests/test_documentation.py +++ b/tests/test_documentation.py @@ -159,7 +159,11 @@ def test_windows_release_is_publicly_reproducible(self) -> None: self.assertIn("@('-v')", build_script) self.assertIn("fetch-depth: 0", workflow) self.assertIn("devenv.com", build_script) - self.assertIn("Release|x64", build_script) + # the Visual Studio solution target, double precision by default, and the precision + # the built openfast.exe reports is checked + self.assertIn("$OpenFASTConfiguration|x64", build_script) + self.assertIn("[string]$OpenFASTConfiguration = 'Double_Release'", build_script) + self.assertIn("Precision:", build_script) self.assertNotIn('cmake --build `"$ofBuild`"', build_script) self.assertLess( build_script.index("$vsRoot ="),