Repository navigation
Conversation
added 3 commits
October 11, 2026 21:27
Delete unused sources: main.cpp (empty stub), mcd.h/mcd.c (third-party memory checker, only reachable via never-defined _MCD_CHECK), export (declared "not used yet", no consumers), and matrix_wrapper_tianhe2.h (dead #else branch). Drop the guarded mcd.h include and empty _MCD_CHECK guards, and remove export.cpp from the base OBJECT library.
…_nao projgen is a PW on-site projector generator with no production callers outside module_proj; move it from source_base to source_pw/module_proj (next to its only active consumer onsite_proj_init and its unit test) and rename the stale MODULE_NAO_PROJGEN include guard. Split smoothgen, a second independent function sharing the old file, into source_basis/module_nao: its active callers are atomic_radials (NAO) and onsite_proj_init (PW). This keeps source_basis free of any new dependency on source_pw. - move projgen unit test to module_proj/unittests; delete the duplicate projgen_test from module_nao/test; add module_nao/unittests with test_smoothgen - wire both CMake (module/unit tests) and Makefile.Objects: drop projgen.o from OBJS_ORBITAL, add smoothgen.o to OBJS_SRCPW so both PW and LCAO links resolve it without duplicate objects - remove dead commented projgen call in atomic_radials and the unnecessary projgen include in onsite_proj_init
Commit 9f846a0 removed source_base/export.cpp but left export.o in OBJS_BASE of source/Makefile.Objects, so the legacy Makefile build fails with "No rule to make target 'build/obj/export.o'". Remove the stale entry to restore the Makefile build.
Commit 78f3891 moved smoothgen into the ENABLE_LCAO-guarded numerical_atomic_orbitals OBJECT library, but its PW caller onsite_proj_init is linked unconditionally via module_proj. PW-only builds (ENABLE_LCAO=OFF) fail with undefined reference to smoothgen. Extract smoothgen.cpp into a standalone nao_smoothgen OBJECT library built regardless of ENABLE_LCAO, link it into the main binary unconditionally, and add it to the test targets that link numerical_atomic_orbitals (atomic_radials inside calls smoothgen).
Commit 78f3891 moved smoothgen to source_basis/module_nao but missed the pyabacus build. libnaopack.so compiles atomic_radials.cpp which calls smoothgen, but the source was not in the _naos list, causing an undefined symbol on import.
Lessons from 2026-10-11-a branch: three CI failures (stale export.o in Makefile.Objects, smoothgen trapped in ENABLE_LCAO guard, pyabacus naopack missing smoothgen.cpp) all stem from incomplete build-surface updates when moving/splitting source files.
This branch has not been deployed
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.
Refactor: reorganize some files