Skip to content

BLD: improve handling of CBLAS, add -Duse-ilp64 build option - #23984

Merged
seberg merged 2 commits into
numpy:mainfrom
rgommers:meson-blas-improvements
Jun 26, 2023
Merged

seberg merged 2 commits into
numpy:mainfrom
rgommers:meson-blas-improvements

Conversation

@rgommers

@rgommers rgommers commented Jun 19, 2023 •

Copy link
Copy Markdown
Member

In a conda env:

Run-time dependency openblas found: YES 0.3.23
Checking if "CBLAS" with dependency openblas: links: YES

On Arch Linux before the just-updated 0.23.23-2 build that included CBLAS and LAPACK in the openblas package (see #23909 (comment)):

$ python -m build --wheel
...
Run-time dependency openblas found: YES
Checking if "CBLAS" with dependency openblas: links: NO
Run-time dependency cblas found: YES 3.11.0
...
$ cd dist
$ unzip numpy-2.0.0.dev0-cp311-cp311-linux_x86_64.whl
$ ldd numpy/core/_multiarray_umath.cpython-311-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007fff59235000)
        libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f5cb4b08000)
        libcblas.so.3 => /usr/lib/libcblas.so.3 (0x00007f5cb62b3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f5cb4a1b000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5cb628e000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f5cb4831000)
        libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f5cb623d000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f5cb62f2000)

Closes gh-23909

In a conda env:
```
Run-time dependency openblas found: YES 0.3.23
Checking if "CBLAS" with dependency openblas: links: YES
```

On Arch Linux before the just-updated 0.23.23-2 build that included
CBLAS and LAPACK in the `openblas` package (see numpygh-23909):
```
$ python -m build --wheel
...
Run-time dependency openblas found: YES
Checking if "CBLAS" with dependency openblas: links: NO
Run-time dependency cblas found: YES 3.11.0
...

$ ldd numpy/core/_multiarray_umath.cpython-311-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007fff59235000)
        libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f5cb4b08000)
        libcblas.so.3 => /usr/lib/libcblas.so.3 (0x00007f5cb62b3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f5cb4a1b000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5cb628e000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f5cb4831000)
        libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f5cb623d000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f5cb62f2000)

```

Closes numpygh-23909
@rgommers rgommers added 36 - Build Build related PR Meson Items related to the introduction of Meson as the new build system for NumPy labels Jun 19, 2023
@rgommers
rgommers marked this pull request as draft June 19, 2023 06:31
@refparo

refparo commented Jun 24, 2023

Copy link
Copy Markdown

I can confirm that pip install-ing this works on Arch Linux with Python 3.12.0b2.

@rgommers
rgommers marked this pull request as ready for review June 24, 2023 09:22
@rgommers rgommers added this to the 2.0.0 release milestone Jun 24, 2023
@rgommers

Copy link
Copy Markdown
Member Author

Thanks @refparo. This should be good to go then, marked as ready for review.

@seberg seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One comment, rest looks fine to me.

Comment thread numpy/meson.build Outdated
[skip circle] [skip cirrus]

Co-authored-by: Sebastian Berg <[email protected]>
@seberg
seberg merged commit 32ba5eb into numpy:main Jun 26, 2023
@seberg

seberg commented Jun 26, 2023

Copy link
Copy Markdown
Member

Nice, thanks Ralf.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BLD: undefined symbol: cblas_sgemm when building with meson with pip install

3 participants