aboutsummaryrefslogtreecommitdiff
path: root/SRC/zlalsd.f
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2010-06-24 14:38:30 +0000
committerjulie <julielangou@users.noreply.github.com>2010-06-24 14:38:30 +0000
commit82f05f2dd3e11ff479cfba13b5e5f0e80249abb3 (patch)
tree15d102d9b6bbfc062f92e0205603b2c9ca9628ee /SRC/zlalsd.f
parentef920e099dd173ef2fe241cbc452530bd4e0a06e (diff)
Fix Bug0059
bug report and fix sent by Alexander Kobotov (Intel) on Wed, 23 June 2010 to "lapack@cs.utk.edu". ZGELSD crashes on large matrices (eq M=N=NHRS>=88), if real workspace allocated exactly as reported on workspace query. Root cause is wrong estimation of real workspace size in ZLALSA (on path zgelsd->zlalsd->zlalsa). It assumes that RWORK array length should be max( N, (SMLSZ+1)*NRHS*3 ), where SMLSIZ=25. But in fact the function calls zlals0 which requires RWORK to be ( K*(1+NRHS) + 2*NRHS ), where K could be as large as number of columns in matrix A. The same is actual for CGELSD.
Diffstat (limited to 'SRC/zlalsd.f')
-rw-r--r--SRC/zlalsd.f3
1 files changed, 2 insertions, 1 deletions
diff --git a/SRC/zlalsd.f b/SRC/zlalsd.f
index a9182f6d..24594c79 100644
--- a/SRC/zlalsd.f
+++ b/SRC/zlalsd.f
@@ -89,7 +89,8 @@
* (N * NRHS).
*
* RWORK (workspace) DOUBLE PRECISION array, dimension at least
-* (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS + (SMLSIZ+1)**2),
+* (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
* where
* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
*