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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ All notable changes to CableDyn are recorded in this file. The format follows
factorisations and back-substitutions, with their counts and times, and separates the
factorisations of finite-EI cables from their back-substitutions (which now include the
force-blend correction that ends each step). Results do not change.
- The run-time profile also splits the residual and tangent assemblies of finite-EI cables into
their sections and, in OpenFAST, `CalcOutput` into the kinematics overlay, the output channels
and the restore, and the SeaState sampling into the node queries, the grid checks and the
hand-over of the fields. Results do not change.

## [0.2.0] - 2026-10-20

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ add_test(
-DDRIVER=$<TARGET_FILE:cabledyn>
-DDECK=${CMAKE_CURRENT_SOURCE_DIR}/tests/data/held_start_gomex80_power_cable.dat
-DOUTPUT_ROOT=${CMAKE_CURRENT_BINARY_DIR}/driver_profile_finite_ei
"-DEXPECT=\n Finite-EI cable steps: [1-9][0-9]*, residual evaluations: [1-9][0-9]*, tangent assemblies: [1-9][0-9]*, factorisations: [1-9][0-9]*, linear solves: [1-9][0-9]*, force-blend corrections: [0-9]+[^\n]*\n Finite-EI cable step time \\(s\\): residual [0-9.]+, tangent [0-9.]+, effective matrix [0-9.]+, factorisation [0-9.]+, back-substitution [0-9.]+, added mass [0-9.]+, other [0-9.]+\\."
"-DEXPECT=\n Finite-EI cable steps: [1-9][0-9]*, residual evaluations: [1-9][0-9]*, tangent assemblies: [1-9][0-9]*, factorisations: [1-9][0-9]*, linear solves: [1-9][0-9]*, force-blend corrections: [0-9]+[^\n]*\n Finite-EI cable step time \\(s\\): residual [0-9.]+, tangent [0-9.]+, effective matrix [0-9.]+, factorisation [0-9.]+, back-substitution [0-9.]+, added mass [0-9.]+, other [0-9.]+\\.\n Finite-EI cable assembly time \\(s\\): band zeroing [0-9.]+, tangent element kernels [0-9.]+, tangent scatter [0-9.]+, structural residual [0-9.]+, weight [0-9.]+, attachments [0-9.]+, dry buoyancy [0-9.]+, seabed contact [0-9.]+, axial damping [0-9.]+, drag [0-9.]+, end connections [0-9.]+, wave Froude-Krylov [0-9.]+, held Froude-Krylov [0-9.]+, torsion [0-9.]+\\."
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/check_driver_profile.cmake)
add_test(
NAME driver_profile_failure
Expand Down
13 changes: 11 additions & 2 deletions app/cabledyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ PROGRAM cabledyn
CD_Profile_Kernels, CD_PROF_K_RESIDUAL, CD_PROF_K_TANGENT, CD_PROF_K_FACTOR, &
CD_PROF_K_SOLVE, CD_PROF_NKERNEL
USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Dyn_Reset_Profile, CD_HermiteCable_Dyn_Get_Profile, &
CD_HermiteCable_Dyn_Recovery_Reset, CD_HermiteCable_Dyn_Recovery_Count
CD_HermiteCable_Dyn_Recovery_Reset, CD_HermiteCable_Dyn_Recovery_Count, &
CD_HermiteCable_Dyn_Get_Assembly_Profile, HC_ASM_NSEC, HC_ASM_NAMES
USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: error_unit, output_unit, int64
IMPLICIT NONE
TYPE :: StandaloneProgress
Expand Down Expand Up @@ -860,7 +861,8 @@ SUBROUTINE print_profile()
!! the finite-EI cable steps. Printed once, on stdout, at the end of the run.
LOGICAL, SAVE :: printed = .FALSE.
REAL(wp) :: seconds(CD_PROF_NPHASE), total, march, t_step, t_resid, t_eff, t_solve, t_am, t_tan, t_factor
REAL(wp) :: kernel_seconds(CD_PROF_NKERNEL)
REAL(wp) :: kernel_seconds(CD_PROF_NKERNEL), asm_seconds(HC_ASM_NSEC)
CHARACTER(:), ALLOCATABLE :: asm_line
INTEGER(int64) :: march_steps, line_steps, line_iterations, kernel_calls(CD_PROF_NKERNEL)
INTEGER :: line_max_iterations, n_step, n_resid, n_solve, n_am, n_alloc, n_tan, n_factor, n_correct, k
IF (printed .OR. .NOT. CD_Profile_Armed()) RETURN
Expand Down Expand Up @@ -908,6 +910,13 @@ SUBROUTINE print_profile()
', tangent ', fixed(t_tan, 3), ', effective matrix ', fixed(t_eff, 3), ', factorisation ', &
fixed(t_factor, 3), ', back-substitution ', fixed(t_solve, 3), ', added mass ', fixed(t_am, 3), ', other ', &
fixed(MAX(0.0_wp, t_step - (t_resid + t_tan + t_eff + t_factor + t_solve + t_am)), 3), '.'
CALL CD_HermiteCable_Dyn_Get_Assembly_Profile(asm_seconds)
asm_line = ' Finite-EI cable assembly time (s):'
DO k = 1, HC_ASM_NSEC
asm_line = asm_line//' '//TRIM(HC_ASM_NAMES(k))//' '//fixed(asm_seconds(k), 3)
IF (k < HC_ASM_NSEC) asm_line = asm_line//','
END DO
WRITE (output_unit, '(A)') asm_line//'.'
ELSE IF (.NOT. profile_cable_detail .AND. n_finite_ei > 0) THEN
WRITE (output_unit, '(A)') ' Finite-EI cable steps: not counted on the mixed EI = 0 + finite-EI route, '// &
'whose cables step concurrently.'
Expand Down
26 changes: 17 additions & 9 deletions doc/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,21 @@ breakdown such as:

Run-time profile (CABLEDYN_PROFILE), wall-clock time:
input parsing 0.002 s 0.1 %
initialisation and statics 0.237 s 8.8 %
dynamic march 2.444 s 91.1 %
fluid sampled by the driver 0.050 s 1.9 %
line, cable and object steps 2.379 s 88.6 %
initialisation and statics 0.238 s 8.7 %
dynamic march 2.496 s 91.2 %
fluid sampled by the driver 0.051 s 1.9 %
line, cable and object steps 2.430 s 88.8 %
checks and line failures 0.002 s 0.1 %
outputs 0.012 s 0.5 %
outputs 0.013 s 0.5 %
progress and bookkeeping 0.000 s 0.0 %
finalisation 0.000 s 0.0 %
total 2.684 s 100.0 %
March: 600 committed step(s), 4.0735 ms per step.
total 2.736 s 100.0 %
March: 600 committed step(s), 4.1596 ms per step.
EI = 0 line steps: 3621 (substeps and retries included), Newton iterations: 4739 (1.309 per line step, at most 2).
EI = 0 line step kernels: residual 6947 (0.039 s), residual and tangent 3322 (0.064 s), factorisation 3322 (0.013 s), back-substitution 5126 (0.009 s).
EI = 0 line step kernels: residual 6947 (0.040 s), residual and tangent 3322 (0.064 s), factorisation 3322 (0.013 s), back-substitution 5126 (0.009 s).
Finite-EI cable steps: 1423, residual evaluations: 6140, tangent assemblies: 2914, factorisations: 2914, linear solves: 2914, force-blend corrections: 1423, intervals recovered by substeps: 0.
Finite-EI cable step time (s): residual 0.412, tangent 0.883, effective matrix 0.039, factorisation 0.211, back-substitution 0.075, added mass 0.049, other 0.085.
Finite-EI cable step time (s): residual 0.420, tangent 0.913, effective matrix 0.039, factorisation 0.213, back-substitution 0.076, added mass 0.050, other 0.086.
Finite-EI cable assembly time (s): band zeroing 0.033, tangent element kernels 0.809, tangent scatter 0.065, structural residual 0.173, weight 0.003, attachments 0.000, dry buoyancy 0.024, seabed contact 0.007, axial damping 0.147, drag 0.240, end connections 0.001, wave Froude-Krylov 0.000, held Froude-Krylov 0.126, torsion 0.000.

The phases add up to the total, which runs from the start of the deck parse to the report. If the
run stops with an error, the time up to the stop counts to the phase in which it stopped, and
Expand Down Expand Up @@ -206,6 +207,13 @@ The counts follow the march:
matrix, the factorisations, the back-substitutions (of the Newton solves and of the
force-blend correction that ends each step), the added mass and the rest; the rarely used
torsion and consistent-acceleration solves count to the rest.
* **Finite-EI cable assembly time** splits the residual and tangent assemblies into their
sections. The tangent element kernels evaluate the structural, damping, drag and wave
tangents of each element together; the other sections are the element residuals, the weight
and supports, the attachments, the dry-part buoyancy, the seabed contact, the axial damping,
the drag, the end connections, the wave and held Froude-Krylov loads and the torsion. The
sections also count the assemblies made outside the step (reactions, end moments and
consistent accelerations), so they can add up to more than the residual and tangent times.

An unset or empty variable, or ``0``, leaves the profile off. The driver reads the variable once,
when it starts.
Expand Down
6 changes: 5 additions & 1 deletion doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ OpenFAST coupling
``CABLEDYN_PROFILE=1`` before running ``openfast.exe`` to separate CableDyn solve, SeaState
sampling, output-probe, and native-I/O time, and to split the steps of ``EI = 0`` lines and
finite-EI cables into residual, tangent, factorisation and back-substitution time (with
``OMP_NUM_THREADS=1`` the line times add up to the solve time); the standalone driver reads
``OMP_NUM_THREADS=1`` the line times add up to the solve time). The ``profile parts`` line
splits ``CalcOutput`` further, into the overlay and restore of the current kinematics (at
``nsuper = 1``) and the output channels, and splits the SeaState sampling into the node
queries, the grid checks and the hand-over of the fields; the ``Hermite assembly`` line splits
the cable assemblies into their sections (:ref:`cli-profile`). The standalone driver reads
the same variable and prints its own breakdown (:ref:`cli-profile`). Keep ``ModCoupling`` fixed while
comparing configurations. Do not switch to loose coupling merely to meet a wall-clock target; on
the IEA-15MW reference model it materially changed platform and tension responses. Test
Expand Down
Loading
Loading