Repository navigation
CMake: accept renamed libmtblasfftdev.a from mtfftblas_v1.4.1c for DSP builds - #8236
Merged
mohanchen merged 1 commit intoOct 29, 2026
Merged
Conversation
…P builds mtfftblas_v1.4.1c renamed libmtblasdev.a to libmtblasfftdev.a, breaking the hardcoded archive name in the USE_DSP link list. Look the library up with find_library using both names (new name first, old name as fallback) and fail with a clear diagnostic when neither exists. Fixes deepmodeling#8227
mohanchen
approved these changes
Oct 29, 2026
Collaborator
|
LGTM |
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.source/changes.Linked Issue
Fix #8227
Unit Tests and/or Case Tests for my changes
mtfftblas prefixes, four scenarios (
cmake -S <proj> -B <build> -DUSE_DSP=ON -DMTBLAS_FFT_DIR=<mock prefix>):libmtblasfftdev.apresent (mtfftblas_v1.4.1c layout) → resolves tolibmtblasfftdev.alibmtblasdev.apresent (older mtfftblas layout) → falls back tolibmtblasdev.alibmtblasfftdev.a(NAMES order)FATAL_ERRORmessagecmake -S . -B <build>with default options (USE_DSP=OFF) → configures andgenerates successfully; non-DSP builds unaffected.
cmake -DUSE_DSP=ON -DMT_CPACK_DIR=... -DMTBLAS_FFT_DIR=... ...→MTBLASDEV_LIBresolves tolibmtblasfftdev.a; full compile and link succeed;the resulting binary runs LCAO calculations normally.
python3 tools/03_code_analysis/agent_governance_check.py --staged→ no findings.logic that the C++ test harness cannot exercise, and CI has no DSP toolchain;
the DSP path was verified manually on Tianhe as listed above.
What's changed?
libmtblasdev.atolibmtblasfftdev.a, breaking DSPbuilds (
-DUSE_DSP=ON) because the archive name was hardcoded insource/CMakeLists.txt. The link entry is now resolved withfind_library(... NAMES mtblasfftdev mtblasdev PATHS ${MTBLAS_FFT_DIR}/libmtblas/lib NO_DEFAULT_PATH), accepting both the new and the legacy name, and configurationaborts with a clear diagnostic when neither exists.
entries (required because the mtblas archives bundle their own OpenBLAS
objects), and the separate C_PACK prerequisite is unchanged.
older mtfftblas releases without symlink workarounds. No INPUT parameter changes.
USE_DSPbranch ofsource/CMakeLists.txtis touched; builds onother platforms are unaffected.
Governance Notes
source/C++ code changed.