New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Missing symbol when used with reference LAPACK: cblas_cdotc_sub #18371
Comments
That might be due to a change in OpenBLAS builds on the MacPython side (or MKL for conda? ) . Not sure why we are using CBLAS variants in Fortran |
Nothing to do with OpenBLAS / MKL, which passes (aside from a small handful of test failures). It's also not just on MacOS, but only on linux. |
I have the same issue after Conda updating Scipy.
|
Downgrading to Scipy 1.10.0 on Conda forge removes this issue. Problematic Version, Build: 1.10.1, py39he83f1e1_0 |
We are seeing this in cyipopt here: mechmotum/cyipopt#182 (comment) |
@rgommers @eli-schwartz |
That problematic version is from conda-forge/scipy-feedstock#231. Otherwise the only change in the folder where the blas-wrapping happens was: 9b7d313 |
That symbol belongs to MKL/OpenBLAS for dot products. If it is found on other platforms but misses out in one platform then I'd be suspicious about the CBLAS library, you can build BLAS/LAPACK without CBLAS etc. but then we should have been seeing more missing symbols. If it was on SciPy side then it should fail everywhere but here it is curiously missing just one symbol on one platform. Weird. PS: Strangely enough I'm converting this fortran code to cython so I guess planets are aligning again. |
This is a regression, and seems to be entirely my fault: gh-18264. Let me try to open a PR to fix it - I'm about to be offline for a few days, so I'll leave it in draft and hope someone else can then confirm that the problem is gone. |
Although that PR is from 3 weeks ago, and is not in 1.10.1. So there may be more to this. We unfortunately have no CI for Netlib BLAS (nor for MKL, nor using
So to be sure: you started seeing this when switching from distutils to Meson, correct? The |
It's also in |
Conda forge recommends building against the netlib blas/lapack so that openblas, mkl, etc can be hot swapped during installations of the packages. In the cyipopt repo we run our test suite against binaries that are built against netlib blas/lapack and then I later install the optional scipy dependency which likely swaps the netlib versions with openblas (all conda forge) to run the tests for the scipy optional dependency. This has worked in the past with the scipy conda-forge binaries, so if no new scipy releases have come out, maybe changes to the scipy feedstock caused this to appear. I think it only showed up within the last month on our CI tests. |
Yes, for Linux and macOS, the conda-forge 1.10.0 binaries were built with
I'm not seeing that. That correctly uses |
I haven't gone deep enough but the error message says
|
It looks like 3 weeks ago our CI was running with 1.10.1 binaries from conda forge. So maybe this change which was 2 weeks ago has some connection: conda-forge/scipy-feedstock#231 |
Ah okay, that's use of |
It's late for me so I won't be able to report the result right away, but I've restarted a test against all blas variants in conda-forge/scipy-feedstock#224 when built with distutils rather than meson (if nothing else, then to rule out that this might have something to do with it). If the linux + netlib jobs pass the import tests and run the test suite, then the feedstock changes in conda-forge/scipy-feedstock#231 are at fault (somehow). |
Reporting back here, the distutils based builds against netlibs on aarch/ppc were successful in conda-forge/scipy-feedstock#224, so it appears to be some consequence of switching to meson. |
This |
I can reproduce this in an environment with the following changes: diff --git a/environment.yml b/environment.yml
index 6eb85bbcc..00b0141c7 100644
--- a/environment.yml
+++ b/environment.yml
@@ -3,7 +3,7 @@
# $ conda activate scipy-dev
#
# Also used to build the `scipy-dev` Docker image via GitHub Actions
-name: scipy-dev
+name: scipy-dev-netlib
channels:
- conda-forge
dependencies:
@@ -15,9 +15,11 @@ dependencies:
- meson-python
- ninja
- numpy
- - openblas
+ - libblas
+ - libcblas
+ - liblapack
+ - blas-devel
- pkg-config # note: not available on Windows
- - libblas=*=*openblas # helps avoid pulling in MKL
+ - libblas=*=*netlib # helps avoid pulling in MKL
- pybind11
# scipy.datasets dependency
- pooch And then running The issue is that Netlib BLAS has separate
A fix is on the way. Our CI situation for BLAS/LAPACK libraries is very bad, that's why this snuck in. I'll see if I can address that as well. |
The first was caused by scipygh-18264 and caused a build issue, the second was a missing CBLAS issue when building against Netlib BLAS with this combination of flags: python -m build -nwx -C-Dblas=blas -C-Dlapack=lapack -C-Duse-g77-abi=true python dev.py build -C-Dblas=blas -C-Dlapack=lapack -C-Duse-g77-abi=true Closes scipygh-18371
I've been testing scipy against all the BLAS/LAPACK variants available in conda-forge for a while, and though there are small issues here and there, generally things work everywhere.
Since scipy 1.10.1 (or some other change in the last 3 months), there's however now a kind of error I haven't seen before - a missing symbol (`cblas_cdotc_sub), but only for one BLAS/LAPACK flavour, namely the "netlib" one from https://github.com/Reference-LAPACK/lapack/.
This happens for linux on all arches (x64, aarch64, ppc64le), but not on osx/win.
Since this is causing an error directly upon import (rather than a small handful of failed tests), this has a much bigger blast radius.
Apparently this is encountered in the wild already: python-control/Slycot#194
The text was updated successfully, but these errors were encountered: