Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 4 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <openfast.exe> --case-dir <case-dir>`,
where `<case-dir>` holds the `examples/openfast` IEA-15 UMaine twin decks and
the r-test `MD_Shared` turbine-1 ElastoDyn, HydroDyn, SeaState and HydroData
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions doc/coupling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``)
-----------------------------
Expand Down
5 changes: 3 additions & 2 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
4 changes: 2 additions & 2 deletions doc/openfast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion integration/openfast/integrate_openfast_vs_solution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
24 changes: 18 additions & 6 deletions release/build_static_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -204,24 +210,24 @@ $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 {
# IFX occasionally reports an internal compiler error while Visual Studio
# 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
}

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

Expand All @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion tests/test_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ="),
Expand Down
Loading