FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0321 — NetStructureWithConstraints_CablesThreadIndependent no longer runs anything in parallel
Class TEST
Severity 1
Status ready

Models: Net/NetStructureWithConstraints

Found: 2026-09-30 review of f42360e..a6492d6 (four parallel correctness reviews)

Decision needed: —

Evidence

tests/NetStructureWithConstraints_Test.cpp:145 runs the _Cables fixture with omp_set_num_threads(1) and (8) and requires identical output (the MARE-0059 race). Since MARE-0310 the panel and cable sums run on NumThreads threads (net_threads::ReadNumThreads, default 1), and NetStructureWithConstraints_Cables_in.xml sets none, so both runs are serial where the race was. The remaining #pragma omp parallel for loops (NetStructureWithConstraints.cpp per-node derivatives) write each node independently.

Effect

The test passes whether or not the race is back. The threaded path is covered by NetStructureWithConstraints_Threads4_in.xml (NumThreads = 4 against serial), not by this test.

Possible fix

Delete the test, or give the fixture NumThreads="8" and compare with a rounding tolerance (R63: a threaded run differs from the serial one by rounding), which duplicates the Threads4 test.

Test that would prove it

Reintroduce the MARE-0059 race; the test should fail.

Risk

None.