Skip to content

bdsqr: Fix INFO return when NCVT=NRU=NCC=0#1285

Open
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue242
Open

bdsqr: Fix INFO return when NCVT=NRU=NCC=0#1285
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue242

Conversation

@jschueller

@jschueller jschueller commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Problem: When NCVT = NRU = NCC = 0 (no singular vectors requested), BDSQR calls the dqds algorithm. If dqds failed with INFO = 1 or 3, the routine returned immediately with that error, even though the standard QR algorithm could still compute the singular values. Only INFO = 2 triggered the fallback.

Change IF( INFO .NE. 2 ) RETURN to IF( INFO .EQ. 0 ) RETURN after the dqds call, so the standard QR fallback runs on any dqds failure (INFO=1,2,3) and not only INFO=2.

Closes #242

Problem: When NCVT = NRU = NCC = 0 (no singular vectors requested),
BDSQR calls the dqds algorithm. If dqds failed with INFO = 1 or 3,
the routine returned immediately with that error, even though the
standard QR algorithm could still compute the singular values. Only
INFO = 2 triggered the fallback.

Change `IF( INFO .NE. 2 ) RETURN` to `IF( INFO .EQ. 0 ) RETURN`
after the dqds call, so the standard QR fallback runs on any
dqds failure (INFO=1,2,3) and not only INFO=2.

Closes Reference-LAPACK#242
@langou

langou commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Looks good to me. Thanks!

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.

Returned INFO when NCVT = NRU = NCC = 0

3 participants