Commit Graph
3518 Commits
Author SHA1 Message Date
langou 192037884c Merge pull request #1261 from ACSimon33/fix_warnings
Fix Intel Classic build on Windows and various warnings
2026-06-12 01:42:07 -06:00
langou 078d8978db Merge pull request #1280 from ACSimon33/cherry-pick-7872e2d6
Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64
2026-06-12 01:38:54 -06:00
langou fd8e6db995 Merge pull request #1289 from jschueller/issue676
gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ
2026-06-12 01:37:02 -06:00
langou d5dbabe3f5 Merge pull request #1291 from jschueller/issue549
dorcsd2by1/uncsd2by1: avoid OOB access with zero rows
2026-06-12 01:34:55 -06:00
Julien Schueller 6649f3999f dorcsd2by1/uncsd2by1: avoid OOB access with zero rows
When P=0 and M=Q (U2 is M-by-M, X21 is M-by-M and orthogonal),
or P=M and M=Q (U1 is M-by-M, X11 is M-by-M and orthogonal),
or Q=0, the minimal dimension R = MIN(P, M-P, Q, M-Q) is zero,
so C and S are empty.  In these degenerate cases the preceding
code entered the R == P or R == M-P branch and called the
bidiagonalization subroutines (SORBDB2/SORBDB3) which then
accessed elements X21(I,I+1) or X11(I,I+1) out of bounds in
the second DO loop (I = P+1, Q or I = M-P+1, Q).

Fix: handle R = 0 directly in the four driver routines before
the case-dependent bidiagonalization path.  The three trivial
CSD cases are:

  Q = 0:     set U1 = I, U2 = I, return.
  P = 0, M = Q:  copy X21 to U2, set V1T = I, return.
  P = M, M = Q:  copy X11 to U1, set V1T = I, return.

All other R=0 configurations are non-standard and still fall
through to the existing path (which may fail).

Fixes #549
2026-06-11 16:58:16 +02:00
Julien Schueller ed7d20cd23 gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ
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
2026-06-11 16:26:07 +02:00
langou 077667a1be Merge pull request #1284 from jschueller/cblas
Misc fixes
2026-06-11 08:14:19 -06:00
langou 92ef3aaeb8 Merge pull request #1259 from ACSimon33/fix_python_test_summary
Fix Python test summary
2026-06-11 07:47:29 -06:00
langou 6e88a11703 Merge pull request #1251 from martin-frbg/issue1183
Optimize looping over the lower triangular in fat matrix cases of LACPY/LANTR/LASCL
2026-06-11 07:16:58 -06:00
Julien Schueller 283cf5b76d Make LAPACKE_[cz]tgexc pass ifst/ilst as pointer outputs
Per LAPACK docs, in [cz]tgexc, ilst is [in,out]. The LAPACKE C
interface was passing both ifst and ilst by value as input-only
scalars, so callers could never observe the updated ilst value.

Change both ifst and ilst to lapack_int* pointers in the complex
tgexc variants to match the real-precision stgexc/dtgexc interface
and the underlying Fortran semantics.

Fixes #771
2026-06-11 15:05:22 +02:00
Julien Schueller 91c0f61b87 Guard ?GEEV/?GEEVX undo-scaling against negative INFO
When ?HSEQR encounters non-finite input, it can return a negative
INFO. The undo-scaling block at label 50 then computes N-INFO (which
exceeds N) and indexes WR( INFO+1 ) (out of bounds), causing memory
corruption through ?LASCL.

Add INFO.GE.0 to the outer IF( SCALEA ) guard so the undo-scaling
block is skipped entirely when INFO is negative. The inner
IF( INFO.GT.0 ) guard only covered the second pair of ?LASCL calls.

Fixes #1128
2026-06-11 15:05:19 +02:00
Julien Schueller 6dc1a78eae Fix DROTMG/SROTMG rescaling overwriting DH12
When DFLAG=0 and both DD1 and DD2 need rescaling, the first
scaling loop transitions DFLAG from 0 to -1 and correctly
scales DH11 and DH12. But the second scaling loop then hits
the ELSE branch (matching DFLAG=-1) which unconditionally
resets DH21=-1 and DH12=1, overwriting the scaled DH12.

Change ELSE to ELSE IF (DFLAG.EQ.ONE) so the implied-element
initialization (DH21=-1, DH12=1) only fires when DFLAG=1,
not when DFLAG=-1 (where all elements are already explicit).

Fixes #244
2026-06-11 15:05:19 +02:00
Julien Schueller 526a4fbbd3 Fix mislabeled comments in dget38.f
Two comments in the DGEHRD/DHSEQR test incorrectly say "Compute
Schur form":
- The DGEHRD call reduces to upper Hessenberg form, not Schur.
- The DHSEQR call computes eigenvalues and the Schur form, so
  use a more descriptive label.

Fixes #587
2026-06-11 15:05:19 +02:00
Julien Schueller 3d668fe93f LAPACKE: Make LDU/LDVT checks in GESVD conditional on JOBU/JOBVT
When JOBU='N' or JOBVT='N', the U and VT matrices are not referenced,
so the leading dimension checks should be skipped.  Previously the
code rejected ldvt=0 (and ldu=0) even when those matrices were not
used, causing a spurious INFO=12 error on row-major calls with
JOBVT='N' (or INFO=10 for JOBU='N').

Fixes #1090
2026-06-11 14:39:38 +02:00
Julien Schueller fd16118505 cblas_ctrmm: fix error check
Closes #1188
2026-06-11 14:39:38 +02:00
Julien Schueller 7a721b3fac lapacke: fix memory allocation on error 2026-06-11 14:39:38 +02:00
Julien Schueller d296703051 lapacke_zgedmdq: fix routine name 2026-06-11 14:39:38 +02:00
Julien Schueller 8a43b6869a cblas_zgemmtr: Fix routine name 2026-06-11 14:39:38 +02:00
Julien Schueller ea7f51048f cblas_dgemmtr: Fix syntax error 2026-06-11 14:39:38 +02:00
langou 54b6620d27 Merge pull request #1264 from AymenQ/fix-complex-nrm2-inf-test
Fix complex NRM2 tests for matching infinite results
2026-06-11 04:15:19 -06:00
langou a66e2a37c4 Merge pull request #1252 from scr2016/refactor-github-workflow-file-cmake_yml--config
in .github/workflows/cmake.yml, removed redundant '--config ${{env.BUILD_TYPE}}' from 'cmake --build build'
2026-06-01 00:25:52 -06:00
langou 7e4e6bf07e Merge pull request #1039 from haox1/stebz
Fixes of STEBZ
2026-05-24 09:08:06 -06:00
langou 8515a319e7 Merge pull request #1283 from sergey-v-kuznetsov/fixes_for_issue-1282
Fixes for LAPACK test crashes -ffpe-trap
2026-05-21 03:08:53 -06:00
sergey-v-kuznetsov 40abea27f7 Fixes for LAPACK test crashes -ffpe-trap 2026-05-20 15:41:08 -07:00
Simon Maertens c0e868327e Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64 2026-05-13 14:03:03 +02:00
langou 67c7c8ac05 Merge pull request #1274 from kyungminlee/fix-sggev3-query
Gate SGGEV3 workspace query on ILV, not ILVL
2026-05-11 07:54:43 -06:00
langou e014d6ce59 Merge pull request #1275 from kyungminlee/fix-dlaswlq-nb
Reject NB=0 in DLASWLQ argument validation
2026-05-11 07:38:43 -06:00
Kyungmin Lee 971961bd21 Gate SGGEV3 workspace query on ILV, not ILVL
The actual SLAQZ0 call uses 'S' when ILV is true and 'E' otherwise,
but the query gated that choice on ILVL, undersizing LWORK for
JOBVL='N', JOBVR='V'. Mirror DGGEV3: gate SLAQZ0 and SGGHD3 on ILV,
SORGQR on ILVL.
2026-05-11 04:58:16 -07:00
Kyungmin Lee f51069fa5e Reject NB=0 in DLASWLQ argument validation
DLASWLQ tested NB.LT.0 instead of NB.LE.0, accepting NB=0 silently and
falling into the divide-by-(NB-M) path on line 255 (KK = MOD((N-M),(NB-M)))
when M=0. The single/complex/double-complex siblings all use NB.LE.0.
2026-05-11 04:38:33 -07:00
langou 5da5348aa0 Merge pull request #1242 from nakatamaho/cleanup/con-lsame-norm
SRC: use LSAME for NORM checks in condition routines
2026-05-11 04:45:26 -06:00
langou 382c275cb1 Merge pull request #1273 from kyungminlee/fix-laqz0-xerbla-sign
Fix XERBLA sign in ?LAQZ0 LWORK check
2026-05-11 01:59:23 -06:00
langou a2303521f8 Merge pull request #1272 from kyungminlee/fix-info-position-drift
Fix INFO=-N in argument-validation
2026-05-11 01:59:04 -06:00
langou 6e881c3dce Merge pull request #1271 from kyungminlee/fix-stale-externals
Fix stale externals and documentation typo
2026-05-11 01:58:31 -06:00
langou 6d7772085a Merge pull request #1270 from kyungminlee/fix-dgejsv-lwork
Fix workspace size argument in DGEJSV inner DGESVJ call
2026-05-11 01:57:58 -06:00
langou 62b2396d7b Merge pull request #1269 from kyungminlee/fix-sgejsv-joba
Fix JOBA argument in SGEJSV inner SGESVJ call (LSVEC && RSVEC branch)
2026-05-11 01:12:32 -06:00
Kyungmin LeeandClaude Opus 4.7 b172f0b839 Fix XERBLA sign in ?LAQZ0 LWORK check
The argument-validation block at the top of ?LAQZ0 sets INFO=-i and
correctly calls XERBLA(name, -INFO), but the second validation block
(LWORK .LT. LWORKREQ) calls XERBLA(name, INFO) with the negative
value. XERBLA prints its argument verbatim, so this would emit
"parameter number -18 had an illegal value" instead of "18".

Affects S/D/C/Z LAQZ0; ?LAQZ2 and the rest of LAPACK already use
the correct -INFO form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 04:43:38 -07:00
Kyungmin LeeandClaude Opus 4.7 34fffb77e7 Fix INFO=-N in argument-validation
INFO=-N value reported to XERBLA on a too-small workspace
(or LRWORK) does not match the actual signature position of the
argument being tested.

Sites:
- ?ORBDB4 / ?UNBDB4: LWORK test reported -14 (WORK), should be -15.
- ?GGSVD3: LWORK.LT.1 test reported -24 (the INFO arg in S/D;
  IWORK in C/Z), should be -22 (LWORK).
- ?ORCSD / ?UNCSD: LWORK test reported -22 (LDU2), should be -28
  (LWORK). Z/C also report LRWORK as -24 (LDV1T), should be -30.
- C/ZLAQZ0: LWORK test reported -19 (RWORK), should be -18.
  (S/DLAQZ0 use ALPHAR+ALPHAI instead of ALPHA, so LWORK is at
  position 19 there and -19 is already correct.)
- C/ZLAQZ2: LWORK test reported -26 (RWORK), should be -25.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 04:39:07 -07:00
Kyungmin Lee effffd0f9a Add SGGES XERBLA EXTERNAL and fix ZRSCL doc-header typo
SGGES body calls XERBLA at line 423 but the EXTERNAL block omits it;
DGGES correctly lists XERBLA. Add it.

ZRSCL's Doxygen header advertised the routine as ZDRSCL (which is a
different routine that ZRSCL calls internally). Fix the brief, the
download links, and the filename references so the generated docs
correspond to ZRSCL.
2026-05-09 04:08:29 -07:00
Kyungmin Lee 12711abd19 Fix stale / missing EXTERNAL declarations in 6 routines
- dlaqp2.f:171: replace stale DLARF with DLARF1F
  (body calls DLARF1F; slaqp2 already declares SLARF1F).
- zhetrf_aa.f:166: drop stale ZGEMV
  (body calls only ZGEMM; chetrf_aa correctly omits CGEMV).
- zlahef_aa.f:173: drop stale ZGEMM
  (body calls only ZGEMV; clahef_aa correctly omits CGEMM).
- slaqr2.f:314: replace stale SLARF1L with SLARF1F
  (body calls SLARF1F).
- sgelqt.f:147: drop stale SGEQRT2 and SGEQRT3
  (body calls only SGELQT3 and SLARFB).
2026-05-09 04:07:17 -07:00
Kyungmin Lee 151acca477 Fix JOBA argument in SGEJSV inner SGESVJ call (LSVEC && RSVEC branch)
In the LSVEC && RSVEC branch of SGEJSV, the IF arm fills the strict
upper triangle of U with U(p,q) = -SIGN(TEMP1, U(q,p)) while the
ELSE arm zeros it via SLASET('U', ...). Both arms then call SGESVJ
on U with JOBA='L', which tells SGESVJ that U is lower triangular
and the strict upper is zero. After the IF arm that is not true:
SGESVJ silently drops the upper-triangular data the IF arm just
deposited, biasing the SVD result. JOBA='G' (general) is correct
for both arms; DGEJSV already uses 'G' at the matching call site.
2026-05-09 03:55:34 -07:00
Kyungmin Lee 4543266101 Fix workspace size argument in DGEJSV inner DGESVJ call
In the RSVEC && !LSVEC && !ALMORT branch of DGEJSV, the inner DGESVJ
call passes WORK(N+1) as the workspace base (offset by N) but the
full LWORK as the workspace size. DGESVJ may then write up to N
entries past the end of WORK(LWORK). The float sibling SGEJSV
correctly passes LWORK-N at the same call site.
2026-05-09 03:55:18 -07:00
langou fd5303c002 Merge pull request #1268 from kyungminlee/fix-typo
Fix typo in ZLA_SYRFSX_EXTENDED
2026-05-08 03:50:59 -06:00
langou ceb69d600f Merge pull request #1267 from kyungminlee/fix-max
Remove unused intrinsic MAX
2026-05-08 03:50:28 -06:00
langou ea1b145b04 Merge pull request #1266 from kyungminlee/master
Remove unused parameter ONE
2026-05-08 03:48:01 -06:00
Kyungmin Lee ead2f6c8b3 Fix typo in ZLA_SYRFSX_EXTENDED
XERBLA reports ZLA_HERFSX_EXTENDED. Fix the routine name
2026-05-07 21:35:54 -07:00
Kyungmin Lee f038bec2de Remove unused intrinsic MAX
Contrary to their single precision counterparts,
DLANSF and ZLANHT declare MAX intrinsic which is not used.
2026-05-07 21:30:03 -07:00
Kyungmin Lee e830eed287 Remove unused parameter ONE
There are a number of places on the double precision half with
unused parameter ONE.
2026-05-07 21:23:25 -07:00
langou d6b82864ed Merge pull request #1265 from kyungminlee/master
Fix typo in ?orbdb3/?unbdb3
2026-05-07 05:39:30 -06:00
Kyungmin Lee eed4e74fcb Fix typo in ?orbdb3/?unbdb3
Bug: In ?ROT call LDX11 is passed as the leading dimension of X21.

Fix: use LDX21 as the INCY argument, matching how X21 is addressed
everywhere else in the same loop body.
2026-05-06 20:39:24 -07:00
Aymen Qader 6af853258b Fix complex NRM2 tests for matching infinite results
The extended complex NRM2 tests can compare an expected +Inf norm with
a computed +Inf norm. The relative-error path then evaluates Inf - Inf,
producing NaN and reporting a spurious failure.

Treat exactly equal results as zero test ratio before computing the
relative difference. This matches the existing SNRM2 and DNRM2 test
logic.

Fixes #1047.
2026-05-06 11:29:34 +01:00