From df5087a7f568c041b5c49cba63e7be1b1e4cb2bb Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 8 Nov 2026 20:20:01 +0900 Subject: [PATCH 1/5] docs(validation): measure the L5 wall-clock records again with committed timing scripts The L5 performance records were measured around 0.1.0 on another host, and their models and driver scripts were not in the repository. validation/scripts/performance_records.py (with performance_models.py) now builds, checks and times every L5 case on one host, one thread, as the median of three runs after one warm-up: - L5-DPC: the matched 80/200/800 m pinned-touchdown lazy-wave spans of the L3-6 protocol. CableDyn driver decks with 240/480/960 Hermite elements, the OrcaFlex models of orcaflex_lazywave_dynamic_reference.py, and the MoorDyn-F decks of moordyn_lazywave_dynamic_reference.py refined fourfold, with an optional half-step check of the MoorDyn-F step. - L5-V: the one-hour VolturnUS-S chain, as a CableDyn deck with the l3_longduration_mooring drive and the OrcaFlex model of orcaflex_longduration_mooring.py (now exposing build_model()). - L5-wc: the WD0050 chain under the L2-2 A1 heave, CableDyn against MoorDyn-C v2.7.2 through moordyn_c_driver.cpp. Each timed model must reproduce its reference response before it is recorded. The records keep the code versions, builds and hashes, the host and date, the ranges, the host load, the CableDyn phase split and solver counts, and the driver notes. CableDyn is timed with the release driver (IFX) and with a GNU build of dev. VALIDATION.md: the L5-V, L5-wc and L5-DPC rows and the wall-clock section carry the new figures; the Hermite solver bullet is re-measured on the committed tests it names (figures without a committed case are removed); the coupled-throughput figures are labelled with their date and host. The performance records are dated history for the release-version check. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 8 + VALIDATION.md | 111 +-- release/check_release_metadata.py | 1 + tests/test_validation_records.py | 53 +- validation/README.md | 2 +- validation/performance/PERFORMANCE_AUDIT.md | 70 +- validation/performance/README.md | 127 ++- .../performance/performance_metrics.json | 570 +++++++++++--- .../performance/performance_summary.csv | 23 +- validation/performance/wallclock_summary.csv | 7 + .../scripts/orcaflex_longduration_mooring.py | 7 +- validation/scripts/performance_models.py | 320 ++++++++ validation/scripts/performance_records.py | 723 ++++++++++++++++++ 13 files changed, 1804 insertions(+), 218 deletions(-) create mode 100644 validation/performance/wallclock_summary.csv create mode 100644 validation/scripts/performance_models.py create mode 100644 validation/scripts/performance_records.py diff --git a/CHANGELOG.md b/CHANGELOG.md index b6df6ab8..ddc01a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ All notable changes to CableDyn are recorded in this file. The format follows ## [Unreleased] +### Changed + +- The L5 wall-clock records (`validation/performance` and the L5 rows of `VALIDATION.md`) are + measured again on one host, with the v0.4.1 release driver and a GNU build. The new + `validation/scripts/performance_records.py` builds the lazy-wave span, one-hour mooring and + tension-only chain models for CableDyn, OrcaFlex, MoorDyn-F and MoorDyn-C, checks each against + its reference response, times them and writes the records. + ## [0.4.1] - 2026-11-08 ### Added diff --git a/VALIDATION.md b/VALIDATION.md index e556c0ac..7e1cd193 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -88,9 +88,9 @@ article's methods, are compared in | **L4-rot** | Coupled mooring rotational stiffness | held 1° pitch geometry | upwind −16.0 kN, downwind +7.8 kN each; first-order restoring moment | signs + first-order | Pass | | **L5-stab** | Snap-load Δt-stability | sub-CFL fine-dt (0.5 ms) self-ref | peak 1.5% at dt = 20 ms (explicit limit 3.2 ms) | — | Pass | | **L5-stab** | Snap-load Δt-stability, implicit and explicit steps | MoorDyn-C explicit step limit | 20 ms implicit; ~1 ms explicit | — | Pass | -| **L5-V** | VolturnUS-S 1-hr mooring wall-clock | measured, matched protocol | CableDyn 18.1–32 s across repeated runs (full Newton) vs OrcaFlex 14.5 s; heave-only config 10.3 s | — | Pass (response at L3-7) | -| **L5-wc** | Wall-clock vs explicit C solver | external-C RK2 (WD chain) | L2 0.967 s vs external-C 0.541 s; traces validated | matched comparison reported | Pass measured | -| **L5-DPC** | Pinned-TDP lazy-wave spans, 80/200/800 m | OrcaFlex / refined MoorDyn-F | CableDyn 1.55/4.64/7.37 s; OrcaFlex 2.29/4.56/23.17 s; MoorDyn-F 249/145/243 s | resolved meshes, same host, one thread | Pass measured | +| **L5-V** | VolturnUS-S 1-hr mooring wall-clock | OrcaFlex 11.6d, same drive and host | CableDyn 4.44 s (IFX release) / 6.18 s (GNU) vs OrcaFlex 19.72 s; the timed deck reproduces the L3-7 response | — | Pass measured | +| **L5-wc** | Wall-clock, tension-only chain | MoorDyn-C v2.7.2, explicit RK2 (WD0050 chain) | CableDyn 0.200 s (IFX) / 0.277 s (GNU) vs MoorDyn-C 0.482 s; tensions 1.35 / 1.71% (mean / max) | matched comparison reported | Pass measured | +| **L5-DPC** | Pinned-TDP lazy-wave spans, 80/200/800 m | OrcaFlex / refined MoorDyn-F | CableDyn 1.44/2.56/5.29 s (IFX release; GNU 2.06/3.40/7.59 s); OrcaFlex 2.69/5.31/27.81 s; MoorDyn-F 327/192/321 s | resolved meshes, same host, one thread | Pass measured | | **L5-pk** | Snap-load peak, 3-code | MoorDyn-C + OrcaFlex | 4.86 / 6.32 / 10.22 MN | — | Informative | | **T-1** | Torsion kernel: twist of the centreline, gradient, Hessian | automatic differentiation; finite differences | ≤3.8e-15; ≤5.3e-11 | <1e-10; <1e-6 | Pass | | **T-2** | Pure torsion (multi-section, end springs, five turns) | `Φ/C`; OrcaFlex 11.6d | round-off; ≤1.7e-8 | <1e-12; <1e-7 | Pass | @@ -505,49 +505,68 @@ scripts, results, and source provenance are in ### Wall-clock time -- **Tension-only chain (Pass measured)**: MoorDyn-C runs the 8 s snap in about - 0.03 s and CableDyn in about 0.26 s; cheap lumped-mass substeps make the explicit - model faster for this short axial-line problem. For the L2 WD0050/A1 80 s deck, - CableDyn takes **0.967 s** and the external-C RK2 calculation **0.541 s**; the - traces agree to 1.67 / 3.61% in mean / maximum fairlead tension. -- **VolturnUS-S one-hour mooring**: - -| Case | CableDyn | Reference | Note | -|------|----------|-----------|------| -| All-chain static IC | converged | OrcaFlex 2427 / MoorDyn 2439 kN | `FairTen` 2437 kN (0.42% / 0.08%); anchor 0.77% (L2) | -| 1-hour (3600 s) dynamic, heave-only config | **10.3 s** (dt=0.1 s, 36000 steps, 0 non-convergent, ~2 iterations/step) | — | throughput at production step | -| 1-hour dynamic, matched 2-component drive (L3-7) | **18.1–32 s** across repeated runs (full Newton) | OrcaFlex **14.5 s** | same drive and host | - -- **Finite-bending lazy-wave spans (L5-DPC)**: the 80, 200, and 800 m pinned-TDP - suspended spans are timed after spatial convergence, without grounded tail or - seabed contact. CableDyn uses 240, 480, and 960 Hermite elements at 0.05 s. - OrcaFlex uses independently checked segment lengths and the same step. MoorDyn-F - uses a fourfold-refined mesh and the largest step for which all reported - responses change by less than 0.01% on further halving. - -| Depth | CableDyn | OrcaFlex | Refined MoorDyn-F | -|------:|---------:|---------:|------------------:| -| 80 m | 1.55 s | 2.29 s | 249.07 s | -| 200 m | 4.64 s | 4.56 s | 144.61 s | -| 800 m | 7.37 s | 23.17 s | 243.08 s | - -Totals include initialisation and the same 60 s dynamic interval. The explicit MoorDyn-F -step is set by its stability limit on the fourfold-refined bending mesh, so these times reflect -the chosen resolution protocol rather than a general property of any code. Each value is the -median of three runs after one warm-up on one Intel Core i9-13900K thread. Model -sizes, timing ranges, memory, Newton work, and the OrcaFlex mesh sweep are in +The measurements below were made on 2026-11-08 on one host (AMD Ryzen Threadripper PRO 7965WX, +Windows 11 Pro) with one thread per code, as the median of three runs after one warm-up. They +come from [`validation/scripts/performance_records.py`](validation/scripts/performance_records.py), +which also checks each timed model against its reference response. CableDyn is timed with the +Windows release driver (IFX, the shipped binary) and with a GNU Release build of `dev`. Their +versions and hashes, the ranges and the timing definitions are in [`validation/performance`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/performance/README.md). - -- **Hermite solver timings** (development workstation; machine-specific, not - portable tests): the banded solves reproduce the dense reference to identical - digits and Newton counts, and the dynamic step performs no heap allocation. The - 960-element Humboldt static solve takes 40.3 s and the 480-element solve 17.3 s; - the 240-element pinned-span static solve takes 471 Newton iterations direct and - 477 with mesh sequencing; the installed-cable sequence takes 529 coarse and - 20/60/14 polishing iterations; the 240-element 200 m dynamic case runs at - 2.21 ms per step with 3.95 Newton iterations per step; and the 78-component - irregular-wave lazy-wave comparison (the article's sea) runs in 66.6 s. -- **Coupled throughput**: at `dtM = 0.025 s` the one-line, 50-element aggregate +The figures depend on each code's configuration and on this host; they are not rankings. + +- **Tension-only chain (L5-wc)**: the WD0050 grounded chain (`examples/wd0050_chain.dat`) + under the L2-2 A1 heave for 80 s. CableDyn at dt 0.05 s takes **0.200 s** (IFX) and + **0.277 s** (GNU); MoorDyn-C v2.7.2 through `moordyn_c_driver.cpp` (explicit RK2, dtM 1 ms) + takes **0.482 s**, of which 0.452 s is its stepping loop. Over the 20 s scored window the + fairlead tensions of the two codes differ by 1.35% in mean and 1.71% in maximum. The + original external solver of this row was MoorDyn-C v2.6.1 through the same driver, whose deck + settings were not recorded. +- **VolturnUS-S one-hour mooring (L5-V)**: the L3-7 drive (5 m / 90 s surge and 2 m / 12 s + heave of the fairlead) on one 850 m chain with 50 elements. + +| Case | CableDyn (IFX) | CableDyn (GNU) | OrcaFlex 11.6d | Note | +|------|---------------:|---------------:|---------------:|------| +| All-chain static IC, `FairTen` | 2437 kN | 2437 kN | 2427 kN | 0.42% from OrcaFlex, 0.08% from MoorDyn (2439 kN); anchor 0.77% (L2) | +| 1-hour dynamic, dt 0.1 s | **4.44 s** (4.44–4.45) | **6.18 s** (6.16–6.19) | **19.72 s** (19.33–19.74) | 36,000 steps, 2.03 Newton iterations per step; OrcaFlex adds a 200 s build-up | + + The timed CableDyn deck reproduces the L3-7 response: fairlead tension mean, standard + deviation, minimum and maximum within 0.27, 0.26, 0.50 and 0.43% of OrcaFlex. + +- **Finite-bending lazy-wave spans (L5-DPC)**: the 80, 200 and 800 m pinned-touchdown + suspended spans of the L3-6 protocol (3 m / 12 s hang-off heave, 60 s), without grounded tail + or seabed contact. CableDyn uses 240, 480 and 960 Hermite elements at 0.05 s; OrcaFlex uses + 0.75 m segments (179, 350 and 1227) at the same step; MoorDyn-F uses its native meshes refined + fourfold (208, 224 and 232 segments) at the largest explicit step for which halving the step + moves every scored response by less than 0.01% (0.125 ms at 80 and 200 m, 0.5 ms at 800 m, + re-checked in this run: halving moved them by at most 0.0005%). + +| Depth | CableDyn (IFX) | CableDyn (GNU) | OrcaFlex | Refined MoorDyn-F | +|------:|---------------:|---------------:|---------:|------------------:| +| 80 m | 1.44 s | 2.06 s | 2.69 s | 326.6 s | +| 200 m | 2.56 s | 3.40 s | 5.31 s | 191.9 s | +| 800 m | 5.29 s | 7.59 s | 27.81 s | 320.7 s | + +Totals include initialisation and the dynamic interval. The timed CableDyn and refined +MoorDyn-F models reproduce the OrcaFlex hang-off tension mean, minimum and maximum of the L3-6 +gate within 0.12% and 0.29%. The explicit MoorDyn-F step is set by its stability limit on the +fourfold-refined bending mesh, so these times reflect the chosen resolution protocol rather than +a general property of any code; the MoorDyn-F totals include its dynamic-relaxation +initialisation. CableDyn takes 2.7–3.3 linear solves per step, and no step needs recovery +subdivision. + +- **Cubic-Hermite solver work** (GNU Release build of `dev` on the same host; the iteration + counts are deterministic, the times are not): the 240-element pinned Humboldt span + (`hermite_sequenced`) takes 507 Newton iterations solved directly and 460 with mesh + sequencing (450 / 4 / 6 by level); the installed 800 m cable (`l3_lazywave_fullcable`) takes + 524 iterations on its 89-element mesh and 20 / 60 / 14 to polish at 178 / 356 / 712 + elements; the mesh-sequenced 480- and 960-element static solves of `l3_lazywave_refinement` + take 81 and 4 iterations and 0.1 s or less each; and the irregular-sea comparison in the + article's 78-component sea (`test_l3_lazywave_irregular OUT TABLE.dat`, the table written by + `orcaflex_lazywave_irregular_reference.py --orcaflex-jonswap`) runs in 10.9 s. The per-step + advance of the OpenFAST aggregate route, Hermite cables included, makes no heap allocation + (`step_allocations`). +- **Coupled throughput** (measured in September 2026 with the code of that date on an Intel Core + i9-13900K; not re-measured for the records above): at `dtM = 0.025 s` the one-line, 50-element aggregate advances at 0.540 ms per step and the three-line spread at 0.590 ms per step; these are mooring-module figures only. With `OpenFAST DT = CableDyn dtM = OpenFAST DT_Out = 0.025 s`, uninterrupted 4200 s @@ -556,7 +575,7 @@ sizes, timing ranges, memory, Newton work, and the OrcaFlex mesh sweep are in and **1399.44 s** with an added 55-element suspended finite-EI power cable (a variant of the mixed example without touchdown), using default full-Newton settings (no `dynamic_solver` override, no modified Newton, no adaptive - remeshing), on the development workstation. Each binary output has + remeshing). Each binary output has exactly 144,001 rows from 600 s to 4200 s with 47 channels. The OpenFAST runtime Jacobian is the fixed-state direct-feedthrough derivative; formal linearisation differentiates the line dynamics with the line states registered. diff --git a/release/check_release_metadata.py b/release/check_release_metadata.py index d5566795..8632cee9 100644 --- a/release/check_release_metadata.py +++ b/release/check_release_metadata.py @@ -41,6 +41,7 @@ def capture(relative_path: str, pattern: str, label: str) -> str: r"^(CHANGELOG\.md|validation/(RELEASE|PERFORMANCE)_\d+_\d+_\d+\.md" r"|validation/PAPER_REPRODUCTION\.md|validation/README\.md" r"|validation/experiments/[^/]+/provenance\.json|validation/bodies/references/.*" + r"|validation/performance/.*" r"|tests/test_documentation\.py)$" ) diff --git a/tests/test_validation_records.py b/tests/test_validation_records.py index b4085527..967c0cb5 100644 --- a/tests/test_validation_records.py +++ b/tests/test_validation_records.py @@ -177,24 +177,51 @@ def test_bergdahl_refinement_and_waveforms(self) -> None: def test_performance_summary_matches_machine_readable_record(self) -> None: directory = VALIDATION / "performance" rows = load_csv(directory / "performance_summary.csv") + others = load_csv(directory / "wallclock_summary.csv") record = load_json(directory / "performance_metrics.json") - self.assertEqual(len(rows), 9) - self.assertEqual(len(record["rows"]), 9) - lookup = {(row["site"], row["solver"]): row for row in rows} + # L5-DPC: three spans, CableDyn with the GNU development build and the IFX release driver, + # OrcaFlex and MoorDyn-F. + cabledyn_builds = {row["build"] for row in rows if row["solver"] == "CableDyn"} + self.assertEqual(len(cabledyn_builds), 2) + expected = {(site, "CableDyn", build) for site in ("80m", "200m", "800m") for build in cabledyn_builds} + expected |= {(site, solver, solver.lower()) for site in ("80m", "200m", "800m") + for solver in ("OrcaFlex", "MoorDyn-F")} + lookup = {(row["site"], row["solver"], row["build"]): row for row in rows} + self.assertEqual(len(lookup), len(rows)) + self.assertEqual(set(lookup), expected) + self.assertEqual({row["case"] for row in rows}, {"L5-DPC"}) + # L5-V (CableDyn builds and OrcaFlex) and L5-wc (CableDyn builds and MoorDyn-C). + other_lookup = {(row["case"], row["solver"], row["build"]): row for row in others} + self.assertEqual(len(other_lookup), len(others)) self.assertEqual( - set(lookup), - {(site, solver) for site in ("80m", "200m", "800m") for solver in ("CableDyn", "OrcaFlex", "MoorDyn-F")}, + set(other_lookup), + {(case, "CableDyn", build) for case in ("L5-V", "L5-wc") for build in cabledyn_builds} + | {("L5-V", "OrcaFlex", "orcaflex"), ("L5-wc", "MoorDyn-C", "moordyn-c")}, ) - records = {(row["site"], row["solver"]): row for row in record["rows"]} - self.assertEqual(set(records), set(lookup)) - for key, row in lookup.items(): - median = float(row["total_wall_median_s"]) - self.assertLessEqual(float(row["total_wall_min_s"]), median) - self.assertGreaterEqual(float(row["total_wall_max_s"]), median) - assert_close(self, median, records[key]["total_wall_median_s"]) + for table, key_fields, json_rows in ( + (lookup, ("site", "solver", "build"), record["rows"]), + (other_lookup, ("case", "solver", "build"), record["wallclock_rows"]), + ): + records = {tuple(row[field] for field in key_fields): row for row in json_rows} + self.assertEqual(set(records), set(table)) + for key, row in table.items(): + median = float(row["total_wall_median_s"]) + self.assertLessEqual(float(row["total_wall_min_s"]), median) + self.assertGreaterEqual(float(row["total_wall_max_s"]), median) + assert_close(self, median, records[key]["total_wall_median_s"]) + self.assertIn(row["build"], record["codes"]) + for key, row in list(lookup.items()) + list(other_lookup.items()): + if row["solver"] == "CableDyn" and row["subdivided_intervals"]: + self.assertEqual(int(row["subdivided_intervals"]), 0, key) for site in ("80m", "200m", "800m"): - self.assertEqual(int(lookup[(site, "CableDyn")]["subdivided_intervals"]), 0) + for build in cabledyn_builds: + self.assertEqual(int(lookup[(site, "CableDyn", build)]["subdivided_intervals"]), 0) + # The refined MoorDyn-F step is the largest whose halving moves the scored responses < 0.01 %. + checks = record["moordyn_f_step_checks"] + self.assertEqual(len(checks), 3) + for check in checks.values(): + self.assertLess(check["largest_relative_move"], 1.0e-4) if __name__ == "__main__": diff --git a/validation/README.md b/validation/README.md index ff577aba..95d2c185 100644 --- a/validation/README.md +++ b/validation/README.md @@ -18,7 +18,7 @@ redistributed. | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | | [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave and Bergdahl et al. (2016) dynamic-chain comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | -| [`performance/`](performance/README.md) | Same-host timing of the three spatially resolved lazy-wave cables | +| [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | | [`OPENFAST_DLC_VERIFICATION.md`](OPENFAST_DLC_VERIFICATION.md) | Design-load-case comparison against stock MoorDyn-F in OpenFAST, maintained by NLR (National Laboratory of the Rockies, formerly NREL) | | `scripts/` | Cross-code comparison and reference-generation scripts cited in `VALIDATION.md` | diff --git a/validation/performance/PERFORMANCE_AUDIT.md b/validation/performance/PERFORMANCE_AUDIT.md index 4c83b1f5..aa1bff0a 100644 --- a/validation/performance/PERFORMANCE_AUDIT.md +++ b/validation/performance/PERFORMANCE_AUDIT.md @@ -1,31 +1,59 @@ -# Same-host computational performance +# Same-host wall times -This page lists the wall times and timing definitions behind the lazy-wave performance -comparison. The protocol is in [README.md](README.md). +This page lists the wall times behind the L5 rows of [`VALIDATION.md`](../../VALIDATION.md) with +their ranges and the timing definitions. The cases, protocol and builds are in +[README.md](README.md); the values come from `performance_summary.csv` and +`wallclock_summary.csv`. -All runs used one thread of an Intel Core i9-13900K. Each value is the median of three measured -runs after one warm-up; the range of the three runs is in brackets. The values come from -`performance_summary.csv`. +All runs used one thread on an AMD Ryzen Threadripper PRO 7965WX under Windows 11 Pro on +2026-11-08. Each value is the median of three timed runs after one warm-up; the range of the +three runs is in brackets. `IFX` is the v0.4.1 release driver, `GNU` a GNU Release build of `dev`. -| Water depth | CableDyn | OrcaFlex | Refined MoorDyn-F | -| ---: | ---: | ---: | ---: | -| 80 m | 1.55 s (1.55–1.84), 240 elements, 0.05 s | 2.29 s (2.26–2.31), 179 segments, 0.05 s | 249.07 s (249.04–363.90), 208 segments, 0.125 ms | -| 200 m | 4.64 s (4.62–4.69), 480 elements, 0.05 s | 4.56 s (4.51–4.74), 350 segments, 0.05 s | 144.61 s (142.70–214.11), 224 segments, 0.125 ms | -| 800 m | 7.37 s (7.37–7.54), 960 elements, 0.05 s | 23.17 s (23.00–23.42), 1227 segments, 0.05 s | 243.08 s (240.15–249.30), 232 segments, 0.5 ms | +## L5-DPC: pinned-touchdown lazy-wave spans, 60 s -The MoorDyn-F models are refined fourfold, and their time step is the largest at which every -reported response changes by less than 0.01 % when the step is halved. That accuracy -requirement is much stricter than the one normally used in design work, and it sets the -explicit time step. The figures are specific to this host, these models and these settings. +| Water depth | CableDyn (IFX) | CableDyn (GNU) | OrcaFlex 11.6d | Refined MoorDyn-F | +| ---: | ---: | ---: | ---: | ---: | +| 80 m | 1.44 s (1.43–1.45) | 2.06 s (2.04–2.06) | 2.69 s (2.68–2.71) | 326.6 s (323.8–343.3) | +| 200 m | 2.56 s (2.54–2.56) | 3.40 s (3.38–3.43) | 5.31 s (5.18–5.64) | 191.9 s (191.7–193.5) | +| 800 m | 5.29 s (5.28–5.48) | 7.59 s (7.47–7.59) | 27.81 s (27.44–28.15) | 320.7 s (319.3–326.9) | +| Mesh, step | 240 / 480 / 960 elements, 0.05 s | as IFX | 179 / 350 / 1227 segments, 0.05 s | 208 / 224 / 232 segments; 0.125 / 0.125 / 0.5 ms | + +CableDyn's static initialisation takes 0.11 / 0.20 / 0.34 s (IFX) of these totals; it takes +3.04 / 2.75 / 3.27 linear solves per step, and no interval needs recovery subdivision. OrcaFlex's +statics take 0.32 / 0.30 / 2.65 s. The MoorDyn-F total includes its dynamic relaxation to +`threshIC` 1e-5. Halving the MoorDyn-F step moves the scored curvature and tension by at most +0.0005 %, inside the 0.01 % that selects the step; that accuracy requirement is much stricter +than the one normally used in design work, and it sets the explicit step. + +## L5-V: VolturnUS-S chain, one hour + +| | CableDyn (IFX) | CableDyn (GNU) | OrcaFlex 11.6d | +| --- | ---: | ---: | ---: | +| Wall time | 4.44 s (4.44–4.45) | 6.18 s (6.16–6.19) | 19.72 s (19.33–19.74) | +| Model | 50 elements, dt 0.1 s, 3600 s | as IFX | 50 segments, dt 0.1 s, 200 s build-up and 3600 s | + +CableDyn takes 2.03 Newton iterations per step over the 36,000 steps. + +## L5-wc: WD0050 chain, 80 s + +| | CableDyn (IFX) | CableDyn (GNU) | MoorDyn-C v2.7.2 | +| --- | ---: | ---: | ---: | +| Wall time | 0.200 s (0.198–0.204) | 0.277 s (0.275–0.406) | 0.482 s (0.476–0.483) | +| Model | 41 elements, dt 0.05 s | as IFX | 41 segments, RK2, dtM 1 ms, coupling step 0.1 s | + +MoorDyn-C's stepping loop takes 0.452 s of its total. Over the scored 20 s the fairlead tensions +of the two codes differ by 1.35 % in mean and 1.71 % in maximum. ## Timing definitions -- CableDyn and OrcaFlex totals comprise static initialisation and the 60 s dynamic march. -- The MoorDyn-F total is the complete dynamic-driver call, including its dynamic-relaxation - initialisation. The separately timed MoorDyn-F static-only call is a diagnostic and is not - added a second time. +- CableDyn, MoorDyn-F and MoorDyn-C: the wall time of the whole process, from start to exit, + including input, initial condition, dynamics and output. +- OrcaFlex: `CalculateStatics` plus `RunSimulation`, timed inside a fresh Python process; model + building, licence checkout and result extraction are outside the timed interval. +- The static and dynamic split of CableDyn comes from a separate run with `CABLEDYN_PROFILE`. +- Peak working set is that of the whole process; for OrcaFlex it includes the Python + interpreter. -CableDyn used 34, 16 and 8 line-search backtracking trials over the 1,200 timed intervals at -80, 200 and 800 m, respectively. No timed interval required recovery subdivision. +The figures are specific to this host, these models and these settings. diff --git a/validation/performance/README.md b/validation/performance/README.md index f4c78c14..c08ce998 100644 --- a/validation/performance/README.md +++ b/validation/performance/README.md @@ -1,48 +1,105 @@ -# Lazy-wave cable performance comparison +# Same-host wall-clock records (L5) -This directory records the same-host wall-time comparison of CableDyn, OrcaFlex and MoorDyn-F -on the three spatially resolved Lozon lazy-wave cables. Use it to check the timing figures in -[`VALIDATION.md`](../../VALIDATION.md). +This directory records the same-host wall-clock measurements behind the L5 rows of +[`VALIDATION.md`](../../VALIDATION.md): the matched lazy-wave spans (L5-DPC), the one-hour +VolturnUS-S mooring (L5-V) and the tension-only chain (L5-wc). Every figure comes from +[`validation/scripts/performance_records.py`](../scripts/performance_records.py), which builds the +models, runs and times each code and writes the files below. | File | Contents | | --- | --- | -| `performance_summary.csv` | Per-site, per-solver mesh size, time step, wall and CPU times, memory and Newton statistics | -| `performance_metrics.json` | The same rows in JSON | -| [`PERFORMANCE_AUDIT.md`](PERFORMANCE_AUDIT.md) | Wall times with their ranges, and timing definitions | +| `performance_summary.csv` | L5-DPC: per span, code and build, the mesh, time step, wall and CPU times, memory and solver counts | +| `wallclock_summary.csv` | L5-V and L5-wc in the same columns | +| `performance_metrics.json` | The same rows, the code versions and builds, the host, the date, the responses each timed model reproduced, the MoorDyn-F step checks and the CableDyn driver notes | +| [`PERFORMANCE_AUDIT.md`](PERFORMANCE_AUDIT.md) | Wall times with their ranges, and the timing definitions | | [`ORCAFLEX_MESH_CONVERGENCE.md`](ORCAFLEX_MESH_CONVERGENCE.md) | 800 m OrcaFlex segment-length study; data in `orcaflex_mesh_convergence.csv` | +## Cases + +- **L5-DPC.** The matched 80, 200 and 800 m suspended spans of the L3-6 protocol: hang-off at + (0, 0, −14) m heaved 3 sin(2πt/12) m, touchdown pinned at the static touchdown point, no + seabed in reach, still water, Cdn 1.2, Cdt 0.1, Can 1.0, Cat 0; static initialisation and + 60 s of dynamics. + - CableDyn: driver decks with 240, 480 and 960 cubic-Hermite elements, aligned with the + sections, dt 0.05 s, the default solver settings with the Newton tolerance `1e-4` of the + shipped Lozon decks. The hang-off motion starts at full velocity, as in the L3-6 gate. + - OrcaFlex: the models of `orcaflex_lazywave_dynamic_reference.py`, 0.75 m segments (179, 350 + and 1227 segments; [`ORCAFLEX_MESH_CONVERGENCE.md`](ORCAFLEX_MESH_CONVERGENCE.md)), implicit + dt 0.05 s, a 12 s build-up and 48 s. + - MoorDyn-F: the decks of `moordyn_lazywave_dynamic_reference.py` with the native meshes + refined fourfold (208, 224 and 232 segments), RK4, dtM 0.125 ms at 80 and 200 m and 0.5 ms + at 800 m, its dynamic-relaxation initialisation (`threshIC` 1e-5, `TmaxIC` 900 s) and + 61.5 s of dynamics. These steps are the largest at which halving the step moves every + scored response by less than 0.01 %; the tool re-checks this with `--step-check` + (`moordyn_f_step_checks` in the JSON). The resolved bending modes of the contact-free + cable, not seabed stiffness, set this explicit step. +- **L5-V.** One IEA-15MW VolturnUS-S chain (850 m, 50 elements or segments, 200 m water) with + the fairlead driven for one hour by 5 sin(2πt/90) m of surge and 2 sin(2πt/12) m of heave. + CableDyn runs `examples/iea15mw_volturnus_mooring.dat` with the drive of the + `l3_longduration_mooring` gate (a 100 s half-cosine ramp, dt 0.1 s, 3600 s, no seabed + damping) as a motion file; OrcaFlex runs the model of `orcaflex_longduration_mooring.py` + (implicit dt 0.1 s, 200 s build-up and 3600 s). +- **L5-wc.** The WD0050 grounded chain of `examples/wd0050_chain.dat` (410 m, 41 elements or + segments, 50 m water) under the L2-2 A1 fairlead heave 2 sin(2πt/10) m for 80 s: the 60 s + warm-up and the 20 s scored window of `l2_2_dynamic_parity`. CableDyn runs the deck at + dt 0.05 s. MoorDyn-C runs the same chain through `moordyn_c_driver.cpp` (explicit RK2, + dtM 1 ms, coupling step 0.1 s, its dynamic-relaxation initialisation). + +Before a model is recorded, the tool checks its response against the reference: on L5-DPC the +hang-off tension mean, minimum and maximum over 24–60 s against the OrcaFlex values of the +L3-6 gate (within 2 %), and on L5-V the fairlead tension statistics over 200–3600 s against the +OrcaFlex values of the L3-7 gate (within that gate's bands). The responses are in +`performance_metrics.json`. + ## Protocol -- Models: matched 80, 200 and 800 m suspended spans with a pinned touchdown point, no grounded - tail and no seabed contact. -- Timed work: static initialisation and a 60 s dynamic march. -- Host: one Intel Core i9-13900K processor thread; median of three runs after one warm-up, with - the range retained. -- CableDyn and OrcaFlex use implicit 0.05 s steps. -- MoorDyn-F finite-bending models are refined fourfold and their explicit step is halved until - every reported response changes by less than 0.01%. The retained steps are 0.125 ms at 80 and - 200 m and 0.5 ms at 800 m. These are below the shortest-segment axial transit time because - the resolved bending modes of the contact-free cable, not seabed penalty stiffness, set the - explicit stability limit. -- The 800 m OrcaFlex segment length, 0.75 m, is the converged value from - [`ORCAFLEX_MESH_CONVERGENCE.md`](ORCAFLEX_MESH_CONVERGENCE.md). +- One thread: `OMP_NUM_THREADS = OPENBLAS_NUM_THREADS = 1`, and OrcaFlex `threadCount = 1`. +- Each process at high priority; one warm-up run, then three timed runs. The median and the + range are recorded. +- CableDyn, MoorDyn-F and MoorDyn-C: the wall time of the whole process (input, initial + condition, dynamics and output). OrcaFlex: `CalculateStatics` plus `RunSimulation`, in a + fresh Python process for each run. +- CableDyn's static and dynamic split and its solver counts come from one further run with + `CABLEDYN_PROFILE`. `newton_per_step` is the linear solves per step for the finite-EI spans + and the Newton iterations per line step for the chains. MoorDyn-C's dynamic time is the + stepping loop timed by its driver. +- `host_busy_median` is the busy fraction of all host processors during the timed runs. Other + work was running on the host; the ranges show its effect. ## Provenance -The rows record the host (one thread of an Intel Core i9-13900K), the mesh, the time step and the -timing statistics of each run. The OrcaFlex segment-length study used OrcaFlex 11.6d -([`ORCAFLEX_MESH_CONVERGENCE.md`](ORCAFLEX_MESH_CONVERGENCE.md)). The executables of the three -codes, their build identifiers and the measurement dates were not recorded with the rows, and -the timing models and driver scripts are not included in the repository. Treat the figures as -indicative of this host and these settings; the release timings, with the code versions and -builds used, are in [`PERFORMANCE_0_1_0.md`](../PERFORMANCE_0_1_0.md). - -## Result - -Total times at 80, 200 and 800 m are 1.55, 4.64 and 7.37 s for CableDyn, 2.29, 4.56 and -23.17 s for OrcaFlex, and 249.07, 144.61 and 243.08 s for the refined MoorDyn-F models. The -MoorDyn-F times reflect the explicit step that the fourfold-refined bending mesh requires under -this protocol. The figures are specific to this host, these models and these settings, and do -not apply to the separate tension-only chain benchmark in `VALIDATION.md`. +Measured on 2026-11-08 on an AMD Ryzen Threadripper PRO 7965WX (24 cores), Windows 11 Pro. + +| Code | Build | +| --- | --- | +| CableDyn `ifx-release-0.4.1` | the v0.4.1 release `CableDyn_driver.exe` (IFX 2025.3.2, static, `/fp:precise /arch:CORE-AVX2 /Qfma-`, reference LAPACK 3.12.1) | +| CableDyn `gnu-release-dev` | `dev` at `b7c883b` (v0.4.1-2-gb7c883b): GNU Fortran 16.2.0 (conda-forge), CMake `Release` (`-O3`), baseline x86-64, OpenBLAS 0.3.33 | +| OrcaFlex | OrcaFlex 11.6d (OrcFxAPI DLL 11.6d) from Python, `threadCount = 1` | +| MoorDyn-F | MoorDyn v2.3.8 in the OpenFAST v5.0.0 MoorDyn driver: GNU Fortran 16.2.0, CMake `Release` (`-O3`), `DOUBLE_PRECISION=OFF` | +| MoorDyn-C | v2.7.2 release source: `libmoordyn` by GNU g++ 16.2.0, CMake `Release` (`-O3`); `moordyn_c_driver.cpp` by `g++ -O2` | + +The JSON records the driver hashes. The earlier L5-wc figure used MoorDyn-C v2.6.1 through the +same driver (the trace committed in `tests/data/l2_2_external_refs`). Its deck settings were not +recorded, so v2.7.2 runs the deck written by `performance_models.py`; over the scored window it +differs from the committed v2.6.1 trace by 0.37 % in mean and 1.19 % in maximum tension. + +## Reproduce + +From the repository root, with numpy, the OrcFxAPI Python interface on `PYTHONPATH`, the +OpenFAST MoorDyn driver and a MoorDyn-C build: + +```text +python validation/scripts/performance_records.py run --codes cabledyn \ + --cabledyn-driver --cabledyn-label