Skip to content

gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ#1289

Merged
langou merged 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue676
Jun 12, 2026
Merged

gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ#1289
langou merged 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue676

Conversation

@jschueller

Copy link
Copy Markdown
Collaborator

The workspace NB queries in all four ?gelsy variants used ?GERQF and ?UNMRQ, but the routines actually called at runtime are ?TZRZF and ?UNMRZ (real) / ?UNMRZ (complex).

While ?GERQF and ?TZRZF are related (both produce an RQ-like factorization), their block sizes may differ in ILAENV's tuned values. If the user relied on LWKOPT from the query to allocate exactly the right workspace, the actual ?TZRZF/?UNMRZ calls could underflow or overflow the work array.

Fix the ILAENV calls to match the routines actually invoked:
?GERQF -> ?TZRZF
?UNMRQ -> ?UNMRZ

Closes #676

The workspace NB queries in all four ?gelsy variants used
?GERQF and ?UNMRQ, but the routines actually called at runtime
are ?TZRZF and ?UNMRZ (real) / ?UNMRZ (complex).

While ?GERQF and ?TZRZF are related (both produce an RQ-like
factorization), their block sizes may differ in ILAENV's tuned
values.  If the user relied on LWKOPT from the query to allocate
exactly the right workspace, the actual ?TZRZF/?UNMRZ calls could
underflow or overflow the work array.

Fix the ILAENV calls to match the routines actually invoked:
  ?GERQF -> ?TZRZF
  ?UNMRQ -> ?UNMRZ

Closes Reference-LAPACK#676
@langou langou merged commit fd8e6db into Reference-LAPACK:master Jun 12, 2026
12 checks passed
@jschueller jschueller deleted the issue676 branch June 12, 2026 19:39
@martin-frbg

Copy link
Copy Markdown
Collaborator

Getting belated qualms here - it appears the "wrong" routines may have been used here precisely because ILAENV has no matching configuration for any RZF or MRQ and returning "1" for unblocked was not desirable. Can anybody comment please ?

@langou

langou commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Getting belated qualms here - it appears the "wrong" routines may have been used here precisely because ILAENV has no matching configuration for any RZF or MRQ and returning "1" for unblocked was not desirable. Can anybody comment please ?

@martin-frbg: you are correct. See #1325

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.

ZGELSY uses ILAENV with ZGERQF and ZUNMRQ

3 participants