Skip to content

Toolchain: Remove OpenBLAS-based architecture detection - #7971

Open
Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:toolchain
Open

Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:toolchain

Conversation

@Growl1234

Copy link
Copy Markdown

Replace OPENBLAS_ARCH with a lightweight host architecture detection based on uname -m, normalizing only known equivalent names such as x86_64/amd64 and aarch64/arm64.

Also remove OPENBLAS_LIBCORE and get_openblas_arch.sh. For native builds, OpenBLAS already performs its own CPU/core detection when TARGET is not specified, while the existing DYNAMIC_ARCH fallback is preserved.

This removes an unnecessary OpenBLAS download/probe from the early toolchain stages and simplifies the architecture handling.

See also cp2k/cp2k#6023.

Copilot AI lite review requested due to automatic review settings September 15, 2026 09:56
@Growl1234

Copy link
Copy Markdown
Author

Toolchain Quick Test failed because cmake.org is down.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Preserve the existing MKL i386/ia32 mapping and clarify or restore the changed OpenBLAS fallback behavior.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Replaces OpenBLAS-based architecture probing with normalized uname -m detection and simplifies toolchain architecture handling.

Changes:

  • Adds SYSTEM_ARCH normalization across toolchain installers.
  • Updates OpenBLAS target and fallback behavior.
  • Removes obsolete OpenBLAS variables and probe script.
File summaries
File Summary
toolchain/scripts/stage3/install_elpa.sh Uses normalized architecture for CPU feature detection.
toolchain/scripts/stage2/install_openblas.sh Updates target selection and fallback behavior; fallback policy requires clarification.
toolchain/scripts/stage2/install_mkl.sh Uses SYSTEM_ARCH; currently rejects i386 before the prior ia32 mapping.
toolchain/scripts/stage1/install_openmpi.sh Uses normalized architecture for compatibility flags.
toolchain/scripts/stage0/setup_buildtools.sh Removes the OpenBLAS architecture probe.
toolchain/scripts/stage0/install_cmake.sh Selects CMake artifacts by system architecture.
toolchain/scripts/package_versions.sh Removes OpenBLAS-dependent checksum selection.
toolchain/scripts/get_openblas_arch.sh Removes the obsolete probe script.
toolchain/scripts/common_vars.sh Defines normalized host architecture detection.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread toolchain/scripts/stage2/install_mkl.sh Outdated
Comment thread toolchain/scripts/stage2/install_openblas.sh Outdated
@Growl1234
Growl1234 force-pushed the toolchain branch 3 times, most recently from 87ac0cb to 40564f4 Compare September 15, 2026 14:03
@mohanchen mohanchen added the Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS label Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants