From 82f05f2dd3e11ff479cfba13b5e5f0e80249abb3 Mon Sep 17 00:00:00 2001 From: julie Date: Thu, 24 Jun 2010 14:38:30 +0000 Subject: 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. --- SRC/zlalsa.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SRC/zlalsa.f') diff --git a/SRC/zlalsa.f b/SRC/zlalsa.f index e41be325..41ff70d6 100644 --- a/SRC/zlalsa.f +++ b/SRC/zlalsa.f @@ -137,7 +137,7 @@ * the right null space of the I-th subproblem. * * RWORK (workspace) DOUBLE PRECISION array, dimension at least -* max ( N, (SMLSZ+1)*NRHS*3 ). +* MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ). * * IWORK (workspace) INTEGER array. * The dimension must be at least 3 * N -- cgit v1.2.3