From 020611be4a693045d0581baf7369b793a6c67ed3 Mon Sep 17 00:00:00 2001 From: "eugene.chereshnev" Date: Fri, 24 Mar 2017 13:27:10 -0700 Subject: Fix *drvls.f: duplicate loop to make work query for each of test cases Workspace size is not monotonic function of input sizes so there should be loop over all test cases with workspace queries and finding maximum between them. --- TESTING/LIN/cdrvls.f | 109 ++++++++++++++++++++++++++++++++++----------------- TESTING/LIN/ddrvls.f | 93 +++++++++++++++++++++++++++++-------------- TESTING/LIN/sdrvls.f | 93 +++++++++++++++++++++++++++++-------------- TESTING/LIN/zdrvls.f | 109 ++++++++++++++++++++++++++++++++++----------------- 4 files changed, 272 insertions(+), 132 deletions(-) (limited to 'TESTING') diff --git a/TESTING/LIN/cdrvls.f b/TESTING/LIN/cdrvls.f index b9b8e0f4..180e26da 100644 --- a/TESTING/LIN/cdrvls.f +++ b/TESTING/LIN/cdrvls.f @@ -237,9 +237,9 @@ REAL EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - REAL RESULT( NTESTS ), RWORKQUERY - COMPLEX WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + REAL RESULT( NTESTS ), RWQ + COMPLEX WQ * .. * .. Allocatable Arrays .. COMPLEX, ALLOCATABLE :: WORK (:) @@ -324,48 +324,85 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * CQRT14, CQRT17 (two side cases), CQRT15 and CQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LRWORK = 1 + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'C' + END IF +* +* Compute workspace needed for CGELS + CALL CGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_CGELS = INT( WQ ) +* Compute workspace needed for CGETSLS + CALL CGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_CGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for CGELSY + CALL CGELSY( M, N, NRHS, A, LDA, B, LDB, + $ IWQ, RCOND, CRANK, WQ, -1, RWORK, + $ INFO ) + LWORK_CGELSY = INT( WQ ) + LRWORK_CGELSY = 2*N +* Compute workspace needed for CGELSS + CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWORK, INFO ) + LWORK_CGELSS = INT( WQ ) + LRWORK_CGELSS = 5*MNMIN +* Compute workspace needed for CGELSD + CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWQ, IWQ, + $ INFO ) + LWORK_CGELSD = INT( WQ ) + LRWORK_CGELSD = INT( RWQ ) +* Compute LIWORK workspace needed for CGELSY and CGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD + LRWORK = MAX( LRWORK, LRWORK_CGELSY, + $ LRWORK_CGELSS, LRWORK_CGELSD ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_CGELS, LWORK_CGETSLS, + $ LWORK_CGELSY, LWORK_CGELSS, + $ LWORK_CGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for CGELS - CALL CGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_CGELS = INT( WORKQUERY ) -* Compute workspace needed for CGETSLS - CALL CGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_CGETSLS = INT( WORKQUERY ) -* Compute workspace needed for CGELSY - CALL CGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_CGELSY = INT( WORKQUERY ) - LRWORK_CGELSY = 2*N -* Compute workspace needed for CGELSS - CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_CGELSS = INT( WORKQUERY ) - LRWORK_CGELSS = 5*MNMIN -* Compute workspace needed for CGELSD - CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK, - $ WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO ) - LWORK_CGELSD = INT( WORKQUERY ) - LRWORK_CGELSD = INT( RWORKQUERY ) -* Compute LIWORK workspace needed for CGELSY and CGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD - LRWORK = MAX( 1, LRWORK_CGELSY, LRWORK_CGELSS, LRWORK_CGELSD ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_CGELS, LWORK_CGETSLS, LWORK_CGELSY, - $ LWORK_CGELSS, LWORK_CGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff --git a/TESTING/LIN/ddrvls.f b/TESTING/LIN/ddrvls.f index 5d190e11..a06701b8 100644 --- a/TESTING/LIN/ddrvls.f +++ b/TESTING/LIN/ddrvls.f @@ -233,8 +233,8 @@ DOUBLE PRECISION EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - DOUBLE PRECISION RESULT( NTESTS ), WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + DOUBLE PRECISION RESULT( NTESTS ), WQ * .. * .. Allocatable Arrays .. DOUBLE PRECISION, ALLOCATABLE :: WORK (:) @@ -321,43 +321,76 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * DQRT14, DQRT17 (two side cases), DQRT15 and DQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'T' + END IF +* +* Compute workspace needed for DGELS + CALL DGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_DGELS = INT ( WQ ) +* Compute workspace needed for DGETSLS + CALL DGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_DGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for DGELSY + CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, INFO ) + LWORK_DGELSY = INT( WQ ) +* Compute workspace needed for DGELSS + CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , INFO ) + LWORK_DGELSS = INT( WQ ) +* Compute workspace needed for DGELSD + CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, IWQ, INFO ) + LWORK_DGELSD = INT( WQ ) +* Compute LIWORK workspace needed for DGELSY and DGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_DGELS, LWORK_DGETSLS, + $ LWORK_DGELSY, LWORK_DGELSS, + $ LWORK_DGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for DGELS - CALL DGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_DGELS = INT ( WORKQUERY ) -* Compute workspace needed for DGETSLS - CALL DGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_DGETSLS = INT( WORKQUERY ) -* Compute workspace needed for DGELSY - CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, INFO ) - LWORK_DGELSY = INT( WORKQUERY ) -* Compute workspace needed for DGELSS - CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , INFO ) - LWORK_DGELSS = INT( WORKQUERY ) -* Compute workspace needed for DGELSD - CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO ) - LWORK_DGELSD = INT( WORKQUERY ) -* Compute LIWORK workspace needed for DGELSY and DGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_DGELS, LWORK_DGETSLS, LWORK_DGELSY, - $ LWORK_DGELSS, LWORK_DGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff --git a/TESTING/LIN/sdrvls.f b/TESTING/LIN/sdrvls.f index c408a9bf..a7ecdbc7 100644 --- a/TESTING/LIN/sdrvls.f +++ b/TESTING/LIN/sdrvls.f @@ -233,8 +233,8 @@ REAL EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - REAL RESULT( NTESTS ), WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + REAL RESULT( NTESTS ), WQ * .. * .. Allocatable Arrays .. REAL, ALLOCATABLE :: WORK (:) @@ -321,43 +321,76 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * SQRT14, SQRT17 (two side cases), SQRT15 and SQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'T' + END IF +* +* Compute workspace needed for SGELS + CALL SGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_SGELS = INT ( WQ ) +* Compute workspace needed for SGETSLS + CALL SGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_SGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for SGELSY + CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, INFO ) + LWORK_SGELSY = INT( WQ ) +* Compute workspace needed for SGELSS + CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , INFO ) + LWORK_SGELSS = INT( WQ ) +* Compute workspace needed for SGELSD + CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, IWQ, INFO ) + LWORK_SGELSD = INT( WQ ) +* Compute LIWORK workspace needed for SGELSY and SGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_SGELS, LWORK_SGETSLS, + $ LWORK_SGELSY, LWORK_SGELSS, + $ LWORK_SGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for SGELS - CALL SGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_SGELS = INT ( WORKQUERY ) -* Compute workspace needed for SGETSLS - CALL SGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_SGETSLS = INT( WORKQUERY ) -* Compute workspace needed for SGELSY - CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, INFO ) - LWORK_SGELSY = INT( WORKQUERY ) -* Compute workspace needed for SGELSS - CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , INFO ) - LWORK_SGELSS = INT( WORKQUERY ) -* Compute workspace needed for SGELSD - CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO ) - LWORK_SGELSD = INT( WORKQUERY ) -* Compute LIWORK workspace needed for SGELSY and SGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_SGELS, LWORK_SGETSLS, LWORK_SGELSY, - $ LWORK_SGELSS, LWORK_SGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff --git a/TESTING/LIN/zdrvls.f b/TESTING/LIN/zdrvls.f index c9485e45..b4c376d8 100644 --- a/TESTING/LIN/zdrvls.f +++ b/TESTING/LIN/zdrvls.f @@ -237,9 +237,9 @@ DOUBLE PRECISION EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - DOUBLE PRECISION RESULT( NTESTS ), RWORKQUERY - COMPLEX*16 WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + DOUBLE PRECISION RESULT( NTESTS ), RWQ + COMPLEX*16 WQ * .. * .. Allocatable Arrays .. COMPLEX*16, ALLOCATABLE :: WORK (:) @@ -324,48 +324,85 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * ZQRT14, ZQRT17 (two side cases), ZQRT15 and ZQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LRWORK = 1 + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'C' + END IF +* +* Compute workspace needed for ZGELS + CALL ZGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_ZGELS = INT ( WQ ) +* Compute workspace needed for ZGETSLS + CALL ZGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_ZGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for ZGELSY + CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, RWORK, INFO ) + LWORK_ZGELSY = INT( WQ ) + LRWORK_ZGELSY = 2*N +* Compute workspace needed for ZGELSS + CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , RWORK, + $ INFO ) + LWORK_ZGELSS = INT( WQ ) + LRWORK_ZGELSS = 5*MNMIN +* Compute workspace needed for ZGELSD + CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWQ, IWQ, + $ INFO ) + LWORK_ZGELSD = INT( WQ ) + LRWORK_ZGELSD = INT( RWQ ) +* Compute LIWORK workspace needed for ZGELSY and ZGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD + LRWORK = MAX( LRWORK, LRWORK_ZGELSY, + $ LRWORK_ZGELSS, LRWORK_ZGELSD ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_ZGELS, LWORK_ZGETSLS, + $ LWORK_ZGELSY, LWORK_ZGELSS, + $ LWORK_ZGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for ZGELS - CALL ZGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_ZGELS = INT ( WORKQUERY ) -* Compute workspace needed for ZGETSLS - CALL ZGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_ZGETSLS = INT( WORKQUERY ) -* Compute workspace needed for ZGELSY - CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_ZGELSY = INT( WORKQUERY ) - LRWORK_ZGELSY = 2*N -* Compute workspace needed for ZGELSS - CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , RWORK, INFO ) - LWORK_ZGELSS = INT( WORKQUERY ) - LRWORK_ZGELSS = 5*MNMIN -* Compute workspace needed for ZGELSD - CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK, - $ WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO ) - LWORK_ZGELSD = INT( WORKQUERY ) - LRWORK_ZGELSD = INT( RWORKQUERY ) -* Compute LIWORK workspace needed for ZGELSY and ZGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD - LRWORK = MAX( 1, LRWORK_ZGELSY, LRWORK_ZGELSS, LRWORK_ZGELSD ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_ZGELS, LWORK_ZGETSLS, LWORK_ZGELSY, - $ LWORK_ZGELSS, LWORK_ZGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) -- cgit v1.2.3