Repository navigation
Fix LINELET with mpi, add regression case for laminar NACA0012 - #2899
Conversation
Same as lam_NACA0012.cfg with LINEAR_SOLVER_PREC= LINELET, compared against the default ILU(0). See su2code#2877.
|
can you check parallel? |
|
Good catch LINELET segfaulted in parallel with ≥4 ranks (1 and 2 ranks ran fine, which is why it didn't show up before). Cause
Fix
Tests
Fixes #2877. |
rois1995
left a comment
There was a problem hiding this comment.
LGTM, thanks! Tested: on develop this case crashes on 4 and 8 ranks; with this PR it runs on 2, 4 and 8.
|
Thanks for testing! CI hasn't actually run yet: all workflow runs on this PR show action_required, so they need a maintainer to approve them. On slots: the CI image uses Open MPI, which counts physical cores by default, so I've added --oversubscribe to the 4-rank command to be safe (the harness already relies on the Open MPI-specific --allow-run-as-root). Header updated as well. |
…32 but sent as MPI_UNSIGNED_LONG)
|
CI findings: ASAN (serial): a real, pre-existing bug that this PR's serial LINELET test exposed. In GetLineletInfo, nColors is su2uint (uint32_t) but is sent with MPI_UNSIGNED_LONG in the Allgather, so 4 bytes past the variable are read (stack-buffer-overflow in the no-MPI wrapper, and garbage colour offsets with real MPI). Fixed by declaring it unsigned long. Verified with an ASAN build: clean, and the test values are unchanged. ramp_msw (parallel): looks unrelated. It uses ILU, so LINELET is never called, and it passes locally with residual deltas of about 0.09 against its 0.2 tolerance. It seems to be a noisy test. |
|
Nice fix. Testing at 4 ranks was the key insight, since at 2 ranks every partition touches the airfoil and hides the crash. One suggestion for a follow-up: the test only covers the fix if the partitioner leaves a rank with no wall nodes, so a small assertion or log of the zero-linelet rank count would keep it from losing that coverage if the partitioning changes. |
Addresses the regression-test part of #2877.
Adds a serial regression case for
LINEAR_SOLVER_PREC= LINELET. There is currently no LINELET coverage inTestCases.TestCases/navierstokes/naca0012/lam_NACA0012_LINELET.cfgis the laminar NACA0012 config with one added line,LINEAR_SOLVER_PREC= LINELET. The baseline uses the default ILU(0).Note: it is based on the updated
lam_NACA0012.cfgfrom #2866 (ITERinstead of the deprecatedEXT_ITER, CFL 30), so on current develop the two files differ in more than that one line until #2866 is merged. This PR does not depend on #2866; the new file parses on develop as-is. The registration is placed aftercylinder_lowmach, away from thelam_naca0012entry added in #2866, so the two PRs don't touch the same lines.At
test_iter = 20the two cases already differ, so the test is sensitive to the preconditioner:lam_NACA0012)test_valsare from a local serial clean build of current develop (8118ee0, GCC 15.2.1). The same procedure reproduces the #2866lam_naca0012values exactly. I'll update them if CI differs.This does not address the segfault reports in #2877, and only covers the serial path.