Skip to content

Pin openCARP image to v19.0 and add PETSc option file fallback to unblock steps 10 and 11 - #96

Merged
avhekkink merged 2 commits into
plugin/atrialstrainmotion-update-DockerAtrialStrainMotionfrom
plugin/atrialstrainmotion-fix-step-10-and-11-UAC
Sep 3, 2026
Merged

Pin openCARP image to v19.0 and add PETSc option file fallback to unblock steps 10 and 11#96
avhekkink merged 2 commits into
plugin/atrialstrainmotion-update-DockerAtrialStrainMotionfrom
plugin/atrialstrainmotion-fix-step-10-and-11-UAC

Conversation

@avhekkink

@avhekkink avhekkink commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Steps 10 and 11 stopped at the openCARP Laplace solves due to three separate defects composed, the fixes for which are included in this branch.

For future reference, the openCARP container registry can be found at: https://git.opencarp.org/openCARP/openCARP/container_registry.
Release tags present: v15-0, v16-0, v17-0, v18-0, v18-1, v19-0, v20-0.
Note: v20.0 was just released on 2026-09-01 and it has zero references to ellip_use_pt/parab_use_pt, hence the need to pin the image at v19.0.

Changes

  • The openCARP image is pinned to v19-0. SetDockerImageOpenCarp takes a tag argument and defaults to v19-0, the way SetDockerImageUac and SetDockerImageAfmotion already do. Release v19.0 is the last one that declares ellip_use_pt and parab_use_pt. Upstream removed both on master twelve days after that release, so the latest tag is a development build that rejects them, and the solver exited in its parameter parser. The hard-coded latest literal in the igbextract block of OpenCarpDockerLaplaceSolves now reads _dockerimage too.

  • A PETSc option file that is absent no longer stops the solve. GetOpenCarpDockerLaplaceSolverArguments copies ilu_cg_opts and amg_cg_opts from a petsc_opts folder beside the executable, then names them to openCARP. That folder is an external, like MLib and M3DLib, and it is not in the repository. When it is absent the copy fails, and openCARP stops with a segmentation fault inside PETSc rather than a message. The function now adds each -*_options_file flag only when that file is in the mount, and logs a warning that names the absent file. openCARP then uses its own solver settings, which match the settings amg_cg_opts holds.

  • OpenCarpDocker checks the field the solver writes. It passed IsOutputSuccessful the output directory, which it creates itself two lines earlier. QFileInfo::exists() is true for a directory and size() returns the dirent block, so the check passed on an empty directory and every openCARP failure reported as a success. It now names outPath + "/phie.igb", and keeps shouldTouchOutputFirst at false, which matches OpenCarpDockerLaplaceSolves.

  • UAC_Stage1 and UAC_Stage2 check the Laplace solutions. UAC_Stage1 re-tested the same four .vtx files that the uac container wrote before openCARP ran, so it reported success whatever the solver did. It now also checks LR_UAC_N2/phie.igb and PA_UAC_N2/phie.igb. UAC_Stage2 checks its four fields and stops before step 2b, because step 2b reads them.

Impacted areas

Area Files
Command line module CemrgCommandLine.{h,cpp}
Atrial Strain Motion plugin AtrialStrainMotionView.cpp

CemrgCommandLine is shared. The Atrial Fibres plugin calls SetDockerImageOpenCarp and OpenCarpDocker from UacCalculationRough and UacCalculationRefined, so it moves to v19-0 and gets the same option-file fallback. All twelve OpenCarpDocker call sites discard the return value, so the stricter output check changes no behaviour there.

SetDockerImageOpenCarp also serves six meshtool routines — DockerSurfaceFromMesh, DockerExtractGradient, DockerRemeshSurface, DockerInterpolateData, DockerConvertMeshFormat and DockerCleanMeshQuality. The pin moves all six from latest to v19-0.

Testing

Steps 10, 11 and 12 pass on V-0004 in the panel. Step 10 writes phie.igb under LR_UAC_N2 and PA_UAC_N2; step 11 reaches stage 2a and step 2b completes.

Step 8 passes on v19-0. This is the case the pin put at risk, because SetDockerImageOpenCarp also serves the six meshtool routines. It ran against a copy of V-0004-wd pruned back to the state before step 8, so all four meshtool calls ran for real rather than over existing output. All seven outputs reappeared, and the log confirms every call used v19-0.

Against the latest baseline the mesh is the same mesh: 122,250 points and 243,665 elements, clean-Labelled-refined.elem, .lon and both .fcon files byte-identical, and the coordinates keep their -scale=1000 magnitude. clean-Labelled-refined.pts differs slightly — 5,023 points of 122,250 move, by at most 0.014 mm. meshtool clean quality smooths iteratively for 200 iterations, so a small difference between builds is expected. The connectivity does not change.

The openCARP solve was also driven by hand against a copy of V-0004-wd/UAC_CT on v19-0, in three configurations. Each one wrote a 490,024-byte phie.igb:

Option files present Result
Neither openCARP defaults, 0.86 s
amg_cg_opts only 0.57 s
Both 0.72 s

Without the fix, the same command segfaults inside PETSc.

MitkCemrgAppModule and kcl_cemrgapp_atrialstrainmotion both build and link clean.

Not verified. The Atrial Fibres plugin's own UAC buttons are untested on this branch, and they call SetDockerImageOpenCarp and OpenCarpDocker through UacCalculationRough and UacCalculationRefined.

Unrelated failure, for the record. Step 13 fails on V-0004. CropImage loads the cemrg/ccta container output without the CemrgNiftiUtils::RepairNiftiQform call that SegmentExtract makes, and ITK refuses a file whose qform_code is 0. This predates the branch and needs its own issue.

avhekkink and others added 2 commits September 2, 2026 16:51
Step 10 ran two openCARP Laplace solves and reported success without
doing them. Step 11 then failed, because the field step 10 must write
was absent. Three defects composed.

Pin the openCARP image to v19-0. Release v19.0 is the last one that
declares ellip_use_pt and parab_use_pt. The latest tag is a development
build from after their removal, and it rejects both parameters.

Skip a PETSc option file that is not in the mount. openCARP stops with
a segmentation fault when it cannot read an option file. Without the
flag it uses its own solver settings, which match the settings in
amg_cg_opts.

Name phie.igb in OpenCarpDocker, and check the fields in UAC_Stage1 and
UAC_Stage2. The check tested the output directory, which OpenCarpDocker
creates itself, so every openCARP failure reported as a success.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013cT5BGXcsgwFczMGccPwsL
…on' into plugin/atrialstrainmotion-fix-step-10-and-11-UAC
@avhekkink avhekkink changed the title Unblock steps 10 and 11 of the Atrial Strain Motion pipeline Pin openCARP image to v19.0 and add PETSc option file fallback to unblock steps 10 and 11 Sep 2, 2026
@avhekkink
avhekkink marked this pull request as ready for review September 2, 2026 16:29

@alonsoJASL alonsoJASL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ready to merge

@avhekkink
avhekkink merged commit 9a0db91 into plugin/atrialstrainmotion-update-DockerAtrialStrainMotion Sep 3, 2026
@avhekkink
avhekkink deleted the plugin/atrialstrainmotion-fix-step-10-and-11-UAC branch September 3, 2026 10:42
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.

2 participants