Remove the LIWORK and LDSWORK checks from STRSYL3 - #1426
Open
kyungminlee wants to merge 1 commit into
Open
kyungminlee wants to merge 1 commit into
kyungminlee wants to merge 1 commit into
Conversation
Commit 1c1263e ("Use unblocked code if insufficient workspace is provided", Reference-LAPACK#651) made xTRSYL3 call the unblocked xTRSYL when LIWORK or LDSWORK is too small for the blocked code, instead of returning an error. It removed the workspace checks from DTRSYL3, CTRSYL3 and ZTRSYL3, but not from STRSYL3. STRSYL3 therefore still returns INFO = -14 or -16 where DTRSYL3 solves the problem, and the workspace terms in its condition for calling STRSYL can never be true. The rejected calls include some that follow the documentation. For M = 50 and N = 500, the documented minimum LDSWORK is 3, but the check requires 11 (with NB = 48 from the reference ILAENV). Remove the two checks, so that STRSYL3 behaves like DTRSYL3. Calls that succeed today are not affected.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1426 +/- ##
=======================================
Coverage 69.36% 69.36%
=======================================
Files 6122 6122
Lines 486717 486713 -4
Branches 23268 23268
=======================================
- Hits 337590 337588 -2
+ Misses 148689 148687 -2
Partials 438 438
Continue to review full report in Codecov by Harness.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
STRSYL3 still validates LIWORK and LDSWORK against what the blocked code needs and fails with INFO=-14 or -16 when either is too small. Commit 1c1263e (#651) removed these two checks from DTRSYL3, CTRSYL3 and ZTRSYL3 when it added the fallback to the unblocked ?TRSYL for undersized workspaces, but not from STRSYL3. STRSYL3 has the same fallback condition, so its LIWORK and LDSWORK terms can never be true:
lapack/SRC/strsyl3.f
Lines 304 to 312 in 9e518f1
The LDSWORK check is also stricter than the documentation. The header asks for LDSWORK >= MAX(2, ROWS) with ROWS = (M+NB-1)/NB + 1, but the check requires MAX(NBA, NBB) rows, and NBB grows with N. With M=50, N=500 and the reference ILAENV (NB=48), the documented minimum is 3 while the check demands 11.
Remove the two checks, matching the other three routines. Calls that pass today are not affected. Calls that were rejected now take the STRSYL fallback, as they do in DTRSYL3.
Reproducer