Skip to content

fix: whole diagnostic messages; name causes and workarounds - #27

Merged
SMI-Lab-Inha merged 11 commits into
devfrom
fix/diagnostic-messages
Oct 20, 2026
Merged

SMI-Lab-Inha merged 11 commits into
devfrom
fix/diagnostic-messages

Conversation

@SMI-Lab-Inha

@SMI-Lab-Inha SMI-Lab-Inha commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Failure and rejection messages are whole, name the actual cause, and give the workaround. No acceptance rule or result changes.

  • Whole messages. The tensile qualification failure of a dynamic step ended mid-advice (... at element 64, xi= 0.5000; increase). Buffers of 200, 300 and 256 characters in the Hermite cable, the OpenFAST module and the deck driver cut it off.
    • Every buffer on the solver chain, the standalone driver and the OpenFAST glue now holds the longest diagnostic it can receive.
    • The C API handle holds 4096 characters; CableDyn_GetLastError still truncates to the caller's buffer, and the Python binding reads 4097 bytes.
    • A list that can outgrow its buffer (seed notes of a failed EI = 0 static solve, a line's initialisation notes) ends with "further ... notes omitted" instead of stopping mid-note.
    • Hot-path kernel buffers keep their short lengths, bounded by what can reach them. Widening them all slowed the dynamic step by up to 5 %. Timing now matches dev.
  • Named causes.
    • A neutrally buoyant finite-EI line longer than its span is named weightless, not "too long to hang as a catenary".
    • An EI = 0 line type rejected as net-buoyant whose mass lies within 1e-6 below the displaced mass is named neutrally buoyant, and the Python reader words it the same way.
  • New notes and warnings (outputs unchanged).
    • The static fairlead strain of any line above maxStrain (or 10 % if unset) is noted. Before, a line 50 % shorter than its span converged at 100 % strain without a word.
    • A section whose segments are longer than 1/8 of the line gets a coarse-mesh warning. Before, a 100 m one-segment top section on a 520 m line passed silently.
  • Rejections with workarounds.
    • Lines between two Coupled points.
    • Finite-EI cables ending on Connect/Free/Coupled points.
    • The still-water rejection of deck waves or current now names the route that rejects it and that route's remedy.
    • An anchor below the seabed gives the depth, the tolerance rule and the Z to use.

Tests

  • Driver and deck tests check each new message whole: weightless EI = 0 and finite-EI decks, the strain note, the coarse-section warning, Coupled-to-Coupled and finite-EI end rejections, the still-water route rejection, and the anchor depth.
  • Full suite (Windows, gfortran, Release, slow tier included): 281/281. Python: 2036 passed. pre-commit run --all-files and the Sphinx build with -W pass.
  • OpenFAST builds; the smoke deck and a bad-anchor deck print the whole message.
  • Step timing equals dev (0.77 s CPU on the timing deck).
  • Test fix carried here (unrelated to messages): the controlled-cable snapshot test marched a restored model against a copy taken before the snapshot. Restore clears the carried Newton factor and the cached committed force, which the copy still held, so the two took different paths and matched bit for bit only by chance; the check failed on the Linux Debug runner (on dev after feat(control): active tension of finite-EI cables; committed lengths under the force blend #26 and here). Both models now march with tangent reuse off from an uncached committed force, and the test prints the largest difference.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes
  • python -m pytest tests python/tests passes (if Python or validation records changed)
  • VALIDATION.md updated if a validation result changed (none changed)
  • CHANGELOG.md updated under [Unreleased] (heading added if missing) for user-visible changes
  • Documentation in doc/ updated for changed inputs, options, or outputs
  • Conventional Commit title (feat:, fix:, docs:, ...)
  • Commits are signed off (git commit -s) under the
    Developer Certificate of Origin

- Failure messages were cut off on their way to the user (a
  tensile_safety failure ended mid-advice): message buffers below 1024
  characters are widened along every path, the C API keeps up to 4096
  characters per handle (CableDyn_GetLastError still truncates to the
  caller's buffer), the driver's ErrMsg holds 4096 and the OpenFAST
  module uses ErrMsgLen.
- A weightless line gets an accurate diagnosis: a finite-EI line longer
  than its span is reported as weightless, with no catenary and able to
  bow only in compression, instead of "net-heavy ... too long"; an
  EI = 0 line within a 1e-6 relative band of neutral buoyancy is rejected
  at its line type as weightless and slack (also in the Python reader),
  instead of failing later with a generic solver message.
- A note when a static state stretches a line beyond maxStrain (10 %
  when unset); a note per section of at most four segments each longer
  than a tenth of the line.
- The rejections of a shared line between two Coupled points, a finite-EI
  cable ending on a Connect/Free/Coupled point, a Coupled End A with
  Connect points, and deck waves/current on a mixed deck now name the
  unsupported capability and a workaround; an anchor below the seabed
  names the tolerance rule and the depth to use.

Results are unchanged: every example and test deck writes byte-identical
outputs, except a neutral EI = 0 deck now rejected at its line type.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Widen the message buffers that still cut solver messages: the mixed
standalone runner and its initialisation report (4096), the as-laid
friction, seabed and kernel buffers of the static solvers, the
OpenFAST mesh and Hermite module buffers, and the per-line messages
of the mooring system and the aggregate (1024). The seed notes of a
failed EI=0 static solve and the initialisation notes of a line end
with an omission marker instead of stopping mid-note; a line summary
holds a whole cable note and the strain note.

Keep the net-buoyant rule unchanged (dry mass not above the displaced
mass). Only an EI=0 type within a relative 1e-6 below the displaced
mass is named neutrally buoyant; the Python deck reader mirrors it.

The shared-line rejection offers the Connect-point split only for an
EI=0 line and says what applies to a finite-EI one. The Coupled End A
rejection says the end would need motionFile coupling and qualifies
the coupled mixed deck advice. The coarse-section warning compares
each segment with 1/8 of the whole line, so it no longer depends on
how a line is split into sections; no example deck triggers it. The
static strain note uses 10 % when maxStrain is absent or 0, and
prints a small maxStrain with its digits.

In the Hermite dynamic assembly the element kernels write into small
message buffers, the tangent worker sets its message only on failure,
and the Cosserat assembly no longer blank-fills its per-element
messages. Results are byte-identical.

New driver tests cover the band edge, a finite-EI shared line, and the
coarse-section warning and strain note on the standalone mixed route.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Widening every message buffer to 1024 characters slowed the dynamic
step by up to 5 %, because element, node and Gauss-point kernels reset
their whole message buffer on every call. A hot-path buffer now only
holds the longest text that can actually reach it, and long messages
are still assembled in full on the cold failure paths.

Back to their previous lengths, each bounded by the kernels it calls:
the Hermite element, drag and wave-load locals and the per-element
message array (200), the Hermite element and sampling locals, the
torsion element and line, the EI=0 element assembly, the Cosserat
assembly and energy, and the per-node seabed, kinematics, range and
static-friction buffers.

The EI=0 load and added-mass assemblies, the assembly input checks
and the rod seabed queries pass their kernels a 200- or 120-character
share of the caller's message, so a kernel no longer resets a
1024-character buffer. The per-node seabed
query of the Hermite static Newton step and the per-node kinematics
of the deck fluid update use their own short buffers. Every message
still fits whole, the blank-on-success contract of public kernels is
unchanged, and results are byte-identical.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The rejection of deck waves or current on the still-water routes listed
the C API and single-turbine OpenFAST, which never reach it, and told a
FAST.Farm user to let the host supply the fluid. It now names the route
that rejects the deck: a standalone mixed EI=0/finite-EI deck is told
to remove the OPTION, use a single-family deck, or couple the deck to
OpenFAST with SeaState; a FAST.Farm deck is told the farm runs in still
water and to remove the OPTION. The troubleshooting rows, the
changelog and the driver test follow.

The friction-anchor mapping, run twice per step, now gives its per-node
seabed query only a short share of the caller's message buffer, as the
load assembly does.

A cable whose notes ended with the omission marker in its 1024-character
buffer lost the static strain note when the notes were copied into the
2048-character line summary. A note that fits now goes before the
marker, which stays last.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Message buffers added since the branch point that can receive a longer
message than they hold now hold it whole:

- the node-value and segment-tension recovery of a finite-EI cable
  (node channels and .t.out rows), whose element failure carries the
  recovery prefix and a 200-character element message, and the node
  recovery of a range-graph sample, which gets its own buffer while
  the per-element curvature samples keep their short one;
- the anchor force of an EI=0 line (anchor uplift channels), which
  carries the end-force recovery's load-assembly message;
- the host wrench of a pinned rod, which carries the mooring system's
  coupled-motion and acceleration-derivative messages;
- the exact-curvature query of the OpenFAST Hermite module and the
  step audit of an EI=0 line (1024, as their neighbours).

The per-element law tensions of the step audit hold the kernels'
bound (KERNEL_MSG_LEN). Buffers on per-station or per-node paths that
already hold every message they receive (rod contact reach and
waterplane estimate, Hermite node recovery kernels) are unchanged.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The rotation- and snap-resolved sub-stepping merged from dev kept a
plain sub-step's message in 300 characters, the law tensions of
sub_tensions in 160, and the viscoelastic coefficients of
segment_wave_stiffness in 200. A plain step's message (the tensile
qualification failure) runs to several hundred characters and a law
tension message with its prefix to about 250, so they now take 1024
characters, as the recovery rungs do; the per-element coefficient
message takes KERNEL_MSG_LEN, the kernels' bound. The messages are
discarded on these paths, so no output changes.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The active tension of finite-EI cables merged from dev added message
buffers that could cut a message short: the committed force and
acceleration of a cable received a length-rebuild message of up to
about 234 characters in 200, the step-start load and committed-length
messages of an EI = 0 line went into 160, and the control take-back,
the finite-section mesh of a CONTROL row and the segment-length update
of the Hermite OpenFAST module held 512 and 300. These cold-path
buffers now take 1024 characters; the buffers that receive a kernel
message directly (distributed-load assembly and seabed stiffness at the
committed or sub-step lengths) take KERNEL_MSG_LEN, the kernels' bound.
No output changes.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T03:44:13.097857Z 415f173 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

read-the-docs-community Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35259595 | 📁 Comparing 415f173 against latest (f27c5e3)

  🔍 Preview build  

29 files changed · ± 29 modified

± Modified

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3526199d1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/CableDyn_HermiteCableDynamic.f90 Resolved
The axial damping of a finite-EI cable under active length control
wrote its kernel message into em2 while the failure handler reports
em_e, the per-element kernel buffer, so a non-finite damping force or
Jacobian on a controlled line returned a blank or stale message. Both
controlled branches now write em_e, as the uncontrolled ones do. A
scan of every source file for an error report that names a different
message variable than the calls before it finds no other case.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 99fc28361b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The snapshot test of a controlled cable marched the restored model
against a copy taken before the snapshot. Restore clears the carried
Newton factor, which the copy still holds, and the iterate a step stops
at depends on the factor's age, so the two matched bit for bit only by
chance: the merged dev failed the check on the Linux Debug runner while
the same tree passed on the pull request. Both models now march with
tangent reuse off, the documented condition for an exact restart, as
the torsion restart test already does. The coupled cables of the
OpenFAST module run with reuse off, so their restart tests are not
affected.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 3ee60f3455

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

With tangent reuse off the snapshot test still failed on the Linux
Debug runner. Restore also clears the cached committed force, so the
restored model evaluates F_n afresh on its next step while the copy
taken before the snapshot takes it from the cache of its previous
step's last iteration. The copy's cache is now cleared as well, so
both models take the same path, and the test prints the largest
position and velocity difference after the three steps.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 415f173e91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 256157f into dev Oct 20, 2026
15 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/diagnostic-messages branch October 20, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant