Skip to content

Reinstate qmax argument to dlasq3 and slasq3 for parity with reference LAPACK and cython_lapack#24

Merged
ilayn merged 1 commit into
ilayn:mainfrom
agriyakhetarpal:restore-qmax-dlasq3-slasq3
Jul 8, 2026
Merged

Reinstate qmax argument to dlasq3 and slasq3 for parity with reference LAPACK and cython_lapack#24
ilayn merged 1 commit into
ilayn:mainfrom
agriyakhetarpal:restore-qmax-dlasq3-slasq3

Conversation

@agriyakhetarpal

@agriyakhetarpal agriyakhetarpal commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Reference LAPACK's dlasq3/slasq3 and SciPy's cython_lapack take qmax as an in/out parameter, but we don't have it in the signature here (but we did have a stale param doc line though). Not sure why it was removed! :) I checked the commit history and found 7b823f6 and c75b3d1. The former commit had qmax by value in dlasq3, and then the latter removed it. The static analysis was right, though. However, the analyser shouldn't find this to be an issue (I tested with clang --analyze -Xclang -analyzer-output=text, at least).

See here:

This PR restores the argument, the reversal-branch update of it, and adds it back through dlasq2/slasq2, the Fortran-ABI shim, and the public headers.

Also xref pyodide/pyodide-recipes#619, where everything is coming together now! I am using this PR as a patch there and will drop it when this is merged. This came up in one of the scipy.linalg test crashes in local testing. With this patch, the function signature mismatch is fixed.

@ilayn

ilayn commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Wow that is weird that I missed it. That means no test it covering it, which I come to realize slowly about LAPACK in general unfortunately. I'm planning to make a hail mary attempt to make testing suite a bit better and possibly push it to upstream but that Fortran testing mechanism is making me itch. I'll see what I can do.

But you seem to be a much better analyzer than intellisense 😅 anyways. Clicked the button.

@ilayn
ilayn merged commit 4230b94 into ilayn:main Jul 8, 2026
8 checks passed
@agriyakhetarpal
agriyakhetarpal deleted the restore-qmax-dlasq3-slasq3 branch July 8, 2026 21:23
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.

2 participants