Fix relax_new test linkage for Relax_Data - #7737
Merged
mohanchen merged 1 commit intoAug 1, 2026
Merged
Conversation
AsTonyshment
approved these changes
Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.Linked Issue
No upstream issue linked; this is a follow-up to the test-linkage regression introduced by PR #7456.
Unit Tests and/or Case Tests for my changes
MODULE_RELAX_relax_new_relaxfailed with undefined references toRelax_Data::dimandRelax_Data::largest_grad.cmake --build build-debug --target MODULE_RELAX_relax_new_relax -j2succeeds.MODULE_RELAX_relax_new_relax --gtest_filter=Test_SETGRAD.relax_newpasses.MODULE_RELAX_relax_new_line_searchtarget builds and its CTest passes.git diff --checkand the agent governance check pass.MODULE_RELAX_relax_new_relaxCTest now runs, but the existingTest_RELAX.relax_newnumerical assertions fail on currentdevelop. This PR does not change relaxation behavior or numerical references.What's changed?
PR #7456 moved shared relaxation state to static members of
Relax_Data. As a result,relax_sync.cpp, throughions_move_basic.h, now referencesRelax_Data::dimandRelax_Data::largest_grad, whose definitions live inrelax_data.cpp.The production relaxation module already compiles
relax_data.cpp. The failure occurs only withBUILD_TESTING=ONwhen CMake builds the standaloneMODULE_RELAX_relax_new_relaxunit-test executable from its explicit source list. That list includedrelax_sync.cppbut omittedrelax_data.cpp, so the test executable failed at link time. The reduced non-LCAO configuration exposed the omission, but LCAO itself is not the cause.This PR adds
../relax_data.cppto that test target's source list. No production source, runtime behavior, or public interface changes.Governance Notes