Skip to content

CI: use the Prescott OpenBLAS kernel for ASE tests - #8348

Open
Stardust0831 wants to merge 4 commits into
deepmodeling:developfrom
Stardust0831:ci/ase-openblas-core-selection
Open

Stardust0831 wants to merge 4 commits into
deepmodeling:developfrom
Stardust0831:ci/ase-openblas-core-selection

Conversation

@Stardust0831

@Stardust0831 Stardust0831 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

The GNU CI image's OpenBLAS 0.3.20 Cooperlake kernel returns incorrect DSYMM results, causing the Gamma-only Si calculator and restart tests to abort at SCF iteration 4 with a charge integral of -17.6846.

The affected library is Ubuntu 22.04's system package libopenblas0-openmp 0.3.20+ds-1, installed by Dockerfile.gnu. In this version's DYNAMIC_ARCH builds, Cooperlake inherits SkylakeX's 4-by-8 multiplication kernel but retains 16-by-2 packing parameters. OpenBLAS PR #3631, included in 0.3.21, restores consistent kernels and parameters. The controlled builds below confirm that this upstream fix resolves the observed failure.

What's changed?

Set OPENBLAS_CORETYPE=Prescott for the entire x86-64 ASE CI job, using a conservative kernel supported by the current image. The change is four workflow lines; existing tests, numerical assertions, and ABACUS source remain unchanged. Remove the override when a corrected library in the GNU image has been verified.

Linked Issue

Related: #7794.

Unit Tests and/or Case Tests for my changes

Fresh validation used the original failing GNU image (sha256:b195875e7f3262d26eb4e07960afc0e7a193861699cd281eb08f65562880b17d) and the independently built upstream eba09c937c73 executable on AMD Ryzen 9 9950X3D.

With OPENBLAS_CORETYPE=Prescott and one OpenMP/BLAS thread:

  • Confirmed that the library selected Prescott. The focused DSYMM regression has zero error; all 30 broader DSYMM/DGEMM probe cases passed.
  • Both original TestAbacusCalculator.test_calculator_results and test_restart passed with every original assertion.
  • Complete suites passed using the following commands inside the image:
(cd interfaces/ASE_interface/abacuslite && bash xtest.sh)
# 56 passed, 2 existing skips.
(cd interfaces/ASE_interface/tests && bash xtest.sh)
# 7 passed.

Workflow YAML parsing, staged governance, and whitespace checks passed:

python3 tools/03_code_analysis/agent_governance_check.py --staged
git diff --cached --check

The original failure was isolated by replacing only DSYMM while retaining Cooperlake for other BLAS operations. A hosted Intel run also directly recorded automatic Cooperlake selection and the incorrect DSYMM result. The hosted ASE job for the fixed Prescott revision passed: 56 inline tests, 2 existing skips, and 7 integration tests.

To verify the upstream fix, OpenBLAS 0.3.20 was also rebuilt in the same image with and without only the two commits from PR #3631, including LAPACK. Both runs retained Cooperlake and used the same ABACUS executable, two MPI ranks, genelpa, and one OpenMP/BLAS thread:

  • Unpatched: the minimal DSYMM probe has absolute error 16; both original Si tests reproduce the iteration-4 charge of -17.6846.
  • Patched: the minimal error is zero, all 30 broader DSYMM/DGEMM cases pass (maximum error 2.22e-16), and both Si tests pass every original assertion.

Governance Notes

  • Existing ASE tests cover this CI environment change; no new test framework or helper is needed.
  • INPUT/docs changes: none; no documentation update required for this CI-only setting.
  • Core module impact: none.
  • Exceptions requested: none.

@Growl1234

Growl1234 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

That adds quite a few complexity. Would it be possible to simply choose the generic kernel for GitHub CI? Btw I'm surprised that such fault can be related to system OpenBLAS...

@Stardust0831

This comment was marked as outdated.

@Stardust0831 Stardust0831 changed the title CI: validate OpenBLAS and select a compatible kernel for ASE tests CI: use the Prescott OpenBLAS kernel for ASE tests Nov 21, 2026
@Stardust0831

Copy link
Copy Markdown
Collaborator Author

@Growl1234 It's already been simplified to 4 lines

@Growl1234

Growl1234 commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks, looks good! Maybe, we should consider updating the images base to Ubuntu 24.04, which gets rid of the OpenBLAS-0.3.20 problem described in PR summary... (@mohanchen)

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Static review of a6296f6a found no actionable issues in the job-wide Prescott override; the original ASE tests and numerical assertions remain unchanged.

No builds or tests were run, and the reported runtime and CI results were not independently verified.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants