Skip to content

BLD: improve detection of Netlib libblas/libcblas/liblapack - #25055

Merged
mattip merged 3 commits into
numpy:mainfrom
rgommers:fix-netlib-blas
Nov 2, 2023
Merged

mattip merged 3 commits into
numpy:mainfrom
rgommers:fix-netlib-blas

Conversation

@rgommers

@rgommers rgommers commented Nov 2, 2023

Copy link
Copy Markdown
Member

Changes:

  • Add proper dependencies for Netlib BLAS and LAPACK, using both pkg-config and system (custom) detection
  • Also improve the MKL and OpenBLAS detection, so there is less logged in meson-log.txt
  • Add a CI job for split libblas, libcblas and liblapack in an OpenSUSE container
  • Add blas, cblas and lapack to the FreeBSD CI job

Closes gh-25028
Closes gh-25041
Also address the issue for conda-forge with split libblas/libcblas encountered in conda-forge/numpy-feedstock#302.

@rgommers rgommers added 03 - Maintenance 09 - Backport-Candidate PRs tagged should be backported Meson Items related to the introduction of Meson as the new build system for NumPy labels Nov 2, 2023
@rgommers rgommers added this to the 2.0.0 release milestone Nov 2, 2023
@rgommers
rgommers marked this pull request as draft November 2, 2023 13:24
@github-actions github-actions Bot added the 36 - Build Build related PR label Nov 2, 2023
@rgommers
rgommers force-pushed the fix-netlib-blas branch 5 times, most recently from cd49462 to dcb6ffc Compare November 2, 2023 15:01
Also add logging on failure, so future build issues are easier to
diagnose.
Also includes some smaller fixes to make the OpenBLAS and MKL detection
more efficient, resulting in less output in meson-log.txt
@rgommers
rgommers marked this pull request as ready for review November 2, 2023 17:47
@rgommers

rgommers commented Nov 2, 2023

Copy link
Copy Markdown
Member Author

This is good to go now.

@mattip

mattip commented Nov 2, 2023

Copy link
Copy Markdown
Member

LGTM, all checks are passing. It is interesting that the mesonbuild/dependencies/blas_lapack.py file has similarities to the numpy.distutils.sysconfig mechanism, but written in modern python.

@mattip
mattip merged commit ac807c9 into numpy:main Nov 2, 2023
@mattip

mattip commented Nov 2, 2023

Copy link
Copy Markdown
Member

Thanks @rgommers.

@rgommers
rgommers deleted the fix-netlib-blas branch November 2, 2023 19:52
@rgommers

rgommers commented Nov 2, 2023

Copy link
Copy Markdown
Member Author

It is interesting that the mesonbuild/dependencies/blas_lapack.py file has similarities to the numpy.distutils.sysconfig mechanism, but written in modern python.

Not too surprising I guess. It is only the fallback mechanism that has the similarities though (aside from the symbol checks, which I just ported from distutils/system_info.py); the first choice of using pkg-config is way nicer.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Nov 11, 2023
@charris charris removed this from the 2.0.0 release milestone Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

03 - Maintenance 36 - Build Build related PR Meson Items related to the introduction of Meson as the new build system for NumPy

Projects

None yet

3 participants