julie [Fri, 29 Apr 2016 02:47:17 +0000 (02:47 +0000)]
Fix CUNCSD: Illegal use of integer for array argument - [Forum 4956, reported by nathanw]
In the CUNCSD function I saw an illegal use of an integer for an array argument.
To fix I replaced 0 with U1 in 4th argument of CUNGQR and CUNGLQ to be consistent with ZUNCSD.
SRC/cuncsd.f:491,496
julie [Thu, 28 Apr 2016 05:35:01 +0000 (05:35 +0000)]
From Mark Gates (UTK) - Fix Bug 157 - Various bugs in SVD routines (*gesdd, *gesvd, and *bdsdc).
Items are labelled (a) through (m), omitting (l).
Several are not bugs, just suggestions.
Most bugs are in *gesdd.
There's one bug (g) in *bdsdc. This is the underlying cause of LAPACK bug #111.
There's one bug (m) in [cz]gesvd. I also added an INT() cast in these
assignments to silence compiler warnings. Changed:
LWORK_ZGEQRF=CDUM(1)
to:
LWORK_ZGEQRF = INT( CDUM(1) )
Where possible, I ran a test showing the wrong behavior, then a test showing the
corrected behavior. These use a modified version of the MAGMA SVD tester
(calling LAPACK), because I could adjust the lwork as needed. The last 3 columns
are the lwork type, the lwork size, and the lwork formula. The lwork types are:
doc_old as documented in LAPACK 3.6.
doc as in the attached, updated documentation.
min_old minwrk, as computed in LAPACK 3.6.
min minwrk, as computed in the attached, updated code.
min-1 minimum - 1; this should cause gesdd to return an error.
opt optimal size.
max the maximum size LAPACK will take advantage of;
some cases, the optimal is n*n + work, while the max is m*n + work.
query what gesdd returns for an lwork query; should equal opt or max.
After the lwork, occasionally there is a ! or ? error code indicating:
Error codes: ! error: lwork < min. For (min-1), this ought to appear.
? compatability issue: lwork < min_old, will fail for lapack <= 3.6.
I also tested the update routines on a wide variety of sizes and jobz, with
various lwork.
Besides fixing the bugs below, I made two significant changes.
1) Changed *gesdd from computing each routine's workspace using, e.g.:
N*ilaenv(...)
to querying each routine for its LWORK, e.g.:
CALL ZGEBRD( M, N, CDUM(1), M, CDUM(1), DUM(1), CDUM(1),
$ CDUM(1), CDUM(1), -1, IERR )
LWORK_ZGEBRD_MN = INT( CDUM(1) )
This matches how *gesvd was changed in LAPACK 3.4.0.
2) Changed the Workspace: comments, which were incredibly deceptive.
For instance, in Path 2 before dbdsdc, it said
Workspace: need N + N*N + BDSPAC
since dbdsdc needs the [e] vector, [U] matrix, and bdspac.
However, that ignores that the [tauq, taup] vectors and [R] matrix
are also already allocated, though dbdsdc doesn't need them.
So the workspace needed at that point in the code is actually
Workspace: need N*N [R] + 3*N [e, tauq, taup] + N*N [U] + BDSPAC
For clarity, I added in [brackets] what matrices or vectors were allocated,
and the order reflects their order in memory.
I may do a similar change for *gesvd eventually. The workspace comments in
MAGMA's *gesvd have already been updated as above.
================================================================================
a) Throughout, to simplify equations, let:
mn = min( M, N )
mx = max( M, N )
================================================================================
b) [sdcz]gesdd Path 4 (m >> n, job="all") has wrong minwrk formula in code:
minwrk = bdspac + mn*mn + 2*mn + mx
= 4*mn*mn + 6*mn + mx
This is an overestimate, needlessly rejecting the documented formula:
doc = 4*mn*mn + 7*mn
In complex, the correct min fails, but the doc matches the wrong minwrk.
Solution: fix code to:
minwrk = mn*mn + max( 3*mn + bdspac, mn + mx )
= mn*mn + max( 3*mn*mn + 7*mn, mn + mx )
Test cases:
m=40, ..., 100; n=20; jobz='A'
See bug (d) showing documentation is also wrong.
Also, see bug (i), complex [cz]gesdd should return -12 instead of -13.
================================================================================
bt) transposed case
[sd]gesdd Path 4t (n >> m, job="all") has a different wrong minwrk; see bug (c).
[cz]gesdd Path 4t exhibits same bug as Path 4.
Test cases:
m=20; n=40, ..., 100; jobz='A'
================================================================================
c) [sd]gesdd Path 4t (n >> m, job="all") has wrong minwrk formula in code,
different than bug (b):
minwrk = bdspac + m*m + 3*m
= 4*mn*mn + 7*mn
This formula lacks any dependence on N, so the code will fail (without
setting info; orglq calls xerbla) if N is too large, N > 3*M*M + 6*M.
Bug does not occur in complex.
Test cases:
m=20; n = 1320; jobz='A' ok with documented lwork
m=20; n > 1320; jobz='A' fails with documented lwork
Solution: as in bug (b), fix code to:
minwrk = mn*mn + max( 3*mn + bdspac, mn + mx )
= mn*mn + max( 3*mn*mn + 7*mn, mn + mx )
See bug (d) showing documentation is also wrong.
================================================================================
d) [sd]gesdd documentation lists the same minimum size for jobz='S' and 'A':
If JOBZ = 'S' or 'A', LWORK >= min(M,N)*(7 + 4*min(M,N))
However, jobz='A' actually also depends on max(M,N):
minwrk = mn*mn + max( 3*mn*mn + 7*mn, mn + mx )
This causes the formula to fail for mx > 3*mn*mn + 6*mn.
Test cases:
m > 1320; n = 20; jobz='A' fails with document lwork, even after fixing bugs (b) and (c).
m = 20; n > 1320; jobz='A' fails also.
Solution: in docs, split these two cases. This fix uses an overestimate,
so that codes using it will be backwards compatible with LAPACK <= 3.6.
If JOBZ = 'S', LWORK >= 4*mn*mn + 7*mn.
If JOBZ = 'A', LWORK >= 4*mn*mn + 6*mn + mx.
================================================================================
e) [sd]gesdd, Path 5, jobz='A' has wrong maxwrk formula in the code:
MAXWRK = MAX( MAXWRK, BDSPAC + 3*N )
Should be:
MAXWRK = MAX( WRKBL, BDSPAC + 3*N )
This causes the lwork query to ignore WRKBL, and return the minimum
workspace size, BDSPAC + 3*N, instead of the optimal workspace size.
However, it only affects the result for small sizes where min(M,N) < NB.
Path 5t has the correct maxwrk formula.
Complex is correct for both Path 5 and 5t.
Test case:
Compare lwork query with
M = 30, N = 20, jobz='A', lwork query is 1340
M = 20, N = 30, jobz='A', lwork query is 3260
These should be the same.
Solution: fix code as above.
================================================================================
f) Not a bug, just a suggestion.
The lwork minimum sizes are not actually minimums, and can be larger than
the queried lwork size.
Solution: add a comment:
These are not tight minimums in all cases; see comments inside code.
================================================================================
g) [sd]bdsdc segfaults due to too small workspace size. Its documentation claims:
If COMPQ = 'N' then LWORK >= (4 * N).
Based on this, in zgesdd, the rwork size >= 5*min(M,N).
However, LAPACK bug 111 found that rwork size >= 7*min(M,N) was required.
In dbdsdc, if uplo='L', then it rotates lower bidiagonal to upper bidiagonal,
and saves 2 vectors of Givens rotations in work. It shifts WSTART from
1 to 2*N-1. Then it calls dlasdq( ..., work( wstart ), info ).
As dlasdq requires 4*N, dbdsdc would now require 6*N in this case.
This caused zgesdd to require rwork size >= 7*min(M,N) when N > M and jobz='N'.
My preferred solution is to change WSTART to 1 in the DLASDQ call inside dbdsdc:
IF( ICOMPQ.EQ.0 ) THEN
CALL DLASDQ( 'U', 0, N, 0, 0, 0, D, E, VT, LDVT, U, LDU, U,
$ LDU, WORK( WSTART ), INFO )
GO TO 40
END IF
to:
IF( ICOMPQ.EQ.0 ) THEN
* Ignores WSTART, which is needed only for ICOMPQ = 1 or 2;
* using WSTART would change required workspace to 6*N for uplo='L'.
CALL DLASDQ( 'U', 0, N, 0, 0, 0, D, E, VT, LDVT, U, LDU, U,
$ LDU, WORK( 1 ), INFO )
GO TO 40
END IF
The [cz]gesdd documentation, which was changed to 7*min(M,N) in LAPACK 3.6,
may be reverted to 5*min(M,N), if desired.
================================================================================
h) [sd]gesdd for jobz='N' requires bdspac = 7*n for the dbdsdc workspace.
However, dbdsdc requires only 4*n, or 6*n before fixing bug (g).
For backwards compatability, I did not change the code, but added a comment
for clarification.
================================================================================
i) [cz]gesdd returns info = -13 instead of info = -12 for lwork errors.
================================================================================
j) In zgesdd, for computing maxwrk, these paths:
Path 6, jobz=A
Path 6t, jobz=S
Path 6t, jobz=A
query ilaenv( 1, zungbr, ... )
when the code actually calls zunmbr (twice). I corrected it.
================================================================================
k) In zgesdd documentation, currently
lrwork >= max( 5*mn*mn + 7*mn, 2*mx*mn + 2*mn*mn + mn )
It doesn't need that much, particularly for (mx >> mn) case.
If (mx >> mn), lrwork >= 5*mn*mn + 5*mn;
else, lrwork >= max( 5*mn*mn + 5*mn,
2*mx*mn + 2*mn*mn + mn ).
I changed this in the documentation. Feel free to revert if you prefer.
================================================================================
m) [cz]gesvd, Path 10 and 10t, have minwrk inside the wrong conditional:
IF( .NOT.WNTVN ) THEN
MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_P )
MINWRK = 2*N + M
END IF
So Path 10 with jobvt='N', and Path 10t with jobu='N', have minwrk = 1,
so an invalid lwork is not correctly rejected.
================================================================================
mt) transposed case
broken: with old routine, Path 10t with jobu='N' doesn't enforce minwrk
langou [Fri, 1 Apr 2016 22:34:10 +0000 (22:34 +0000)]
See post on forum on Thu Mar 31, 2016:
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4937
Thanks to Eugene Chereshnev (Intel)
langou [Fri, 1 Apr 2016 21:59:59 +0000 (21:59 +0000)]
( some spaces removed )
langou [Tue, 15 Mar 2016 03:06:50 +0000 (03:06 +0000)]
Email from Tim Hopkins (University of Kent), March 13th (item #4)
Used A(1,1) and T(1,1) in call to *LARFG (around line 177)
to make arguments 2 and 5 scalars rather than 2d-arrays.
langou [Mon, 14 Mar 2016 20:23:03 +0000 (20:23 +0000)]
Email from Tim Hopkins (University of Kent), March 13th (1/11)
The work array, RWORK, is declared COMPLEX, it should be REAL.
julie [Wed, 2 Mar 2016 04:00:38 +0000 (04:00 +0000)]
Fix for pkgconfig files lapack.pc, blas.pc - PATCH sent by Christoph Conrads on March 1st 2016
julie [Fri, 26 Feb 2016 15:08:55 +0000 (15:08 +0000)]
lapacke.h remove extra comma (one more)
julie [Fri, 26 Feb 2016 06:05:04 +0000 (06:05 +0000)]
remove extra comma
julie [Tue, 23 Feb 2016 06:12:17 +0000 (06:12 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 42/42] Fix lapacke_?tprfb - avoid nancheck of unset data
---> LAST ONE!!!
julie [Tue, 23 Feb 2016 06:11:24 +0000 (06:11 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 41/42] Fix lapacke_?tpmqrt - avoid nancheck of unset data
julie [Tue, 23 Feb 2016 06:10:54 +0000 (06:10 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 40/42] Fix lapacke_?steqr - avoid nancheck of z when compz=='i'
julie [Tue, 23 Feb 2016 06:09:49 +0000 (06:09 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 39/42] Fix lapacke_?hetri2x - avoid nancheck of unset data
julie [Tue, 23 Feb 2016 06:09:01 +0000 (06:09 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 38/42] Fix lapacke_???swapr* - missing parameter lda, and more
- lda should not be missed
- a has leading dimension lda, not n
- a_t has leading dimension lda_t, not n
julie [Tue, 23 Feb 2016 06:03:59 +0000 (06:03 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 37/42] Fix lapacke_?gemqrt - avoid nancheck of unset data
julie [Tue, 23 Feb 2016 06:02:47 +0000 (06:02 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Part of [PATCH 36/42]
- nancheck of input shall cover n-by-n, not lda-by-n
julie [Tue, 23 Feb 2016 05:59:45 +0000 (05:59 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
!!! NOT APPLYING PATCH [PATCH 36/42] !!! Fix lapacke_?syconv - parameter work is not part of hi-level interface
See revision 1609 | langou | 2015-10-28 22:06:14 -0700 (Wed, 28 Oct 2015)
"In ?syconv, replace the variable name WORK by the variable name E. E is the
standard way to name the supdiagonal/subdiagonal of a symmetric tridiagonal
matrix. Also, E (previously WORK) is of size N-1, not N. So correct this in
the comment."
Updated LAPACKE with new parameter name.
julie [Tue, 23 Feb 2016 05:46:46 +0000 (05:46 +0000)]
[PATCH 35/42] Fix lapacke_ilaver - [out] parameters shall be not const
julie [Tue, 23 Feb 2016 05:46:10 +0000 (05:46 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 34/42] Fix lapacke_?sytri2 - work is real, not complex
julie [Tue, 23 Feb 2016 05:45:11 +0000 (05:45 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 33/42] Fix lapacke_?bdsvdx - vl,vu are real; ns must be passed by ref
- vl and vu are real kind
- ns is [out] and must be passed by reference
- lwork must be at least 1
- e is n-1 array
- ldz should be compared to ncols_z for r-major case
julie [Tue, 23 Feb 2016 05:43:51 +0000 (05:43 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 32/42] Fix lapacke_?{un,or}csd2by1 - theta is real, and use ld*_t
- theta is real, not complex
- use ld*_t for calling LAPACK in row-major case, not ld*
julie [Tue, 23 Feb 2016 05:42:48 +0000 (05:42 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 31/42] Fix lapacke_?tprfb - parameter work is not 'const'
julie [Tue, 23 Feb 2016 05:42:09 +0000 (05:42 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 30/42] Fix lapacke_?lascl - bugs and NaN checks
- nancheck content, not padding (e.g. M-by-N, not LDA-by-N)
- types L, U: use ?gb_nancheck(m,n), not ?tr_nancheck(n)
- type H: use ?gb_nancheck(m,n), not ?hs_nancheck(n)
- type Z: use ?gb_nancheck correctly, do not check unset data
- type Z: M-by-N should be checked
- type Z: A is 9th parameter
- nrows_a is needed for correct transposition
- info from LAPACK should be respected
julie [Tue, 23 Feb 2016 05:40:53 +0000 (05:40 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 29/42] Fix lapacke_?gb_nancheck - misuse of leading dimension as matrix size
julie [Tue, 23 Feb 2016 05:40:02 +0000 (05:40 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 28/42] Fix lapacke_?gesvj - correct eval of nrows_v
julie [Tue, 23 Feb 2016 05:39:23 +0000 (05:39 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 27/42] Fix lapacke_?gesvdx* - NS is reference; VU, VL are real; ...
- NS must be passed by ref
- VU and VL shall be real, not integer
- LWORK must be at least 1, even for N=0
- correct allocation of WORK, JOBU/JOBVT cannot be 'A' or 'S'
- nrows/ncols = max(...,0), zero is possible, negatives are not
fixup lapacke_?gesvdx
julie [Tue, 23 Feb 2016 05:37:59 +0000 (05:37 +0000)]
[PATCH 26/42] Fix lapacke_?gejsv* correct computation of lwork.
ISSUE: gejsv needs LQUERY
- lrwork must be max(7,...) per documentation
- iwork must be at least 3 long, and m+2n/m+3n for c/r kinds
- lwork is computed incorrectly by the init expr.
ISSUE: ?gejsv shall implement LQUERY
- bug: rwork should be followed by lrwork, not by lwork
- bug r-major case shall compare ldu vs ncols_u, not vs n
- lwork for want_u && want_v must not depend on joba, jobt
julie [Tue, 23 Feb 2016 05:36:56 +0000 (05:36 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 25/42] Fix lapacke_?gejsv - do not transpose U,V on input
- U,V are [out], so no need to transpose on input
julie [Tue, 23 Feb 2016 05:35:56 +0000 (05:35 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 24/42] Fix lapacke_?gejsv - remove NaN check of U,V
- U,V are [out] and should not be checked for NaNs
julie [Tue, 23 Feb 2016 05:33:18 +0000 (05:33 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 23/42] Fix lapacke_zgghd3: Use LAPACK_Z2INT, not C2INT
julie [Tue, 23 Feb 2016 05:32:46 +0000 (05:32 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 22/42] Fix lapacke_?ggsvp3_work: V is p-by-p
julie [Tue, 23 Feb 2016 05:31:59 +0000 (05:31 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 21/42] Fix ?GEESX documentation - typo in description of SELECT
julie [Tue, 23 Feb 2016 05:31:10 +0000 (05:31 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 20/42] Fix ?BBCSD documentation - parameters U1, LDU1, etc
julie [Tue, 23 Feb 2016 05:30:24 +0000 (05:30 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 19/42] Fix ?GBRFSX - do not proceed if INFO.NE.0 after ?GBCON
- and fix description of B and BERR in ZGBRFSX
julie [Tue, 23 Feb 2016 05:29:31 +0000 (05:29 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 18/42] Fix ?HGEQZ documentation - use of Q depends on COMPQ, not on COMPZ
julie [Tue, 23 Feb 2016 05:28:28 +0000 (05:28 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 17/42] Fix {C,Z}LAROR documentation to not corrupt doxygen output
julie [Tue, 23 Feb 2016 05:27:45 +0000 (05:27 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 15/42] Fix CLA_PORCOND_C documentation: C is REAL vector, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:27:07 +0000 (05:27 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 14/42] Fix CPOTRF2 documentation: A is COMPLEX, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:26:28 +0000 (05:26 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 13/42] Fix {C,S}GBEQUB documentation: AB is {COMPLEX,REAL}, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:24:31 +0000 (05:24 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 12/42] Fix SGBRFSX documentation: AB, AFB are REAL, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:23:49 +0000 (05:23 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 11/42] Fix SLARRC documentation: VL,VU,D,E are REAL, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:21:24 +0000 (05:21 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 09/42] Fix SGGSVP3 documentation - WORK should be REAL, not DOUBLE PRECISION
julie [Tue, 23 Feb 2016 05:18:01 +0000 (05:18 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 08/42] Fix ?BDSVDX: E is N-1 array; do not access Z when
JOBZ.EQ.'N'
- Bug setting E(N): E is N-1 array
- Do not access Z when JOBZ.EQ.'n'
- Typos in documentation
julie [Tue, 23 Feb 2016 05:14:47 +0000 (05:14 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 07/42] Fix ?GESVJ - use DLASCL for SVA, not ZLASCL
- Also list real kind ?LASCL as EXTERNAL
julie [Tue, 23 Feb 2016 05:12:12 +0000 (05:12 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 06/42] Fix ???CSD2BY1 - workspace query should not pass bad LD to ???GQR/GLQ
julie [Tue, 23 Feb 2016 05:09:48 +0000 (05:09 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 05/42] Fix ?LASCL2, ?LARSCL, ?LASCL documentation - correctly describe LDX
julie [Tue, 23 Feb 2016 05:05:07 +0000 (05:05 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 04/42] Fix ?{HE,SY}TRF_ROOK - LQUERY shall return LWORK at least 1
julie [Tue, 23 Feb 2016 05:02:09 +0000 (05:02 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 03/42] Fix ?GGHD3: LQUERY with N=0 shall return 1, not 0
julie [Tue, 23 Feb 2016 05:00:21 +0000 (05:00 +0000)]
Adjust line length on previous commit
julie [Tue, 23 Feb 2016 04:54:53 +0000 (04:54 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 02/42] Fix ?DESVDX: do not fill U/VT beyond NS, and other
changes
- Typos and comments corrupting doxygen output
- LDVT.LT.MINMN may be acceptable when RANGE=='i'
- Bug: do not fill U and VT beyond NS
- Typo in comment: A is COMPLEX*16 for ZGESVDX
julie [Tue, 23 Feb 2016 04:51:38 +0000 (04:51 +0000)]
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
Subject: [PATCH 01/42] Fix ?GEJSV: handle M=N=0 case correctly, amend
documentation. ISSUE: need LQUERY
- Complex kind functions operate on complex matrices
- JOBA cannot be 'N', and we have no parameter named JOBE
- Typos like CGEJSV uses CUNMQR, not SUNMQR
- Case M=0 N=0 shall zero IWORK(1:3) and WORK(1:7) anyway (F90 syntax!)
- Comments fixed to not corrupt doxygen output
- Missing fill of IWORK(3) = 0
- Math is written from capital letter :-)
- Typos like use ZGELQF, not ZGELQ
julie [Thu, 11 Feb 2016 03:43:31 +0000 (03:43 +0000)]
Fix bug 155 reported by lawrence mulholland on Jan 27th 2016 on LAPACK Forum
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4892
lines 908 and 1129:
OMPQ = AAPQ / ABS(AAPQ)
need to move inside IF( ROTOK ) THEN block
that is, after lines 926 and 1142 respectively.
The variable OMPQ is only used inside these blocks and can, when rotation is unsafe,
overflow when evaluated.
julie [Thu, 11 Feb 2016 03:01:43 +0000 (03:01 +0000)]
Applied patch provided by Dmitry Baksheev from Intel on Feb 9th 2016 on LAPACK Forum
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4902&p=11774
Issue: ?TGSEN use of array SELECT on workspace query may SEGV
Solution: Skip use of array SELECT on workspace query
Make sense...
julie [Fri, 5 Feb 2016 03:01:39 +0000 (03:01 +0000)]
Following post on Forum by Dmitry Baksheev (Intel) improved documentation for ?gejsv
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4896
lawrence.mulholland [Wed, 27 Jan 2016 17:24:52 +0000 (17:24 +0000)]
protect calls with args n-1, a(2,1) against n=1 case
langou [Tue, 26 Jan 2016 18:29:16 +0000 (18:29 +0000)]
Email from Edward Smyth from NAG. (Thanks Ed!)
In calls to {D,S}BDSVDX in the test programs {d,s}chkbd.f, insufficient space
may be provided for the array Z i.e. WORK(IWBZ). The correction is to change
IWWORK = IWBZ + MNMIN*(MNMIN*2+1)
to
IWWORK = IWBZ + 2*MNMIN*(MNMIN+1)
on line 1146 in both files.
langou [Tue, 26 Jan 2016 18:24:57 +0000 (18:24 +0000)]
Replace DFLOAT by DBLE in ZGSVJ0, ZGESVJ, and ZGSVJ1. Thanks to Edward Smyth
from NAG for fixing this.
Email from Ed: Several LAPACK 3.6.0 routines use the intrinsic DFLOAT which is
non-standard and thus causes problems with some compilers. Could you change
these references to DBLE please?
Julien.
julie [Tue, 26 Jan 2016 04:00:31 +0000 (04:00 +0000)]
Updating Intel Compiler flag for CMAKE build according to rev 1681
langou [Mon, 25 Jan 2016 16:00:32 +0000 (16:00 +0000)]
Change the default compilation flags for the Intel Fortran compiler.
The LAPACK TESTING should run error free with these settings.
Previously were:
OPTS = -O3
NOOPT = -O3 -fltconsistency -fp_port
Now are:
OPTS = -O3 -fp-model strict
NOOPT = -O0 -fp-model strict
Thanks to Viswanathan Elumalai the University of Pittsburgh for reporting the
problem, Jason Riedy for suggesting to use the flags "fp-model strict" and Osni
Marques for playing with a lots of flag combinations!
julie [Wed, 20 Jan 2016 15:45:15 +0000 (15:45 +0000)]
Adding support to Compaq Compiler on Windows - Contribution from Davis Vowles sent on jan 20th 2016
julie [Tue, 19 Jan 2016 05:05:15 +0000 (05:05 +0000)]
Commit David fix - sent on Jan 16th 2016 directly
Confirmed by Julie on Jan 18th 2016
Note: issue (1) was fixed in previous commit
Message from David
(1) Line 147 of SRC/zgetrf2.f contains the following code:
EXTERNAL ZGEMM, ZSCAL, ZLASWP, ZTRSM, ZERBLA
Inspection of the zgetrf2.f code suggests that ZERBLA on line 147 should in fact be replaced by XERBLA.
--> [JULIE] This was fixed in our SVN on Dec 7th, 2015, revision 1664
(2) Lines 444 to 447 of TESTING\EIG\cdrvbd.f contains the following code:
EXTERNAL ALASVM, XERBLA, CBDT01, CBDT05, CGESDD, CGESVD,
$ CGESVJ, CGEJSV, CGESVDX, CLACPY, CLASET, CLATMS,
$ CUNT01, CUNT03
Since the length of line 445 is 73 characters the comma at the end of that line is truncated and a symbol CLATMSCUNT01 is erroneously defined. Then during linking an error is generated because this erroneously defined symbol cannot be found.
** Recommendation ** The developers reformat all code to ensure strict adherence to the standard 72 column formatting of fixed format source files. As is well known violation of this formatting rule can result in subtle undetected errors.
(3) Similar formatting errors to that in (2) have been detected in:
TESTING\EIG\zdrvbd.f (line 445)
TESTING\EIG\dchkbd.f (line 548)
TESTING\EIG\ddrvbd.f (line 407)
TESTING\EIG\derrbd.f (line 92)
TESTING\EIG\schkbd.f (line 548)
TESTING\EIG\sdrvbd.f (line 407)
TESTING\EIG\serrbd.f (line 92)
(4) Lines 103 to 104 of TESTING\EIG\cerred.f contains the following code:
EXTERNAL CHKXER, CGEES, CGEESX, CGEEV, CGEEVX, CGEJSV
$ CGESDD, CGESVD
There is a comma missing from the end of line 103. This does not result in a compilation error. Rather an invalid symbol CGEJSVCGESDD is defined which ultimately causes an error during linking.
julie [Tue, 19 Jan 2016 04:42:13 +0000 (04:42 +0000)]
Oops..Missing ending bracket in last commit..
julie [Tue, 19 Jan 2016 04:37:26 +0000 (04:37 +0000)]
Commit interface inconsistencies fix proposed by David Vowles on Jan 18th 2016 - sent directly to Julie
Confirmed by Julie on Jan 18th 2016
Routines: [cz]unbdb[1234].f, [SD]ORBDB[1234].f
== First Email from David ==
I have encountered some additional errors when compiling Lapack v3.6.0 with Compaq Visual Fortran. Interestingly, these errors did not occur when compiling with Intel Visual Fortran.
File: “SRC\cunbdb1.f” Lines: 310-312
C = SQRT( SCNRM2( P-I, X11(I+1,I+1), 1, X11(I+1,I+1),
$ 1 )**2 + SCNRM2( M-P-I, X21(I+1,I+1), 1, X21(I+1,I+1),
$ 1 )**2 )
The interface to the BLAS SCNRM2 function is SCNRM2(N,X,INCR) whereas the interfaces to the SCNRM2 function calls in “SRC\cunbdb1.f” are of the form SCNRM2(N, X1, INC1, X2, INC2).
Similar interface inconsistencies are found in the following files:
File: “SRC\cunbdb2.f” Lines: 299-300
File: “SRC\cunbdb3.f” Lines: 299-300
File: “SRC\cunbdb4.f” Lines: 347-349
The above inconsistencies between the interface of the function definition and the function call causes compilation failure of the test-function “xeigtstc.exe”
It is unclear if function calls of the form SCNRM2(N, X1, INC1, X2, INC2) should be replaced by SCNRM2(N, X1, INC1) or if some other correction is required.
== Second Email from David: ==
By the way, I found similar interface inconsistencies in the SRC\cunbdb<n>.f subroutines for <n> = 1 to 4;
and in the SRC\<t>ORBDB<n>.f subroutines for <t> = D and S and <n> = 1 to 4.
A total of 16 subroutines are affected – the four mentioned in my previous email and the twelve mentioned here.
After changing the calls in the affected files from *NRM2(N,X1,INC1,X2,INC2) to *NRM2(N,X1,INC1)
my build for Windows x86 with Compaq Visual Fortran (CVF) completed successfully and all tests passed.
But I do await your verdict as to whether the proposed modification to the function calls is correct.
If I understand correctly STDCALL is the default calling mechanism for the CVF compiler whereas for
the (Intel Visual Fortran) IVF compiler it is the C calling convention. I wonder if this difference
in calling convention explains why the affected test programs compile and link with IVF but fail to link with CVF.
julie [Wed, 13 Jan 2016 03:02:36 +0000 (03:02 +0000)]
Fix typos reported by Elena
julie [Wed, 13 Jan 2016 03:01:05 +0000 (03:01 +0000)]
Fix typos reported by Elena
julie [Wed, 13 Jan 2016 02:48:53 +0000 (02:48 +0000)]
fixing typo reported by Elena Ivanova (Oracle) to Julie on Jan 11th 2016
julie [Tue, 12 Jan 2016 05:37:08 +0000 (05:37 +0000)]
Committing Christoph Conrads patch sent on Jan 11th on LAPACK Mailing List
From Christoph:
after the changes of the Doxygen config file in SVN revisions 1625
and 1626, routines are grouped together in the documentation, e.g., all
eigenvalue solvers for symmetric matrices in double precision.
Currently, the documentation for all routines in one group is put on
the same HTML page. I find this confusing and it slows my browser.
If every function has its own HTML page, then you can jump to the top
of the page by pressing POS1 to see the function arguments and their
description. Also you can jump to the bottom of the page with END to
see the callgraph of the respective function.
The patch in the attachment enables the SEPARATE_MEMBER_PAGES option
that puts each function documentation on its own HTML page. Please
consider applying this patch.
julie [Fri, 8 Jan 2016 03:07:42 +0000 (03:07 +0000)]
Committing Sébastien Villemot patches (5) sent on Jan 6th 2016 to LAPACK Mailing list
From Sébastien Villemot:
I attach to this message 5 patches that are currently applied to the
Debian package for LAPACK, and that I think could be usefully merged in
the LAPACK SVN tree.
The patches include fixes for old outstanding bugs in the CBLAS test
programs, fixes for the build system, and fixes for various typos.
Each patch file contains a more detailed description of its purpose.
langou [Tue, 5 Jan 2016 02:25:35 +0000 (02:25 +0000)]
( remove unused COMPLEX*16 variable T )
( see email from Berend Hasselman on 01/04/2016 )
langou [Thu, 17 Dec 2015 16:58:03 +0000 (16:58 +0000)]
From Eugene Chereshnev, see: icl.cs.utk.edu/lapack-forum/posting.php?t=4867
langou [Thu, 10 Dec 2015 03:08:12 +0000 (03:08 +0000)]
Patch from Andreas Noack (MIT).
The code for DGEEV was checking the INFO parameter returned by DHSEQR as
IF( INFO.GT.0 )THEN "QUIT"
Andreas proposed to check
IF( INFO.NE.0 )THEN "QUIT"
I am fine with the modification. Not terribly excited but fine.
There is really no reason for the case ( INFO.LT.0 ) to happen, so we should
not have to deal with this case. If this happen, it is really a bug and we
should be notified. But, at this point, why not.
I applied the proposed patch to xGEEV and xGEEVX.
Julien.
langou [Thu, 10 Dec 2015 02:52:46 +0000 (02:52 +0000)]
Bug reported by Tracey Brendan. Thanks Tracey.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4863
langou [Thu, 10 Dec 2015 02:42:34 +0000 (02:42 +0000)]
Bug reported by Tracey Brendan. Thanks Tracey.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4862
luszczek [Thu, 10 Dec 2015 00:19:18 +0000 (00:19 +0000)]
Fix comment to match the code.
julie [Tue, 8 Dec 2015 06:48:18 +0000 (06:48 +0000)]
Moving variable declaration up...seems to cause problem with certain compilers..Windows
julie [Tue, 8 Dec 2015 06:40:25 +0000 (06:40 +0000)]
Fix typos in routine declaration
mfaverge [Thu, 3 Dec 2015 18:00:07 +0000 (18:00 +0000)]
Q doesn't need to be set when vect == v, so no need to check for nan
mfaverge [Thu, 3 Dec 2015 17:58:40 +0000 (17:58 +0000)]
Z doesn't need to be set when vect == v, so no need to check for nan
langou [Mon, 30 Nov 2015 03:25:19 +0000 (03:25 +0000)]
oops . . .
this is related to commit r1654.
In commit r1654, I fixed the error parameter in GESVDX to be 17 when LDVT is
invalid, I should also have changed the test suite. Both the code and the test
suite were incorrect.
Between r1654 and r1659, LAPACK error testing were returning 4 errors because
of this.
Fixed.
Julien.
langou [Mon, 30 Nov 2015 03:13:55 +0000 (03:13 +0000)]
address bug comment from Martin Köhler ( Max Planck Institute for Dynamics of Complex Technical Systems )
sent to lapack mailing list on Nov 29th at 7:26pm: "Bug in xGETC2"
email of Martin Köhler below
(1) add a quick return for N=0
(2) add a quick return for N=1
(3) no one reviewed this fix, feel free to comment
Dear LAPACK people,
I found a bug concerning the following function:
The xGETC2 is the level-2 BLAS implementation of an LU decomposition
with complete pivoting. Thereby, a "comparison depending on an
uninitialized value" appears if the input is an one-by-one matrix.
Namely the code in line 202 (LAPACK 3.5.0):
IF( ABS( A( N, N ) ).LT.SMIN ) THEN
accesses SMIN which is set in the previous DO loop. This loop is
only called if N > 1 and so SMIN is not set to a well defined value
if N = 1. But the documentation claims that all matrix N>=0 are
allowed. Furthermore if calling with N = 0 the quick return
statement is missing and the evaluation of ABS(A(N,N)) then yields
an out-of-bound memory violation.
These bug affect the real and the double precision code as well
as their complex counterparts from LAPACK 3.0 up to the current
LAPACK 3.6.
regards,
Martin Köhler
langou [Mon, 30 Nov 2015 02:45:36 +0000 (02:45 +0000)]
minor: use of TABS instead of SPACES in one line of these two files
mfaverge [Wed, 25 Nov 2015 14:37:14 +0000 (14:37 +0000)]
Fix bug on [sd]lantr which don't report the result
langou [Sun, 22 Nov 2015 20:36:04 +0000 (20:36 +0000)]
oops, change some C to Z in the Z routines
langou [Sun, 22 Nov 2015 20:34:02 +0000 (20:34 +0000)]
Correct workspace computation for [CZ]GESVDX when a workspace query is done
This is a bug report and a bug fix from Lawrence Mulholland from NAG.
Thanks Lawrence!
Also add a variable ITEMPR to index the real workspace RWORK as opposed to
using ITEMP. ITEMP is for complex workspace WORK, while ITEMPR is for the real
workspace RWORK. Sounds good.
Thanks Lawrence!
See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4851
langou [Sat, 21 Nov 2015 04:55:02 +0000 (04:55 +0000)]
Correct workspace computation for [s/d]gesvdx.f
See thread: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4850
From Lawrence Mulholland (NAG)
Thanks Lawrence!
langou [Fri, 20 Nov 2015 22:26:43 +0000 (22:26 +0000)]
Correct the INFO parameter value when LVT is not correct. (LDVT is 17th
argument and not 16th.)
Thanks to Lawrence Mulholland from NAG. See:
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4851
julie [Thu, 19 Nov 2015 05:47:49 +0000 (05:47 +0000)]
Commit patch submitted by Orion Poplawski on Nov 18th 2015 on LAPACK mailing List
Fix: properly avoid setting the install rpath when installing to system directories.
julie [Wed, 18 Nov 2015 15:37:25 +0000 (15:37 +0000)]
Fix typo
julie [Wed, 18 Nov 2015 06:04:24 +0000 (06:04 +0000)]
Fix upper case issue in CMakeLists reported by Julien Shueller on Nov 17th to Julie
In CBLAS/CMakeLists.txt:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-version.cmake.in
${LAPACK_BINARY_DIR}/cblas-config-version.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in
${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
The /CMAKE subdirectory should be lowercase, I guess some work on OSX which (still!) has a case-insensitive file-system.
julie [Tue, 17 Nov 2015 05:05:55 +0000 (05:05 +0000)]
Commit fix proposed by Julien Schueller
Sent to LAPACK mailing list on Nov 16th 2015
spotted a minor inconsistency in the lapacke cmake config files install directory location.
in CMakeLists.txt:
install(FILES
${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
${LAPACK_BINARY_DIR}/lapack-config-version.cmake
DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION}
)
in LAPACKE/CMakeLists.txt:
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake
${LAPACK_BINARY_DIR}/lapacke-config-version.cmake
DESTINATION lib/cmake/lapacke-${LAPACK_VERSION}
)
So lapack-config.cmake and lapacke-config-version.cmake could be installed in different directories in cases where CMAKE_INSTALL_LIBDIR is not set to "lib", eg Fedora or RHEL.
I propose to fix LAPACKE/CMakeLists.txt:
sed -i "s|DESTINATION lib/cmake/lapacke|DESTINATION \${LIBRARY_DIR}/cmake/lapacke|g" LAPACKE/CMakeLists.txt
langou [Mon, 16 Nov 2015 23:48:28 +0000 (23:48 +0000)]
Thanks to Lawrence Mulholland from NAG for improving the newly released complex
Jacobi SVD, and thanks to Zlatko Drmac for following so fast and improving the
code. See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4844
for more information about all this. Julien.
langou [Mon, 16 Nov 2015 15:17:44 +0000 (15:17 +0000)]
Mistake in computation of workspace for ZGGEV3. When calling ZHGEQZ the
penultimate argument should be RWORK and not WORK. Easy to fix, not a big big
deal but some compilers might legitimatley complain.
Reported by Pavel Holoborodko on Mon Nov 16 2015. See:
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4796
Thanks Pavel!
Julien.
julie [Sun, 15 Nov 2015 21:29:03 +0000 (21:29 +0000)]
Fix typo
julie [Sun, 15 Nov 2015 21:07:31 +0000 (21:07 +0000)]
Updating Docyfile for manpages
julie [Sun, 15 Nov 2015 21:06:49 +0000 (21:06 +0000)]
Missing parameter definition
julie [Sun, 15 Nov 2015 20:33:40 +0000 (20:33 +0000)]
Updating version number
langou [Sun, 15 Nov 2015 19:19:56 +0000 (19:19 +0000)]
adding the GETRF2 and POTRF2 from LAPACKE to CMAKE
langou [Sun, 15 Nov 2015 19:17:09 +0000 (19:17 +0000)]
adding xGETRF2 to LAPACKE
langou [Sun, 15 Nov 2015 19:03:17 +0000 (19:03 +0000)]
adding xPOTRF2 to LAPACKE
julie [Sun, 15 Nov 2015 18:00:34 +0000 (18:00 +0000)]
adding end bracket...now looks better